HIVE-13184. LLAP: DAG credentials (e.g. HBase tokens) are not passed to the tasks in Tez plugin. (Sergey Shelukhin, reviewed by Siddharth Seth)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0cf2244c Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0cf2244c Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0cf2244c Branch: refs/heads/master Commit: 0cf2244cbe7200a1497de05d3b928b6c457d46c3 Parents: b18a0f5 Author: Siddharth Seth <[email protected]> Authored: Mon Apr 25 23:17:58 2016 -0700 Committer: Siddharth Seth <[email protected]> Committed: Mon Apr 25 23:17:58 2016 -0700 ---------------------------------------------------------------------- .../hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/0cf2244c/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java ---------------------------------------------------------------------- diff --git a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java index 799367b..bc9a209 100644 --- a/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java +++ b/llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java @@ -548,15 +548,12 @@ public class LlapTaskCommunicator extends TezTaskCommunicatorImpl { builder.setContainerIdString(containerId.toString()); builder.setAmHost(getAddress().getHostName()); builder.setAmPort(getAddress().getPort()); - Credentials taskCredentials = new Credentials(); - // Credentials can change across DAGs. Ideally construct only once per DAG. - taskCredentials.addAll(getContext().getCredentials()); Preconditions.checkState(currentQueryIdentifierProto.getDagIdentifier() == taskSpec.getTaskAttemptID().getTaskID().getVertexID().getDAGId().getId()); ByteBuffer credentialsBinary = credentialMap.get(currentQueryIdentifierProto); if (credentialsBinary == null) { - credentialsBinary = serializeCredentials(getContext().getCredentials()); + credentialsBinary = serializeCredentials(getContext().getCurrentDagInfo().getCredentials()); credentialMap.putIfAbsent(currentQueryIdentifierProto, credentialsBinary.duplicate()); } else { credentialsBinary = credentialsBinary.duplicate();
