From 2be8947d12714c49ef7a90de82a351d086b435b6 Mon Sep 17 00:00:00 2001 From: Jian He Date: Wed, 8 Mar 2017 13:20:01 -0800 Subject: [PATCH] Revert "HADOOP-14062. ApplicationMasterProtocolPBClientImpl.allocate fails with EOFException when RPC privacy is enabled. Contributed by Steven Rand" This reverts commit 241c1cc05b71f8b719a85c06e3df930639630726. --- .../java/org/apache/hadoop/ipc/Client.java | 4 +--- .../yarn/client/api/impl/TestAMRMClient.java | 24 ------------------- 2 files changed, 1 insertion(+), 27 deletions(-) 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 c0a5be95f9..70b902c7bb 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 @@ -1768,9 +1768,7 @@ public static class IpcStreams implements Closeable, Flushable { } void setSaslClient(SaslRpcClient client) throws IOException { - // Wrap the input stream in a BufferedInputStream to fill the buffer - // before reading its length (HADOOP-14062). - setInputStream(new BufferedInputStream(client.getInputStream(in))); + setInputStream(client.getInputStream(in)); setOutputStream(client.getOutputStream(out)); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java index a52963a2a8..43c02710f8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java @@ -137,11 +137,6 @@ public void setup() throws Exception { // set the minimum allocation so that resource decrease can go under 1024 conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 512); conf.setLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS, 1); - createClientAndCluster(conf); - } - - private static void createClientAndCluster(Configuration conf) - throws Exception { yarnCluster = new MiniYARNCluster(TestAMRMClient.class.getName(), nodeCount, 1, 1); yarnCluster.init(conf); yarnCluster.start(); @@ -866,25 +861,6 @@ public void testAMRMClient() throws YarnException, IOException { initAMRMClientAndTest(false); } - @Test (timeout=60000) - public void testAMRMClientWithSaslEncryption() throws Exception { - conf.set("hadoop.rpc.protection", "privacy"); - // we have to create a new instance of MiniYARNCluster to avoid SASL qop - // mismatches between client and server - tearDown(); - createClientAndCluster(conf); - startApp(); - initAMRMClientAndTest(false); - - // recreate the original MiniYARNCluster and YarnClient for other tests - conf.unset("hadoop.rpc.protection"); - tearDown(); - createClientAndCluster(conf); - // unless we start an application the cancelApp() method will fail when - // it runs after this test - startApp(); - } - @Test (timeout=60000) public void testAMRMClientAllocReqId() throws YarnException, IOException { initAMRMClientAndTest(true);