From a5371f6b6e57a83b6f3a02d4a55b63683f03328b Mon Sep 17 00:00:00 2001 From: Naganarasimha Date: Sun, 27 Nov 2016 23:35:53 +0530 Subject: [PATCH] YARN-5572. HBaseTimelineWriterImpl appears to reference a bad property name. Contributed by Varun Saxena. (cherry picked from commit c06114d6a360dddeb66c2dd9ad4fa5dae0cfbfb1) --- .../TestTimelineReaderWebServicesHBaseStorage.java | 2 +- .../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, 21 insertions(+), 26 deletions(-) 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 e97ea5b04f5..6bbafe339ba 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 @@ private static void loadData() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, entity.getId(), te); hbi.write(cluster, user, flow, flowVersion, runid, entity1.getId(), te1); 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 b56a7523130..cafacab1d66 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 @@ -183,7 +183,7 @@ static void loadApps(HBaseTestingUtility util) throws IOException { te2.addEntity(entity2); HBaseTimelineWriterImpl hbi = null; try { - hbi = new HBaseTimelineWriterImpl(util.getConfiguration()); + hbi = new HBaseTimelineWriterImpl(); hbi.init(util.getConfiguration()); hbi.start(); String cluster = "cluster1"; @@ -401,7 +401,7 @@ static void loadEntities(HBaseTestingUtility util) throws IOException { HBaseTimelineWriterImpl hbi = null; try { - hbi = new HBaseTimelineWriterImpl(util.getConfiguration()); + hbi = new HBaseTimelineWriterImpl(); hbi.init(util.getConfiguration()); hbi.start(); String cluster = "cluster1"; 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 e70198a34f9..b3e5197ddff 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 void testWriteNullApplicationToHBase() throws Exception { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "cluster_check_null_application"; @@ -275,7 +275,7 @@ public void testWriteApplicationToHBase() throws Exception { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "cluster_test_write_app"; @@ -502,7 +502,7 @@ public void testEvents() throws IOException { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "cluster_test_events"; @@ -620,7 +620,7 @@ public void testNonIntegralMetricValues() throws IOException { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); // Writing application entity. 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 9b35ef3bda2..d9ec5b48681 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 void testWriteEntityToHBase() throws Exception { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "cluster_test_write_entity"; @@ -391,7 +391,7 @@ public void testEventsWithEmptyInfo() throws IOException { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "cluster_test_empty_eventkey"; @@ -496,7 +496,7 @@ public void testEventsEscapeTs() throws IOException { HBaseTimelineWriterImpl hbi = null; try { Configuration c1 = util.getConfiguration(); - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.start(); String cluster = "clus!ter_\ttest_ev ents"; 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 1db0649e0ed..8f073dc40c2 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 void testWriteFlowRunMinMax() throws Exception { .getEntityMinStartTime(minStartTs); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -229,7 +229,7 @@ public void testWriteFlowActivityOneFlow() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); String appName = "application_1111999999_1234"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -343,7 +343,7 @@ public void testFlowActivityTableOneFlowMultipleRunIds() throws IOException { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); String appName = "application_11888888888_1111"; hbi.write(cluster, user, flow, flowVersion1, runid1, appName, te); 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 c066a1f85f6..00fee69c527 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 @@ -183,7 +183,7 @@ public void testWriteFlowRunMinMax() throws Exception { .getEntityMinStartTime(minStartTs); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -289,7 +289,7 @@ public void testWriteFlowRunMetricsOneFlow() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -558,7 +558,7 @@ public void testWriteFlowRunMetricsPrefix() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, 1002345678919L, appName, te); @@ -643,7 +643,7 @@ public void testWriteFlowRunsMetricFields() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); String appName = "application_11111111111111_1111"; hbi.write(cluster, user, flow, flowVersion, runid, appName, te); @@ -736,7 +736,7 @@ public void testWriteFlowRunFlush() throws Exception { TimelineEntity entityApp1 = null; TimelineEntity entityApp2 = null; try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); for (int i = start; i < count; i++) { @@ -825,7 +825,7 @@ public void testFilterFlowRunsByCreatedTime() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.write(cluster, user, flow, "CF7022C10F1354", 1002345678919L, "application_11111111111111_1111", te); @@ -907,7 +907,7 @@ public void testMetricFilters() throws Exception { HBaseTimelineWriterImpl hbi = null; Configuration c1 = util.getConfiguration(); try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); hbi.write(cluster, user, flow, "CF7022C10F1354", 1002345678919L, "application_11111111111111_1111", te); 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 5fe8b1bacb9..965fc5077ec 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 @@ -285,7 +285,7 @@ public void testWriteFlowRunCompaction() throws Exception { TimelineEntities te1 = null; TimelineEntity entityApp1 = null; try { - hbi = new HBaseTimelineWriterImpl(c1); + hbi = new HBaseTimelineWriterImpl(); hbi.init(c1); // now insert count * ( 100 + 100) metrics // each call to getEntityMetricsApp1 brings back 100 values 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 df1e4604bdf..1f41aaa5873 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,11 +101,6 @@ public HBaseTimelineWriterImpl() { 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. */