[39/50] [abbrv] hadoop git commit: MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K.
MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7c782047 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7c782047 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7c782047 Branch: refs/heads/YARN-2928 Commit: 7c782047c609b29178945bd566a0d162e64dbfdb Parents: 57db50c Author: Tsuyoshi Ozawa oz...@apache.org Authored: Wed Feb 18 15:45:52 2015 +0900 Committer: Tsuyoshi Ozawa oz...@apache.org Committed: Wed Feb 18 15:45:52 2015 +0900 -- hadoop-mapreduce-project/CHANGES.txt| 3 + .../TestClientProtocolProviderImpls.java| 71 ++-- 2 files changed, 25 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c782047/hadoop-mapreduce-project/CHANGES.txt -- diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 50e067c..e944d82 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -376,6 +376,9 @@ Release 2.7.0 - UNRELEASED MAPREDUCE-6221. Stringifier is left unclosed in Chain#getChainElementConf(). (Ted Yu via ozawa) +MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure +conditions. (Devaraj K via ozawa) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c782047/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java -- diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java index e71c038..6ad76e9 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java @@ -18,30 +18,22 @@ package org.apache.hadoop.mapreduce; -import java.io.IOException; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; -import junit.framework.TestCase; +import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.LocalJobRunner; +import org.apache.hadoop.mapred.YARNRunner; import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig; import org.junit.Test; -public class TestClientProtocolProviderImpls extends TestCase { +public class TestClientProtocolProviderImpls { @Test public void testClusterWithLocalClientProvider() throws Exception { - Configuration conf = new Configuration(); - -try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); -} catch (IOException e) { - -} - conf.set(MRConfig.FRAMEWORK_NAME, local); Cluster cluster = new Cluster(conf); assertTrue(cluster.getClient() instanceof LocalJobRunner); @@ -50,57 +42,38 @@ public class TestClientProtocolProviderImpls extends TestCase { @Test public void testClusterWithJTClientProvider() throws Exception { - Configuration conf = new Configuration(); try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); - -} catch (IOException e) { - -} - -try { conf.set(MRConfig.FRAMEWORK_NAME, classic); conf.set(JTConfig.JT_IPC_ADDRESS, local); new Cluster(conf); - fail(Cluster with classic Framework name shouldnot use local JT address); - + fail(Cluster with classic Framework name should not use + + local JT address); } catch (IOException e) { - + assertTrue(e.getMessage().contains( + Cannot initialize Cluster. Please check)); } + } -try { - conf = new Configuration(); - conf.set(MRConfig.FRAMEWORK_NAME, classic); - conf.set(JTConfig.JT_IPC_ADDRESS, 127.0.0.1:0); - Cluster cluster = new Cluster(conf); - cluster.close(); -} catch (IOException e) { - -} + @Test + public void testClusterWithYarnClientProvider() throws Exception { +Configuration conf = new
hadoop git commit: MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K.
Repository: hadoop Updated Branches: refs/heads/branch-2 ba18adbb2 - 9523b52da MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K. (cherry picked from commit 7c782047c609b29178945bd566a0d162e64dbfdb) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9523b52d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9523b52d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9523b52d Branch: refs/heads/branch-2 Commit: 9523b52da5942cd047ffe351386f7dc9f058040d Parents: ba18adb Author: Tsuyoshi Ozawa oz...@apache.org Authored: Wed Feb 18 15:45:52 2015 +0900 Committer: Tsuyoshi Ozawa oz...@apache.org Committed: Wed Feb 18 15:46:06 2015 +0900 -- hadoop-mapreduce-project/CHANGES.txt| 3 + .../TestClientProtocolProviderImpls.java| 71 ++-- 2 files changed, 25 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/9523b52d/hadoop-mapreduce-project/CHANGES.txt -- diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 031d256..1332cd7 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -134,6 +134,9 @@ Release 2.7.0 - UNRELEASED MAPREDUCE-6221. Stringifier is left unclosed in Chain#getChainElementConf(). (Ted Yu via ozawa) +MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure +conditions. (Devaraj K via ozawa) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/9523b52d/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java -- diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java index e71c038..6ad76e9 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java @@ -18,30 +18,22 @@ package org.apache.hadoop.mapreduce; -import java.io.IOException; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; -import junit.framework.TestCase; +import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.LocalJobRunner; +import org.apache.hadoop.mapred.YARNRunner; import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig; import org.junit.Test; -public class TestClientProtocolProviderImpls extends TestCase { +public class TestClientProtocolProviderImpls { @Test public void testClusterWithLocalClientProvider() throws Exception { - Configuration conf = new Configuration(); - -try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); -} catch (IOException e) { - -} - conf.set(MRConfig.FRAMEWORK_NAME, local); Cluster cluster = new Cluster(conf); assertTrue(cluster.getClient() instanceof LocalJobRunner); @@ -50,57 +42,38 @@ public class TestClientProtocolProviderImpls extends TestCase { @Test public void testClusterWithJTClientProvider() throws Exception { - Configuration conf = new Configuration(); try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); - -} catch (IOException e) { - -} - -try { conf.set(MRConfig.FRAMEWORK_NAME, classic); conf.set(JTConfig.JT_IPC_ADDRESS, local); new Cluster(conf); - fail(Cluster with classic Framework name shouldnot use local JT address); - + fail(Cluster with classic Framework name should not use + + local JT address); } catch (IOException e) { - + assertTrue(e.getMessage().contains( + Cannot initialize Cluster. Please check)); } + } -try { - conf = new Configuration(); - conf.set(MRConfig.FRAMEWORK_NAME, classic); - conf.set(JTConfig.JT_IPC_ADDRESS, 127.0.0.1:0); - Cluster cluster = new Cluster(conf); - cluster.close(); -
hadoop git commit: MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K.
Repository: hadoop Updated Branches: refs/heads/trunk 57db50cbe - 7c782047c MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure conditions. Contributed by Devaraj K. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7c782047 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7c782047 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7c782047 Branch: refs/heads/trunk Commit: 7c782047c609b29178945bd566a0d162e64dbfdb Parents: 57db50c Author: Tsuyoshi Ozawa oz...@apache.org Authored: Wed Feb 18 15:45:52 2015 +0900 Committer: Tsuyoshi Ozawa oz...@apache.org Committed: Wed Feb 18 15:45:52 2015 +0900 -- hadoop-mapreduce-project/CHANGES.txt| 3 + .../TestClientProtocolProviderImpls.java| 71 ++-- 2 files changed, 25 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c782047/hadoop-mapreduce-project/CHANGES.txt -- diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 50e067c..e944d82 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -376,6 +376,9 @@ Release 2.7.0 - UNRELEASED MAPREDUCE-6221. Stringifier is left unclosed in Chain#getChainElementConf(). (Ted Yu via ozawa) +MAPREDUCE-4286. TestClientProtocolProviderImpls passes on failure +conditions. (Devaraj K via ozawa) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c782047/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java -- diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java index e71c038..6ad76e9 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestClientProtocolProviderImpls.java @@ -18,30 +18,22 @@ package org.apache.hadoop.mapreduce; -import java.io.IOException; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; -import junit.framework.TestCase; +import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.LocalJobRunner; +import org.apache.hadoop.mapred.YARNRunner; import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig; import org.junit.Test; -public class TestClientProtocolProviderImpls extends TestCase { +public class TestClientProtocolProviderImpls { @Test public void testClusterWithLocalClientProvider() throws Exception { - Configuration conf = new Configuration(); - -try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); -} catch (IOException e) { - -} - conf.set(MRConfig.FRAMEWORK_NAME, local); Cluster cluster = new Cluster(conf); assertTrue(cluster.getClient() instanceof LocalJobRunner); @@ -50,57 +42,38 @@ public class TestClientProtocolProviderImpls extends TestCase { @Test public void testClusterWithJTClientProvider() throws Exception { - Configuration conf = new Configuration(); try { - conf.set(MRConfig.FRAMEWORK_NAME, incorrect); - new Cluster(conf); - fail(Cluster should not be initialized with incorrect framework name); - -} catch (IOException e) { - -} - -try { conf.set(MRConfig.FRAMEWORK_NAME, classic); conf.set(JTConfig.JT_IPC_ADDRESS, local); new Cluster(conf); - fail(Cluster with classic Framework name shouldnot use local JT address); - + fail(Cluster with classic Framework name should not use + + local JT address); } catch (IOException e) { - + assertTrue(e.getMessage().contains( + Cannot initialize Cluster. Please check)); } + } -try { - conf = new Configuration(); - conf.set(MRConfig.FRAMEWORK_NAME, classic); - conf.set(JTConfig.JT_IPC_ADDRESS, 127.0.0.1:0); - Cluster cluster = new Cluster(conf); - cluster.close(); -} catch (IOException e) { - -} + @Test + public void