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 kh...@apache.org on 2011/08/11 17:24:17 UTC

svn commit: r1156690 - /incubator/hcatalog/trunk/src/java/org/apache/hcatalog/har/HarOutputCommitterPostProcessor.java

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());
 //      }