tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gop...@apache.org
Subject git commit: TEZ-1178. Prevent duplicate ObjectRegistryImpl inits in TezChild. (gopalv)
Date Tue, 10 Jun 2014 15:45:19 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master fd9d0b849 -> 75dea57f3


TEZ-1178. Prevent duplicate ObjectRegistryImpl inits in TezChild. (gopalv)


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

Branch: refs/heads/master
Commit: 75dea57f335b6966b60f7983f69a9d2026e0e3b3
Parents: fd9d0b8
Author: Gopal V <gopalv@apache.org>
Authored: Tue Jun 10 08:43:16 2014 -0700
Committer: Gopal V <gopalv@apache.org>
Committed: Tue Jun 10 08:43:16 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/tez/runtime/task/TezChild.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/75dea57f/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java b/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
index 9e0e523..01abdc8 100644
--- a/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
+++ b/tez-dag/src/main/java/org/apache/tez/runtime/task/TezChild.java
@@ -95,7 +95,7 @@ public class TezChild {
   private final int maxEventsToGet;
 
   private final ListeningExecutorService executor;
-  private final ObjectRegistryImpl objectRegistry = new ObjectRegistryImpl();
+  private final ObjectRegistryImpl objectRegistry;
   private final Map<String, ByteBuffer> serviceConsumerMetadata = new HashMap<String,
ByteBuffer>();
 
   private Multimap<String, String> startedInputsMap = HashMultimap.create();
@@ -106,8 +106,8 @@ public class TezChild {
   private TezVertexID lastVertexID;
 
   public TezChild(Configuration conf, String host, int port, String containerIdentifier,
-      String tokenIdentifier, int appAttemptNumber, String[] localDirs) throws IOException,
-      InterruptedException {
+      String tokenIdentifier, int appAttemptNumber, String[] localDirs,
+      ObjectRegistryImpl objectRegistry) throws IOException, InterruptedException {
     this.defaultConf = conf;
     this.containerIdString = containerIdentifier;
     this.appAttemptNumber = appAttemptNumber;
@@ -133,6 +133,8 @@ public class TezChild {
         .setDaemon(true).setNameFormat("TezChild").build());
     this.executor = MoreExecutors.listeningDecorator(executor);
 
+    this.objectRegistry = objectRegistry;
+
     // Security framework already loaded the tokens into current ugi
     Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials();
     if (LOG.isDebugEnabled()) {
@@ -354,7 +356,7 @@ public class TezChild {
     Injector injector = Guice.createInjector(new ObjectRegistryModule(objectRegistry));
 
     TezChild tezChild = new TezChild(defaultConf, host, port, containerIdentifier, tokenIdentifier,
-        attemptNumber, localDirs);
+        attemptNumber, localDirs, objectRegistry);
 
     tezChild.run();
   }


Mime
View raw message