incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1156716 - in /incubator/hcatalog/trunk/src/java/org/apache/hcatalog: common/HCatConstants.java har/HarOutputCommitterPostProcessor.java
Date Thu, 11 Aug 2011 18:27:14 GMT
Author: khorgath
Date: Thu Aug 11 18:27:14 2011
New Revision: 1156716

URL: http://svn.apache.org/viewvc?rev=1156716&view=rev
Log:
HCATALOG-80 - additional patch to paraameterize config value names into constants

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

Modified: incubator/hcatalog/trunk/src/java/org/apache/hcatalog/common/HCatConstants.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/java/org/apache/hcatalog/common/HCatConstants.java?rev=1156716&r1=1156715&r2=1156716&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/java/org/apache/hcatalog/common/HCatConstants.java (original)
+++ incubator/hcatalog/trunk/src/java/org/apache/hcatalog/common/HCatConstants.java Thu Aug
11 18:27:14 2011
@@ -87,4 +87,11 @@ public final class HCatConstants {
   public static final String HCAT_DROP_TABLE_EVENT = "HCAT_DROP_TABLE";
   public static final String HCAT_ADD_DATABASE_EVENT = "HCAT_ADD_DATABASE";
   public static final String HCAT_DROP_DATABASE_EVENT = "HCAT_DROP_DATABASE";
+
+  // System environment variables
+  public static final String SYSENV_HADOOP_TOKEN_FILE_LOCATION = "HADOOP_TOKEN_FILE_LOCATION";
+  
+  // Hadoop Conf Var Names
+  public static final String CONF_MAPREDUCE_JOB_CREDENTIALS_BINARY = "mapreduce.job.credentials.binary";
+
 }

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=1156716&r1=1156715&r2=1156716&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 18:27:14 2011
@@ -31,6 +31,7 @@ import org.apache.hadoop.hive.metastore.
 import org.apache.hadoop.mapreduce.JobContext;
 import org.apache.hadoop.tools.HadoopArchives;
 import org.apache.hadoop.util.ToolRunner;
+import org.apache.hcatalog.common.HCatConstants;
 import org.apache.hcatalog.common.HCatException;
 import org.apache.hcatalog.common.HCatUtil;
 
@@ -100,9 +101,9 @@ public class HarOutputCommitterPostProce
       Configuration newConf = new Configuration();
       FileSystem fs = archivePath.getFileSystem(newConf);
       
-      String hadoopTokenFileLocationEnvSetting = System.getenv("HADOOP_TOKEN_FILE_LOCATION");
+      String hadoopTokenFileLocationEnvSetting = System.getenv(HCatConstants.SYSENV_HADOOP_TOKEN_FILE_LOCATION);
       if ((hadoopTokenFileLocationEnvSetting != null) && (!hadoopTokenFileLocationEnvSetting.isEmpty())){
-        newConf.set("mapreduce.job.credentials.binary", hadoopTokenFileLocationEnvSetting);
+        newConf.set(HCatConstants.CONF_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, "*"))){



Mime
View raw message