ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-15331. AMS HBase FIFO compaction policy and Normalizer settings are not handled correctly. (Shantanu Mundkur via swagle)
Date Thu, 10 Mar 2016 03:25:38 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 98b2b238e -> 516690891


AMBARI-15331. AMS HBase FIFO compaction policy and Normalizer settings are not handled correctly.
(Shantanu Mundkur via swagle)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51669089
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51669089
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51669089

Branch: refs/heads/trunk
Commit: 5166908915fbef7b3e9cab2a5bfd17e44bfc1953
Parents: 98b2b23
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Wed Mar 9 19:25:25 2016 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Wed Mar 9 19:25:31 2016 -0800

----------------------------------------------------------------------
 .../conf/unix/ambari-metrics-collector                  | 12 ++++++------
 .../apache/ambari/server/upgrade/UpgradeCatalog220.java | 10 +++++-----
 .../AMBARI_METRICS/0.1.0/configuration/ams-env.xml      |  2 +-
 .../ambari/server/upgrade/UpgradeCatalog220Test.java    |  6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/51669089/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
index 64a7848..f75a8e5 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
+++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
@@ -36,12 +36,6 @@ METRIC_TABLES=(METRIC_AGGREGATE_DAILY METRIC_AGGREGATE_HOURLY METRIC_AGGREGATE_M
 METRIC_FIFO_COMPACTION_TABLES=(METRIC_AGGREGATE METRIC_RECORD METRIC_RECORD_MINUTE)
 METRIC_COLLECTOR=ambari-metrics-collector
 
-AMS_COLLECTOR_LOG_DIR=/var/log/ambari-metrics-collector
-
-AMS_HBASE_NORMALIZER_ENABLED=true
-AMS_HBASE_FIFO_COMPACTION_ENABLED=true
-AMS_HBASE_INIT_CHECK_ENABLED=true
-
 NORMALIZER_ENABLED_STUB_FILE=/var/run/ambari-metrics-collector/normalizer_enabled
 FIFO_ENABLED_STUB_FILE=/var/run/ambari-metrics-collector/fifo_enabled
 
@@ -376,6 +370,12 @@ else
   exit 1
 fi
 
+# set these env variables only if they were not set by ams-env.sh
+: ${AMS_COLLECTOR_LOG_DIR:=/var/log/ambari-metrics-collector}
+: ${AMS_HBASE_NORMALIZER_ENABLED:=true}
+: ${AMS_HBASE_FIFO_COMPACTION_ENABLED:=true}
+: ${AMS_HBASE_INIT_CHECK_ENABLED:=true}
+
 # set pid dir path
 if [[ -n "${AMS_COLLECTOR_PID_DIR}" ]]; then
   PIDFILE=${AMS_COLLECTOR_PID_DIR}/ambari-metrics-collector.pid

http://git-wip-us.apache.org/repos/asf/ambari/blob/51669089/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
index ac6b3c5..40dcd2f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
@@ -1216,16 +1216,16 @@ public class UpgradeCatalog220 extends AbstractUpgradeCatalog {
         "export AMS_COLLECTOR_OPTS=\"$AMS_COLLECTOR_OPTS $AMS_COLLECTOR_GC_OPTS\"\n";
     }
 
-    if (!content.contains("HBASE_NORMALIZATION_ENABLED")) {
+    if (!content.contains("AMS_HBASE_NORMALIZER_ENABLED")) {
       content += "\n" +
-        "# HBase compaction policy enabled\n" +
-        "export HBASE_NORMALIZATION_ENABLED={{ams_hbase_normalizer_enabled}}\n";
+        "# HBase normalizer enabled\n" +
+        "export AMS_HBASE_NORMALIZER_ENABLED={{ams_hbase_normalizer_enabled}}\n";
     }
 
-    if (!content.contains("HBASE_FIFO_COMPACTION_POLICY_ENABLED")) {
+    if (!content.contains("AMS_HBASE_FIFO_COMPACTION_ENABLED")) {
       content += "\n" +
         "# HBase compaction policy enabled\n" +
-        "export HBASE_FIFO_COMPACTION_POLICY_ENABLED={{ams_hbase_fifo_compaction_policy_enabled}}\n";
+        "export AMS_HBASE_FIFO_COMPACTION_ENABLED={{ams_hbase_fifo_compaction_enabled}}\n";
     }
 
     return content;

http://git-wip-us.apache.org/repos/asf/ambari/blob/51669089/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
index 78b8999..836e159 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
@@ -101,7 +101,7 @@ export AMS_HBASE_PID_DIR={{hbase_pid_dir}}
 # AMS Collector heapsize
 export AMS_COLLECTOR_HEAPSIZE={{metrics_collector_heapsize}}
 
-# HBase compaction policy enabled
+# HBase normalizer enabled
 export AMS_HBASE_NORMALIZER_ENABLED={{ams_hbase_normalizer_enabled}}
 
 # HBase compaction policy enabled

http://git-wip-us.apache.org/repos/asf/ambari/blob/51669089/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog220Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog220Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog220Test.java
index 8263001..99cabfa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog220Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog220Test.java
@@ -836,11 +836,11 @@ public class UpgradeCatalog220Test {
       "-Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +'%Y%m%d%H%M'`\"\n" +
       "export AMS_COLLECTOR_OPTS=\"$AMS_COLLECTOR_OPTS $AMS_COLLECTOR_GC_OPTS\"\n"+
       "\n" +
-      "# HBase compaction policy enabled\n" +
-      "export HBASE_NORMALIZATION_ENABLED={{ams_hbase_normalizer_enabled}}\n" +
+      "# HBase normalizer enabled\n" +
+      "export AMS_HBASE_NORMALIZER_ENABLED={{ams_hbase_normalizer_enabled}}\n" +
       "\n" +
       "# HBase compaction policy enabled\n" +
-      "export HBASE_FIFO_COMPACTION_POLICY_ENABLED={{ams_hbase_fifo_compaction_policy_enabled}}\n";
+      "export AMS_HBASE_FIFO_COMPACTION_ENABLED={{ams_hbase_fifo_compaction_enabled}}\n";
 
     String result = (String) updateAmsEnvContent.invoke(upgradeCatalog220, oldContent);
     Assert.assertEquals(expectedContent, result);


Mime
View raw message