diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 6096ec3159..d3edf1c810 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -85,6 +85,9 @@ Trunk (unreleased changes) HDFS-2497 Fix TestBackupNode failure. (suresh) + HDFS-2526. (Client)NamenodeProtocolTranslatorR23 do not need to keep a + reference to rpcProxyWithoutRetry (atm) + Release 0.23.0 - 2011-11-01 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 aa1da0a6d4..d9a5525670 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 @@ @InterfaceStability.Stable public class ClientNamenodeProtocolTranslatorR23 implements ClientProtocol, Closeable { - final private ClientNamenodeWireProtocol rpcProxyWithoutRetry; final private ClientNamenodeWireProtocol rpcProxy; private static ClientNamenodeWireProtocol createNamenode( @@ -118,16 +117,11 @@ static ClientNamenodeWireProtocol createNamenodeWithRetry( 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 401587e653..11589756af 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 @@ @InterfaceStability.Stable public class NamenodeProtocolTranslatorR23 implements NamenodeProtocol, Closeable { - final private NamenodeWireProtocol rpcProxyWithoutRetry; final private NamenodeWireProtocol rpcProxy; private static NamenodeWireProtocol createNamenode( @@ -97,16 +96,11 @@ static NamenodeWireProtocol createNamenodeWithRetry( 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