tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [3/3] tez git commit: TEZ-3199. Rename getCredentials in TaskCommunicatorContext to be less confusing. (sseth)
Date Thu, 07 Apr 2016 17:46:14 GMT
TEZ-3199. Rename getCredentials in TaskCommunicatorContext to be less
confusing. (sseth)


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

Branch: refs/heads/master
Commit: 5b1f1a92303821b0f9749b82b6b351d7581bbfbd
Parents: b0e8fd1
Author: Siddharth Seth <sseth@apache.org>
Authored: Thu Apr 7 10:45:54 2016 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Thu Apr 7 10:45:54 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java | 2 +-
 .../java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java     | 2 +-
 .../apache/tez/serviceplugins/api/TaskCommunicatorContext.java   | 2 +-
 .../tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java      | 2 +-
 .../tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java | 4 ++--
 6 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5dbe3d1..f72e726 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-3029. Add an onError method to service plugin contexts.
   TEZ-3120. Remove TaskCommContext.getCurrentDagName, Identifier.
   TEZ-3183. Change the taskFailed method on plugin contexts to specify the type of failure.
+  TEZ-3199. Rename getCredentials in TaskCommunicatorContext to be less confusing.
 
 ALL CHANGES:
   TEZ-3161. Allow task to report different kinds of errors - fatal / kill.

http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java
index 4c43fdd..1fbf853 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorContextImpl.java
@@ -83,7 +83,7 @@ public class TaskCommunicatorContextImpl implements TaskCommunicatorContext,
Ver
   }
 
   @Override
-  public Credentials getCredentials() {
+  public Credentials getAMCredentials() {
     return context.getAppCredentials();
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java
index b879f07..4563ba6 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java
@@ -123,7 +123,7 @@ public class TezTaskCommunicatorImpl extends TaskCommunicator {
     super(taskCommunicatorContext);
     this.taskUmbilical = new TezTaskUmbilicalProtocolImpl();
     this.tokenIdentifier = taskCommunicatorContext.getApplicationAttemptId().getApplicationId().toString();
-    this.sessionToken = TokenCache.getSessionToken(taskCommunicatorContext.getCredentials());
+    this.sessionToken = TokenCache.getSessionToken(taskCommunicatorContext.getAMCredentials());
     try {
       conf = TezUtils.createConfFromUserPayload(getContext().getInitialUserPayload());
     } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/tez-dag/src/main/java/org/apache/tez/serviceplugins/api/TaskCommunicatorContext.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/serviceplugins/api/TaskCommunicatorContext.java
b/tez-dag/src/main/java/org/apache/tez/serviceplugins/api/TaskCommunicatorContext.java
index a17a70d..00a830b 100644
--- a/tez-dag/src/main/java/org/apache/tez/serviceplugins/api/TaskCommunicatorContext.java
+++ b/tez-dag/src/main/java/org/apache/tez/serviceplugins/api/TaskCommunicatorContext.java
@@ -70,7 +70,7 @@ public interface TaskCommunicatorContext extends ServicePluginContextBase
{
    *
    * @return credentials
    */
-  Credentials getCredentials();
+  Credentials getAMCredentials();
 
   /**
    * Check whether a running attempt can commit. This provides a leader election mechanism
amongst

http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/tez-dag/src/test/java/org/apache/tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java
b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java
index 65f43a8..483f9c4 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/app/TestTezTaskCommunicatorManager.java
@@ -52,7 +52,7 @@ public class TestTezTaskCommunicatorManager {
 
     doReturn(appAttemptId).when(context).getApplicationAttemptId();
     doReturn(userPayload).when(context).getInitialUserPayload();
-    doReturn(new Credentials()).when(context).getCredentials();
+    doReturn(new Credentials()).when(context).getAMCredentials();
 
     TezTaskCommunicatorImpl taskComm = new TezTaskCommunicatorImpl(context);
 

http://git-wip-us.apache.org/repos/asf/tez/blob/5b1f1a92/tez-ext-service-tests/src/test/java/org/apache/tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java
----------------------------------------------------------------------
diff --git a/tez-ext-service-tests/src/test/java/org/apache/tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java
b/tez-ext-service-tests/src/test/java/org/apache/tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java
index ac36f7c..6c07107 100644
--- a/tez-ext-service-tests/src/test/java/org/apache/tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java
+++ b/tez-ext-service-tests/src/test/java/org/apache/tez/dag/app/taskcomm/TezTestServiceTaskCommunicatorImpl.java
@@ -191,11 +191,11 @@ public class TezTestServiceTaskCommunicatorImpl extends TezTaskCommunicatorImpl
     builder.setAmPort(getAddress().getPort());
     Credentials taskCredentials = new Credentials();
     // Credentials can change across DAGs. Ideally construct only once per DAG.
-    taskCredentials.addAll(getContext().getCredentials());
+    taskCredentials.addAll(getContext().getAMCredentials());
 
     ByteBuffer credentialsBinary = credentialMap.get(taskSpec.getDAGName());
     if (credentialsBinary == null) {
-      credentialsBinary = serializeCredentials(getContext().getCredentials());
+      credentialsBinary = serializeCredentials(getContext().getAMCredentials());
       credentialMap.putIfAbsent(taskSpec.getDAGName(), credentialsBinary.duplicate());
     } else {
       credentialsBinary = credentialsBinary.duplicate();


Mime
View raw message