From 6e967c10f38224d2e23b659317dc4d060f7a971c Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Fri, 19 Jul 2013 21:55:50 +0000 Subject: [PATCH] HADOOP-9720 merge r1502301 from trunk. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1505040 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/ipc/Client.java | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 9d0e89363e5..eaecbbb1894 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -191,6 +191,9 @@ Release 2.1.0-beta - 2013-07-02 HADOOP-9416. Add new symlink resolution methods in FileSystem and FileSystemLinkResolver. (Andrew Wang via Colin Patrick McCabe) + HADOOP-9720. Rename Client#uuid to Client#clientId. (Arpit Agarwal via + suresh) + HADOOP-9734. Common protobuf definitions for GetUserMappingsProtocol, RefreshAuthorizationPolicyProtocol and RefreshUserMappingsProtocol (jlowe) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java index fba67dcdf8b..5db2d2177a2 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java @@ -115,7 +115,7 @@ public class Client { private final int connectionTimeout; private final boolean fallbackAllowed; - private final byte[] uuid; + private final byte[] clientId; final static int CONNECTION_CONTEXT_CALL_ID = -3; @@ -841,9 +841,10 @@ public class Client { RPC.getProtocolName(remoteId.getProtocol()), remoteId.getTicket(), authMethod); - RpcRequestHeaderProto connectionContextHeader = - ProtoUtil.makeRpcRequestHeader(RpcKind.RPC_PROTOCOL_BUFFER, - OperationProto.RPC_FINAL_PACKET, CONNECTION_CONTEXT_CALL_ID, uuid); + RpcRequestHeaderProto connectionContextHeader = ProtoUtil + .makeRpcRequestHeader(RpcKind.RPC_PROTOCOL_BUFFER, + OperationProto.RPC_FINAL_PACKET, CONNECTION_CONTEXT_CALL_ID, + clientId); RpcRequestMessageWrapper request = new RpcRequestMessageWrapper(connectionContextHeader, message); @@ -951,7 +952,7 @@ public class Client { // Items '1' and '2' are prepared here. final DataOutputBuffer d = new DataOutputBuffer(); RpcRequestHeaderProto header = ProtoUtil.makeRpcRequestHeader( - call.rpcKind, OperationProto.RPC_FINAL_PACKET, call.id, uuid); + call.rpcKind, OperationProto.RPC_FINAL_PACKET, call.id, clientId); header.writeDelimitedTo(d); call.rpcRequest.write(d); @@ -1151,7 +1152,7 @@ public class Client { CommonConfigurationKeys.IPC_CLIENT_CONNECT_TIMEOUT_DEFAULT); this.fallbackAllowed = conf.getBoolean(CommonConfigurationKeys.IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY, CommonConfigurationKeys.IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT); - this.uuid = StringUtils.getUuidBytes(); + this.clientId = StringUtils.getUuidBytes(); this.sendParamsExecutor = clientExcecutorFactory.refAndGetInstance(); }