diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 9a480d27de8..116beaa5179 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -208,6 +208,9 @@ Release 2.1.0-beta - 2013-07-02 HADOOP-9751. Add clientId and retryCount to RpcResponseHeaderProto. (szetszwo) + HADOOP-9754. Remove unnecessary "throws IOException/InterruptedException", + and fix generic and other javac warnings. (szetszwo) + OPTIMIZATIONS HADOOP-9150. Avoid unnecessary DNS resolution attempts for logical URIs diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryProxy.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryProxy.java index 3cc6a2ec2dc..1baf478af48 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryProxy.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryProxy.java @@ -36,10 +36,10 @@ public class RetryProxy { * @param retryPolicy the policy for retrying method call failures * @return the retry proxy */ - public static Object create(Class iface, Object implementation, + public static Object create(Class iface, T implementation, RetryPolicy retryPolicy) { return RetryProxy.create(iface, - new DefaultFailoverProxyProvider(iface, implementation), + new DefaultFailoverProxyProvider(iface, implementation), retryPolicy); } @@ -53,8 +53,8 @@ public class RetryProxy { * @param retryPolicy the policy for retrying or failing over method call failures * @return the retry proxy */ - public static Object create(Class iface, FailoverProxyProvider proxyProvider, - RetryPolicy retryPolicy) { + public static Object create(Class iface, + FailoverProxyProvider proxyProvider, RetryPolicy retryPolicy) { return Proxy.newProxyInstance( proxyProvider.getInterface().getClassLoader(), new Class[] { iface }, @@ -73,10 +73,10 @@ public class RetryProxy { * @param methodNameToPolicyMap a map of method names to retry policies * @return the retry proxy */ - public static Object create(Class iface, Object implementation, + public static Object create(Class iface, T implementation, Map methodNameToPolicyMap) { return create(iface, - new DefaultFailoverProxyProvider(iface, implementation), + new DefaultFailoverProxyProvider(iface, implementation), methodNameToPolicyMap, RetryPolicies.TRY_ONCE_THEN_FAIL); } @@ -92,7 +92,8 @@ public class RetryProxy { * @param methodNameToPolicyMapa map of method names to retry policies * @return the retry proxy */ - public static Object create(Class iface, FailoverProxyProvider proxyProvider, + public static Object create(Class iface, + FailoverProxyProvider proxyProvider, Map methodNameToPolicyMap, RetryPolicy defaultPolicy) { return Proxy.newProxyInstance( 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 c1ee1173d86..60f7d246bef 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 @@ -454,7 +454,7 @@ public class Client { if (LOG.isDebugEnabled()) LOG.debug("Use " + authMethod + " authentication for protocol " - + protocol.getSimpleName()); + + (protocol == null? null: protocol.getSimpleName())); this.setName("IPC Client (" + socketFactory.hashCode() +") connection to " + server.toString() + @@ -705,7 +705,7 @@ public class Client { * a header to the server and starts * the connection thread that waits for responses. */ - private synchronized void setupIOstreams() throws InterruptedException { + private synchronized void setupIOstreams() { if (socket != null || shouldCloseConnection.get()) { return; } @@ -1260,7 +1260,7 @@ public class Client { * for RPC_BUILTIN */ public Writable call(Writable param, InetSocketAddress address) - throws InterruptedException, IOException { + throws IOException { return call(RPC.RpcKind.RPC_BUILTIN, param, address); } @@ -1272,7 +1272,7 @@ public class Client { */ @Deprecated public Writable call(RPC.RpcKind rpcKind, Writable param, InetSocketAddress address) - throws InterruptedException, IOException { + throws IOException { return call(rpcKind, param, address, null); } @@ -1286,8 +1286,7 @@ public class Client { */ @Deprecated public Writable call(RPC.RpcKind rpcKind, Writable param, InetSocketAddress addr, - UserGroupInformation ticket) - throws InterruptedException, IOException { + UserGroupInformation ticket) throws IOException { ConnectionId remoteId = ConnectionId.getConnectionId(addr, null, ticket, 0, conf); return call(rpcKind, param, remoteId); @@ -1305,8 +1304,7 @@ public class Client { @Deprecated public Writable call(RPC.RpcKind rpcKind, Writable param, InetSocketAddress addr, Class protocol, UserGroupInformation ticket, - int rpcTimeout) - throws InterruptedException, IOException { + int rpcTimeout) throws IOException { ConnectionId remoteId = ConnectionId.getConnectionId(addr, protocol, ticket, rpcTimeout, conf); return call(rpcKind, param, remoteId); @@ -1320,8 +1318,7 @@ public class Client { */ public Writable call(Writable param, InetSocketAddress addr, Class protocol, UserGroupInformation ticket, - int rpcTimeout, Configuration conf) - throws InterruptedException, IOException { + int rpcTimeout, Configuration conf) throws IOException { ConnectionId remoteId = ConnectionId.getConnectionId(addr, protocol, ticket, rpcTimeout, conf); return call(RPC.RpcKind.RPC_BUILTIN, param, remoteId); @@ -1335,7 +1332,7 @@ public class Client { public Writable call(Writable param, InetSocketAddress addr, Class protocol, UserGroupInformation ticket, int rpcTimeout, int serviceClass, Configuration conf) - throws InterruptedException, IOException { + throws IOException { ConnectionId remoteId = ConnectionId.getConnectionId(addr, protocol, ticket, rpcTimeout, conf); return call(RPC.RpcKind.RPC_BUILTIN, param, remoteId, serviceClass); @@ -1351,8 +1348,7 @@ public class Client { */ public Writable call(RPC.RpcKind rpcKind, Writable param, InetSocketAddress addr, Class protocol, UserGroupInformation ticket, - int rpcTimeout, Configuration conf) - throws InterruptedException, IOException { + int rpcTimeout, Configuration conf) throws IOException { ConnectionId remoteId = ConnectionId.getConnectionId(addr, protocol, ticket, rpcTimeout, conf); return call(rpcKind, param, remoteId); @@ -1362,8 +1358,8 @@ public class Client { * Same as {link {@link #call(RPC.RpcKind, Writable, ConnectionId)} * except the rpcKind is RPC_BUILTIN */ - public Writable call(Writable param, ConnectionId remoteId) - throws InterruptedException, IOException { + public Writable call(Writable param, ConnectionId remoteId) + throws IOException { return call(RPC.RpcKind.RPC_BUILTIN, param, remoteId); } @@ -1379,7 +1375,7 @@ public class Client { * threw an exception. */ public Writable call(RPC.RpcKind rpcKind, Writable rpcRequest, - ConnectionId remoteId) throws InterruptedException, IOException { + ConnectionId remoteId) throws IOException { return call(rpcKind, rpcRequest, remoteId, RPC.RPC_SERVICE_CLASS_DEFAULT); } @@ -1396,8 +1392,7 @@ public class Client { * threw an exception. */ public Writable call(RPC.RpcKind rpcKind, Writable rpcRequest, - ConnectionId remoteId, int serviceClass) - throws InterruptedException, IOException { + ConnectionId remoteId, int serviceClass) throws IOException { final Call call = createCall(rpcKind, rpcRequest); Connection connection = getConnection(remoteId, call, serviceClass); try { @@ -1456,8 +1451,7 @@ public class Client { /** Get a connection from the pool, or create a new one and add it to the * pool. Connections to a given ConnectionId are reused. */ private Connection getConnection(ConnectionId remoteId, - Call call, int serviceClass) - throws IOException, InterruptedException { + Call call, int serviceClass) throws IOException { if (!running.get()) { // the client is stopped throw new IOException("The client is stopped"); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java index 6d1f3c2add5..af8e11d78d8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java @@ -192,7 +192,6 @@ public class ProtobufRpcEngine implements RpcEngine { } RequestHeaderProto rpcRequestHeader = constructRpcRequestHeader(method); - RpcResponseWrapper val = null; if (LOG.isTraceEnabled()) { LOG.trace(Thread.currentThread().getId() + ": Call -> " + @@ -202,6 +201,7 @@ public class ProtobufRpcEngine implements RpcEngine { Message theRequest = (Message) args[1]; + final RpcResponseWrapper val; try { val = (RpcResponseWrapper) client.call(RPC.RpcKind.RPC_PROTOCOL_BUFFER, new RpcRequestWrapper(rpcRequestHeader, theRequest), remoteId); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java index 13e9f2ba892..c40e341728f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java @@ -913,7 +913,7 @@ public class RPC { // Register protocol and its impl for rpc calls void registerProtocolAndImpl(RpcKind rpcKind, Class protocolClass, - Object protocolImpl) throws IOException { + Object protocolImpl) { String protocolName = RPC.getProtocolName(protocolClass); long version; @@ -943,8 +943,6 @@ public class RPC { } } - - @SuppressWarnings("unused") // will be useful later. VerProtocolImpl[] getSupportedProtocolVersions(RPC.RpcKind rpcKind, String protocolName) { VerProtocolImpl[] resultk = @@ -999,8 +997,7 @@ public class RPC { initProtocolMetaInfo(conf); } - private void initProtocolMetaInfo(Configuration conf) - throws IOException { + private void initProtocolMetaInfo(Configuration conf) { RPC.setProtocolEngine(conf, ProtocolMetaInfoPB.class, ProtobufRpcEngine.class); ProtocolMetaInfoServerSideTranslatorPB xlator = @@ -1018,7 +1015,7 @@ public class RPC { * @return the server (for convenience) */ public Server addProtocol(RpcKind rpcKind, Class protocolClass, - Object protocolImpl) throws IOException { + Object protocolImpl) { registerProtocolAndImpl(rpcKind, protocolClass, protocolImpl); return this; } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index 8799011efa9..5388ff02be3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -909,11 +909,7 @@ public abstract class Server { } for(Call call : calls) { - try { - doPurge(call, now); - } catch (IOException e) { - LOG.warn("Error in purging old calls " + e); - } + doPurge(call, now); } } catch (OutOfMemoryError e) { // @@ -958,7 +954,7 @@ public abstract class Server { // Remove calls that have been pending in the responseQueue // for a long time. // - private void doPurge(Call call, long now) throws IOException { + private void doPurge(Call call, long now) { LinkedList responseQueue = call.connection.responseQueue; synchronized (responseQueue) { Iterator iter = responseQueue.listIterator(0); @@ -1514,7 +1510,7 @@ public abstract class Server { } private AuthProtocol initializeAuthContext(int authType) - throws IOException, InterruptedException { + throws IOException { AuthProtocol authProtocol = AuthProtocol.valueOf(authType); if (authProtocol == null) { IOException ioe = new IpcException("Unknown auth protocol:" + authType); @@ -1986,7 +1982,7 @@ public abstract class Server { this.serviceClass = serviceClass; } - private synchronized void close() throws IOException { + private synchronized void close() { disposeSasl(); data = null; dataLengthBuffer = null; @@ -2262,10 +2258,7 @@ public abstract class Server { if (connectionList.remove(connection)) numConnections--; } - try { - connection.close(); - } catch (IOException e) { - } + connection.close(); } /** diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java index edf95d74809..4def0704973 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java @@ -189,7 +189,7 @@ public class MiniRPCBenchmark { MiniProtocol client = null; try { long start = Time.now(); - client = (MiniProtocol) RPC.getProxy(MiniProtocol.class, + client = RPC.getProxy(MiniProtocol.class, MiniProtocol.versionID, addr, conf); long end = Time.now(); return end - start; @@ -211,7 +211,7 @@ public class MiniRPCBenchmark { client = proxyUserUgi.doAs(new PrivilegedExceptionAction() { @Override public MiniProtocol run() throws IOException { - MiniProtocol p = (MiniProtocol) RPC.getProxy(MiniProtocol.class, + MiniProtocol p = RPC.getProxy(MiniProtocol.class, MiniProtocol.versionID, addr, conf); Token token; token = p.getDelegationToken(new Text(RENEWER)); @@ -239,7 +239,7 @@ public class MiniRPCBenchmark { client = currentUgi.doAs(new PrivilegedExceptionAction() { @Override public MiniProtocol run() throws IOException { - return (MiniProtocol) RPC.getProxy(MiniProtocol.class, + return RPC.getProxy(MiniProtocol.class, MiniProtocol.versionID, addr, conf); } }); diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/RPCCallBenchmark.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/RPCCallBenchmark.java index d358913ef05..6400e872387 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/RPCCallBenchmark.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/RPCCallBenchmark.java @@ -31,7 +31,6 @@ import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.ipc.RPC.Server; @@ -55,7 +54,7 @@ import com.google.protobuf.BlockingService; * Benchmark for protobuf RPC. * Run with --help option for usage. */ -public class RPCCallBenchmark implements Tool, Configurable { +public class RPCCallBenchmark implements Tool { private Configuration conf; private AtomicLong callCount = new AtomicLong(0); private static ThreadMXBean threadBean = @@ -403,7 +402,7 @@ public class RPCCallBenchmark implements Tool, Configurable { } }; } else if (opts.rpcEngine == WritableRpcEngine.class) { - final TestProtocol proxy = (TestProtocol)RPC.getProxy( + final TestProtocol proxy = RPC.getProxy( TestProtocol.class, TestProtocol.versionID, addr, conf); return new RpcServiceWrapper() { @Override diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java index 2b33f5210ff..74519ef7e80 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java @@ -628,7 +628,7 @@ public class TestIPC { } @Test(timeout=30000, expected=IOException.class) - public void testIpcAfterStopping() throws IOException, InterruptedException { + public void testIpcAfterStopping() throws IOException { // start server Server server = new TestServer(5, false); InetSocketAddress addr = NetUtils.getConnectAddress(server); @@ -920,7 +920,7 @@ public class TestIPC { } private void assertRetriesOnSocketTimeouts(Configuration conf, - int maxTimeoutRetries) throws IOException, InterruptedException { + int maxTimeoutRetries) throws IOException { SocketFactory mockFactory = Mockito.mock(SocketFactory.class); doThrow(new ConnectTimeoutException("fake")).when(mockFactory).createSocket(); Client client = new Client(IntWritable.class, conf, mockFactory); diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestMultipleProtocolServer.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestMultipleProtocolServer.java index dd73b52cc8f..29a293f2165 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestMultipleProtocolServer.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestMultipleProtocolServer.java @@ -64,7 +64,7 @@ public class TestMultipleProtocolServer { public static final long versionID = 0L; void hello() throws IOException; } - interface Bar extends Mixin, VersionedProtocol { + interface Bar extends Mixin { public static final long versionID = 0L; int echo(int i) throws IOException; } diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java index 089e1e59d4d..da1b791e6e4 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java @@ -57,7 +57,7 @@ public class TestRPCCompatibility { void ping() throws IOException; } - public interface TestProtocol1 extends VersionedProtocol, TestProtocol0 { + public interface TestProtocol1 extends TestProtocol0 { String echo(String value) throws IOException; } @@ -123,7 +123,7 @@ public class TestRPCCompatibility { } @After - public void tearDown() throws IOException { + public void tearDown() { if (proxy != null) { RPC.stopProxy(proxy.getProxy()); proxy = null; diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestSaslRPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestSaslRPC.java index 08f9672be00..f20990db890 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestSaslRPC.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestSaslRPC.java @@ -334,7 +334,7 @@ public class TestSaslRPC { TestSaslProtocol proxy = null; try { - proxy = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, conf); //QOP must be auth Assert.assertEquals(SaslRpcServer.SASL_PROPS.get(Sasl.QOP), "auth"); @@ -415,20 +415,20 @@ public class TestSaslRPC { TestSaslProtocol proxy2 = null; TestSaslProtocol proxy3 = null; try { - proxy1 = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy1 = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, newConf); proxy1.getAuthMethod(); Client client = WritableRpcEngine.getClient(conf); Set conns = client.getConnectionIds(); assertEquals("number of connections in cache is wrong", 1, conns.size()); // same conf, connection should be re-used - proxy2 = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy2 = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, newConf); proxy2.getAuthMethod(); assertEquals("number of connections in cache is wrong", 1, conns.size()); // different conf, new connection should be set up newConf.set(SERVER_PRINCIPAL_KEY, SERVER_PRINCIPAL_2); - proxy3 = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy3 = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, newConf); proxy3.getAuthMethod(); ConnectionId[] connsArray = conns.toArray(new ConnectionId[0]); @@ -468,7 +468,7 @@ public class TestSaslRPC { InetSocketAddress addr = NetUtils.getConnectAddress(server); try { - proxy = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, newConf); proxy.ping(); } finally { @@ -488,7 +488,7 @@ public class TestSaslRPC { } @Test - public void testSaslPlainServerBadPassword() throws IOException { + public void testSaslPlainServerBadPassword() { SaslException e = null; try { runNegotiation( @@ -824,7 +824,7 @@ public class TestSaslRPC { public String run() throws IOException { TestSaslProtocol proxy = null; try { - proxy = (TestSaslProtocol) RPC.getProxy(TestSaslProtocol.class, + proxy = RPC.getProxy(TestSaslProtocol.class, TestSaslProtocol.versionID, addr, clientConf); proxy.ping(); diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestServer.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestServer.java index 57785c10502..64dc4d4ffd7 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestServer.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestServer.java @@ -118,7 +118,7 @@ public class TestServer { } @Test - public void testExceptionsHandler() throws IOException { + public void testExceptionsHandler() { Server.ExceptionsHandler handler = new Server.ExceptionsHandler(); handler.addTerseExceptions(IOException.class); handler.addTerseExceptions(RpcServerException.class, IpcException.class); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java index 8ce2b012fcb..ca0fc37c0be 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java @@ -297,9 +297,8 @@ public class NameNodeProxies { return new ClientNamenodeProtocolTranslatorPB(proxy); } - @SuppressWarnings("unchecked") private static Object createNameNodeProxy(InetSocketAddress address, - Configuration conf, UserGroupInformation ugi, Class xface) + Configuration conf, UserGroupInformation ugi, Class xface) throws IOException { RPC.setProtocolEngine(conf, xface, ProtobufRpcEngine.class); Object proxy = RPC.getProxy(xface, RPC.getProtocolVersion(xface), address,