You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by to...@apache.org on 2012/05/09 23:42:51 UTC
svn commit: r1336457 - in /incubator/hcatalog/branches/branch-0.4: ./
CHANGES.txt src/java/org/apache/hcatalog/pig/HCatLoader.java
Author: toffer
Date: Wed May 9 23:42:50 2012
New Revision: 1336457
URL: http://svn.apache.org/viewvc?rev=1336457&view=rev
Log:
merged from trunk: HCATALOG-380 If pig script does load then order by, hive-site.xml doesn't seem to propagate properly (toffer)
Modified:
incubator/hcatalog/branches/branch-0.4/ (props changed)
incubator/hcatalog/branches/branch-0.4/CHANGES.txt
incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/HCatLoader.java
Propchange: incubator/hcatalog/branches/branch-0.4/
------------------------------------------------------------------------------
Merged /incubator/hcatalog/trunk:r1336456
Modified: incubator/hcatalog/branches/branch-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/CHANGES.txt?rev=1336457&r1=1336456&r2=1336457&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.4/CHANGES.txt Wed May 9 23:42:50 2012
@@ -122,6 +122,8 @@ Release 0.4.0 - Unreleased
OPTIMIZATIONS
BUG FIXES
+ HCAT-380 If pig script does load then order by, hive-site.xml doesn't seem to propagate properly (toffer)
+
HCAT-396 src-release leaves out lib directory (gates)
HCAT-393 Several hcat 0.4 document fixes (daijy via gates)
Modified: incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/HCatLoader.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/HCatLoader.java?rev=1336457&r1=1336456&r2=1336457&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/HCatLoader.java (original)
+++ incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/HCatLoader.java Wed May 9 23:42:50 2012
@@ -99,17 +99,17 @@ public class HCatLoader extends HCatBase
// the backend
// in the hadoop front end mapred.task.id property will not be set in
// the Configuration
-
if (udfProps.containsKey(HCatConstants.HCAT_PIG_LOADER_LOCATION_SET)) {
for( Enumeration<Object> emr = udfProps.keys();emr.hasMoreElements();) {
PigHCatUtil.getConfigFromUDFProperties(udfProps,
job.getConfiguration(), emr.nextElement().toString());
}
- Credentials crd = jobCredentials.get(INNER_SIGNATURE_PREFIX + "_" + signature);
- if (crd != null) {
+ if (!HCatUtil.checkJobContextIfRunningFromBackend(job)) {
+ //Combine credentials and credentials from job takes precedence for freshness
+ Credentials crd = jobCredentials.get(INNER_SIGNATURE_PREFIX + "_" + signature);
+ crd.addAll(job.getCredentials());
job.getCredentials().addAll(crd);
}
-
} else {
Job clone = new Job(job.getConfiguration());
HCatInputFormat.setInput(job, InputJobInfo.create(dbName,
@@ -128,7 +128,9 @@ public class HCatLoader extends HCatBase
//Store credentials in a private hash map and not the udf context to
// make sure they are not public.
- jobCredentials.put(INNER_SIGNATURE_PREFIX + "_" + signature,job.getCredentials());
+ Credentials crd = new Credentials();
+ crd.addAll(job.getCredentials());
+ jobCredentials.put(INNER_SIGNATURE_PREFIX + "_" + signature, crd);
}
// Need to also push projections by calling setOutputSchema on