tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject [2/2] git commit: TEZ-944. Tez Job gets "Could not load native gpl library" Error. (hitesh)
Date Tue, 18 Mar 2014 21:22:33 GMT
TEZ-944. Tez Job gets "Could not load native gpl library" Error. (hitesh)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/8d87e039
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/8d87e039
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/8d87e039

Branch: refs/heads/master
Commit: 8d87e0398bbe0b270822caf06b6d04f6b871e449
Parents: c548c91
Author: Hitesh Shah <hitesh@apache.org>
Authored: Tue Mar 18 14:22:14 2014 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Tue Mar 18 14:22:14 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/tez/client/AMConfiguration.java | 11 ++++++++---
 .../java/org/apache/tez/dag/api/TezConfiguration.java    |  7 +++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/8d87e039/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java b/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
index 132a73c..2016ffc 100644
--- a/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
+++ b/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
@@ -18,6 +18,7 @@
 
 package org.apache.tez.client;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,6 +27,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.yarn.api.records.LocalResource;
+import org.apache.tez.common.TezYARNUtils;
 import org.apache.tez.dag.api.TezConfiguration;
 import org.apache.tez.dag.api.TezUncheckedException;
 
@@ -59,11 +61,14 @@ public class AMConfiguration {
     }
     this.queueName = this.amConf.get(TezConfiguration.TEZ_QUEUE_NAME);
 
+    this.env = new HashMap<String, String>();
+    TezYARNUtils.setEnvFromInputString(this.env,
+        this.amConf.get(TezConfiguration.TEZ_AM_ENV),
+        File.pathSeparator);
     if (env != null) {
-      this.env = env;
-    } else {
-      this.env = new HashMap<String, String>(0);
+      this.env.putAll(env);
     }
+
     this.localResources = localResources;
     String stagingDirStr = amConf.get(TezConfiguration.TEZ_AM_STAGING_DIR);
     if (stagingDirStr == null || stagingDirStr.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/8d87e039/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
index 29d04ab..1e2f604 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
@@ -62,6 +62,13 @@ public class TezConfiguration extends Configuration {
       + "java.opts";
   public static final String TEZ_AM_JAVA_OPTS_DEFAULT = " -Xmx1024m ";
 
+  /** User-provided env for the Tez AM. Any env provided in AMConfiguration
+   * overrides env defined by this config property
+   * Should be specified as a comma-separated of key-value pairs where each pair
+   * is defined as KEY=VAL
+   */
+  public static final String TEZ_AM_ENV = TEZ_AM_PREFIX + "env";
+
   public static final String TEZ_AM_CANCEL_DELEGATION_TOKEN = TEZ_AM_PREFIX +
       "am.complete.cancel.delegation.tokens";
   public static final boolean TEZ_AM_CANCEL_DELEGATION_TOKEN_DEFAULT = true;


Mime
View raw message