Revert "YARN-5921. Incorrect synchronization in RMContextImpl#setHAServiceState/getHAServiceState. Contributed by Varun Saxena."
This reverts commit 9f2960be19aa9c07c6b247bfec576c6b8e5f89bd. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e2f77ca7 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e2f77ca7 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e2f77ca7 Branch: refs/heads/HADOOP-13345 Commit: e2f77ca77b80e3c5c7968301f6dc9b9273cded5d Parents: 9f2960b Author: Naganarasimha <[email protected]> Authored: Sun Nov 27 23:32:59 2016 +0530 Committer: Naganarasimha <[email protected]> Committed: Sun Nov 27 23:32:59 2016 +0530 ---------------------------------------------------------------------- .../TestTimelineReaderWebServicesHBaseStorage.java | 2 +- .../timelineservice/storage/DataGeneratorForTest.java | 4 ++-- .../storage/TestHBaseTimelineStorageApps.java | 8 ++++---- .../storage/TestHBaseTimelineStorageEntities.java | 6 +++--- .../storage/flow/TestHBaseStorageFlowActivity.java | 6 +++--- .../storage/flow/TestHBaseStorageFlowRun.java | 14 +++++++------- .../flow/TestHBaseStorageFlowRunCompaction.java | 2 +- .../storage/HBaseTimelineWriterImpl.java | 5 +++++ 8 files changed, 26 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java index 17c01b5..2ed5d96 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java @@ -334,7 +334,7 @@ public class TestTimelineReaderWebServicesHBaseStorage { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, entity.getId(), te); hbi.write(cluster, user, flow, flowVersion, runid, entity1.getId(), te1); http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/DataGeneratorForTest.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/DataGeneratorForTest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/DataGeneratorForTest.java index 5cbb781..0938e9e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/DataGeneratorForTest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/DataGeneratorForTest.java @@ -182,7 +182,7 @@ final class DataGeneratorForTest { te2.addEntity(entity2); HBaseTimelineWriterImpl hbi = null; try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(util.getConfiguration()); hbi.init(util.getConfiguration()); hbi.start(); String cluster = "cluster1"; @@ -360,7 +360,7 @@ final class DataGeneratorForTest { te.addEntity(entity2); HBaseTimelineWriterImpl hbi = null; try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(util.getConfiguration()); hbi.init(util.getConfiguration()); hbi.start(); String cluster = "cluster1"; http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageApps.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageApps.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageApps.java index b3e5197..e70198a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageApps.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageApps.java @@ -155,7 +155,7 @@ public class TestHBaseTimelineStorageApps { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "cluster_check_null_application"; @@ -275,7 +275,7 @@ public class TestHBaseTimelineStorageApps { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "cluster_test_write_app"; @@ -502,7 +502,7 @@ public class TestHBaseTimelineStorageApps { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "cluster_test_events"; @@ -620,7 +620,7 @@ public class TestHBaseTimelineStorageApps { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); // Writing application entity. http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageEntities.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageEntities.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageEntities.java index 4b4c3e1..3076709 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageEntities.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorageEntities.java @@ -194,7 +194,7 @@ public class TestHBaseTimelineStorageEntities { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "cluster_test_write_entity"; @@ -391,7 +391,7 @@ public class TestHBaseTimelineStorageEntities { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "cluster_test_empty_eventkey"; @@ -496,7 +496,7 @@ public class TestHBaseTimelineStorageEntities { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.start(); String cluster = "clus!ter_\ttest_ev ents"; http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowActivity.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowActivity.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowActivity.java index 3ddb230..1906574 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowActivity.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowActivity.java @@ -119,7 +119,7 @@ public class TestHBaseStorageFlowActivity { .getEntityMinStartTime(minStartTs); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -228,7 +228,7 @@ public class TestHBaseStorageFlowActivity { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); String appName = "application_1111999999_1234"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -341,7 +341,7 @@ public class TestHBaseStorageFlowActivity { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); String appName = "application_11888888888_1111"; hbi.write(cluster, user, flow, flowVersion1, runid1, appName, te); http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRun.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRun.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRun.java index 377611f..74b9e50 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRun.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRun.java @@ -184,7 +184,7 @@ public class TestHBaseStorageFlowRun { .getEntityMinStartTime(minStartTs); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -290,7 +290,7 @@ public class TestHBaseStorageFlowRun { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -559,7 +559,7 @@ public class TestHBaseStorageFlowRun { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, 1002345678919L, appName, te); @@ -644,7 +644,7 @@ public class TestHBaseStorageFlowRun { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -737,7 +737,7 @@ public class TestHBaseStorageFlowRun { TimelineEntity entityApp1 = null; TimelineEntity entityApp2 = null; try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); for (int i = start; i < count; i++) { @@ -826,7 +826,7 @@ public class TestHBaseStorageFlowRun { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.write(cluster, user, flow, "CF7022C10F1354", 1002345678919L, "application_11111111111111_1111", te); @@ -908,7 +908,7 @@ public class TestHBaseStorageFlowRun { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); hbi.write(cluster, user, flow, "CF7022C10F1354", 1002345678919L, "application_11111111111111_1111", te); http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRunCompaction.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRunCompaction.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRunCompaction.java index 756d57b..3094088 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRunCompaction.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/TestHBaseStorageFlowRunCompaction.java @@ -287,7 +287,7 @@ public class TestHBaseStorageFlowRunCompaction { TimelineEntities te1 = null; TimelineEntity entityApp1 = null; try { - hbi = new HBaseTimelineWriterImpl(); + hbi = new HBaseTimelineWriterImpl(c1); hbi.init(c1); // now insert count * ( 100 + 100) metrics // each call to getEntityMetricsApp1 brings back 100 values http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2f77ca7/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java index b94b85f..3511a2f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java @@ -101,6 +101,11 @@ public class HBaseTimelineWriterImpl extends AbstractService implements super(HBaseTimelineWriterImpl.class.getName()); } + public HBaseTimelineWriterImpl(Configuration conf) throws IOException { + super(conf.get("yarn.application.id", + HBaseTimelineWriterImpl.class.getName())); + } + /** * initializes the hbase connection to write to the entity table. */ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
