From 3cf4430876da3a498a54768295ce98b659dfee53 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Wed, 11 Jan 2012 06:55:10 +0000 Subject: [PATCH] svn merge -c 1196171 from trunk for HDFS-2526. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23-PB@1229907 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../ClientNamenodeProtocolTranslatorR23.java | 10 ++-------- .../NamenodeProtocolTranslatorR23.java | 10 ++-------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d531b01c139..fb982b09a84 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -42,6 +42,9 @@ Release 0.23-PB - Unreleased HDFS-2499. RPC client is created incorrectly introduced in HDFS-2459. (suresh) + HDFS-2526. (Client)NamenodeProtocolTranslatorR23 do not need to keep a + reference to rpcProxyWithoutRetry (atm) + Release 0.23.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/ClientNamenodeProtocolTranslatorR23.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/ClientNamenodeProtocolTranslatorR23.java index aa1da0a6d4a..d9a5525670d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/ClientNamenodeProtocolTranslatorR23.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/ClientNamenodeProtocolTranslatorR23.java @@ -79,7 +79,6 @@ import org.apache.hadoop.hdfs.protocol.HdfsConstants; @InterfaceStability.Stable public class ClientNamenodeProtocolTranslatorR23 implements ClientProtocol, Closeable { - final private ClientNamenodeWireProtocol rpcProxyWithoutRetry; final private ClientNamenodeWireProtocol rpcProxy; private static ClientNamenodeWireProtocol createNamenode( @@ -118,16 +117,11 @@ public class ClientNamenodeProtocolTranslatorR23 implements public ClientNamenodeProtocolTranslatorR23(InetSocketAddress nameNodeAddr, Configuration conf, UserGroupInformation ugi) throws IOException { - rpcProxyWithoutRetry = createNamenode(nameNodeAddr, conf, ugi); - rpcProxy = createNamenodeWithRetry(rpcProxyWithoutRetry); - } - - public Object getProxyWithoutRetry() { - return rpcProxyWithoutRetry; + rpcProxy = createNamenodeWithRetry(createNamenode(nameNodeAddr, conf, ugi)); } public void close() { - RPC.stopProxy(rpcProxyWithoutRetry); + RPC.stopProxy(rpcProxy); } @Override diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeProtocolTranslatorR23.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeProtocolTranslatorR23.java index 401587e6537..11589756af4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeProtocolTranslatorR23.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolR23Compatible/NamenodeProtocolTranslatorR23.java @@ -57,7 +57,6 @@ import org.apache.hadoop.security.UserGroupInformation; @InterfaceStability.Stable public class NamenodeProtocolTranslatorR23 implements NamenodeProtocol, Closeable { - final private NamenodeWireProtocol rpcProxyWithoutRetry; final private NamenodeWireProtocol rpcProxy; private static NamenodeWireProtocol createNamenode( @@ -97,16 +96,11 @@ public class NamenodeProtocolTranslatorR23 implements public NamenodeProtocolTranslatorR23(InetSocketAddress nameNodeAddr, Configuration conf, UserGroupInformation ugi) throws IOException { - rpcProxyWithoutRetry = createNamenode(nameNodeAddr, conf, ugi); - rpcProxy = createNamenodeWithRetry(rpcProxyWithoutRetry); - } - - public Object getProxyWithoutRetry() { - return rpcProxyWithoutRetry; + rpcProxy = createNamenodeWithRetry(createNamenode(nameNodeAddr, conf, ugi)); } public void close() { - RPC.stopProxy(rpcProxyWithoutRetry); + RPC.stopProxy(rpcProxy); } @Override