tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-1391. Setup IGNORE_LIB_URIS correctly for Local Mode. (sseth)
Date Mon, 11 Aug 2014 06:15:23 GMT
Repository: tez
Updated Branches:
  refs/heads/master dadd4e048 -> c171220b7


TEZ-1391. Setup IGNORE_LIB_URIS correctly for Local Mode. (sseth)


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

Branch: refs/heads/master
Commit: c171220b7ada97716eb6d778e9fb4630bb4deca0
Parents: dadd4e0
Author: Siddharth Seth <sseth@apache.org>
Authored: Fri Aug 8 15:16:06 2014 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Sun Aug 10 23:15:02 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/tez/client/FrameworkClient.java  | 15 +++++++++++++--
 .../main/java/org/apache/tez/client/TezClient.java   |  2 +-
 .../java/org/apache/tez/client/TezYarnClient.java    |  6 ++++--
 .../tez/dag/api/client/rpc/DAGClientRPCImpl.java     |  2 +-
 .../main/java/org/apache/tez/client/LocalClient.java | 10 +++++-----
 5 files changed, 24 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/c171220b/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java b/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
index eca15f6..1504922 100644
--- a/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
@@ -20,12 +20,12 @@ package org.apache.tez.client;
 
 import java.io.IOException;
 
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
 import org.apache.hadoop.yarn.client.api.YarnClient;
 import org.apache.hadoop.yarn.client.api.YarnClientApplication;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.dag.api.TezConfiguration;
@@ -47,7 +47,18 @@ public abstract class FrameworkClient {
     return new TezYarnClient(YarnClient.createYarnClient());
   }
 
-  public abstract void init(Configuration conf);
+  /**
+   * Initialize the framework client. </p>
+   * <p/>
+   * The actual implementation of FramworkClient may modify the configuration instances that
are
+   * passed in to configure required functionality
+   *
+   * @param tezConf  the {@link org.apache.tez.dag.api.TezConfiguration} instance being used
by the
+   *                 cluster
+   * @param yarnConf the {@link org.apache.hadoop.yarn.conf.YarnConfiguration} instance being
used
+   *                 by the cluster
+   */
+  public abstract void init(TezConfiguration tezConf, YarnConfiguration yarnConf);
 
   public abstract void start();
 

http://git-wip-us.apache.org/repos/asf/tez/blob/c171220b/tez-api/src/main/java/org/apache/tez/client/TezClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClient.java b/tez-api/src/main/java/org/apache/tez/client/TezClient.java
index 7a515fa..8f0e66f 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezClient.java
@@ -251,7 +251,7 @@ public class TezClient {
     amConfig.setYarnConfiguration(new YarnConfiguration(amConfig.getTezConfiguration()));
 
     frameworkClient = createFrameworkClient();
-    frameworkClient.init(amConfig.getYarnConfiguration());
+    frameworkClient.init(amConfig.getTezConfiguration(), amConfig.getYarnConfiguration());
     frameworkClient.start();    
 
     if (isSession) {

http://git-wip-us.apache.org/repos/asf/tez/blob/c171220b/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java b/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
index 3d8d24a..4d796f8 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
@@ -26,7 +26,9 @@ import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
 import org.apache.hadoop.yarn.client.api.YarnClient;
 import org.apache.hadoop.yarn.client.api.YarnClientApplication;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
+import org.apache.tez.dag.api.TezConfiguration;
 
 public class TezYarnClient extends FrameworkClient {
 
@@ -37,8 +39,8 @@ public class TezYarnClient extends FrameworkClient {
   }
 
   @Override
-  public void init(Configuration conf) {
-    yarnClient.init(conf);
+  public void init(TezConfiguration tezConf, YarnConfiguration yarnConf) {
+    yarnClient.init(yarnConf);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/tez/blob/c171220b/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientRPCImpl.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientRPCImpl.java
b/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientRPCImpl.java
index dfe1323..3465384 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientRPCImpl.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientRPCImpl.java
@@ -77,7 +77,7 @@ public class DAGClientRPCImpl extends DAGClient {
     this.dagId = dagId;
     this.conf = conf;
     frameworkClient = FrameworkClient.createFrameworkClient(conf);
-    frameworkClient.init(new YarnConfiguration(conf));
+    frameworkClient.init(conf, new YarnConfiguration(conf));
     frameworkClient.start();
     appReport = null;
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/c171220b/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java b/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
index 1a86a2b..82aeedb 100644
--- a/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
+++ b/tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
@@ -68,12 +68,12 @@ public class LocalClient extends FrameworkClient {
   }
 
   @Override
-  public void init(Configuration conf) {
-    this.conf = conf;
-    this.conf.set("fs.defaultFS", "file:///");
+  public void init(TezConfiguration tezConf, YarnConfiguration yarnConf) {
+    this.conf = yarnConf;
+    tezConf.set("fs.defaultFS", "file:///");
     // Tez libs already in the client's classpath
-    this.conf.setBoolean(TezConfiguration.TEZ_IGNORE_LIB_URIS, true);
-    isSession = conf.getBoolean(TezConfiguration.TEZ_AM_SESSION_MODE,
+    tezConf.setBoolean(TezConfiguration.TEZ_IGNORE_LIB_URIS, true);
+    isSession = tezConf.getBoolean(TezConfiguration.TEZ_AM_SESSION_MODE,
         TezConfiguration.TEZ_AM_SESSION_MODE_DEFAULT);
   }
 


Mime
View raw message