AMBARI-24340 : AMS Migration tools should auto-detect whitelist file. (#1868)
authoravijayanhwx <avijayan@hortonworks.com>
Tue, 24 Jul 2018 20:44:41 +0000 (13:44 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Jul 2018 20:44:41 +0000 (13:44 -0700)
ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/upgrade/core/MetricsDataMigrationLauncher.java

index 5c4ee4e..1dd380c 100644 (file)
@@ -105,12 +105,9 @@ public class MetricsDataMigrationLauncher {
 
     if (whitelistedFilePath != null) {
       this.metricNames = readMetricWhitelistFromFile(whitelistedFilePath);
-    } else if (timelineMetricConfiguration.isWhitelistingEnabled()) {
+    } else {
       String whitelistFile = timelineMetricConfiguration.getMetricsConf().get(TimelineMetricConfiguration.TIMELINE_METRICS_WHITELIST_FILE, TimelineMetricConfiguration.TIMELINE_METRICS_WHITELIST_FILE_LOCATION_DEFAULT);
       metricNames = readMetricWhitelistFromFile(whitelistFile);
-    } else {
-      LOG.error("No whitelisted metrics specified. Exiting...");
-      throw new Exception("List of whitelisted metrics must be provided");
     }
 
     readProcessedMetricsMap();