incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1156690 - /incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java
Date Thu, 11 Aug 2011 17:24:17 GMT
Author: khorgath
Date: Thu Aug 11 17:24:17 2011
New Revision: 1156690

URL: http://svn.apache.org/viewvc?rev=1156690&view=rev
Log:
HCATALOG-80 - Check to see if token file location is set before we get and set it.

Modified:
    incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java

Modified: incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java?rev=1156690&r1=1156689&r2=1156690&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java
(original)
+++ incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java
Thu Aug 11 17:24:17 2011
@@ -100,9 +100,11 @@ public class HarOutputCommitterPostProce
       Configuration newConf = new Configuration();
       FileSystem fs = archivePath.getFileSystem(newConf);
       
-      newConf.set("mapreduce.job.credentials.binary", System.getenv("HADOOP_TOKEN_FILE_LOCATION"));
+      String hadoopTokenFileLocationEnvSetting = System.getenv("HADOOP_TOKEN_FILE_LOCATION");
+      if ((hadoopTokenFileLocationEnvSetting != null) && (!hadoopTokenFileLocationEnvSetting.isEmpty())){
+        newConf.set("mapreduce.job.credentials.binary", hadoopTokenFileLocationEnvSetting);
 //      LOG.info("System.getenv(\"HADOOP_TOKEN_FILE_LOCATION\") =["+  System.getenv("HADOOP_TOKEN_FILE_LOCATION")+"]");
-
+      }
 //      for (FileStatus ds : fs.globStatus(new Path(dir, "*"))){
 //        LOG.info("src : "+ds.getPath().toUri().toString());
 //      }



Mime
View raw message