ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: AMBARI-18093 : Reduce TTL for high precision tables in AMS. (avijayan)
Date Fri, 12 Aug 2016 14:57:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 25506aeb5 -> fd7dbd3b2


AMBARI-18093 : Reduce TTL for high precision tables in AMS. (avijayan)


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

Branch: refs/heads/trunk
Commit: fd7dbd3b26449182a37bea924b619cfa728452c8
Parents: 25506ae
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Fri Aug 12 07:57:35 2016 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Fri Aug 12 07:57:35 2016 -0700

----------------------------------------------------------------------
 .../ambari/server/upgrade/UpgradeCatalog240.java     | 15 +++++++++++++++
 .../AMBARI_METRICS/0.1.0/configuration/ams-site.xml  |  6 +++---
 .../stacks/HDP/2.0.6/services/stack_advisor.py       |  2 --
 .../ambari/server/upgrade/UpgradeCatalog240Test.java |  4 ++++
 .../python/stacks/2.2/common/test_stack_advisor.py   |  2 --
 5 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fd7dbd3b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
index 722bb80..cc07089 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
@@ -196,6 +196,8 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
   private static final String AMS_HBASE_SITE = "ams-hbase-site";
   private static final String HBASE_RPC_TIMEOUT_PROPERTY = "hbase.rpc.timeout";
   private static final String AMS_HBASE_SITE_NORMALIZER_ENABLED_PROPERTY = "hbase.normalizer.enabled";
+  public static final String PRECISION_TABLE_TTL_PROPERTY = "timeline.metrics.host.aggregator.ttl";
+  public static final String CLUSTER_SECOND_TABLE_TTL_PROPERTY = "timeline.metrics.cluster.aggregator.second.ttl";
 
   static {
     // Manually create role order since there really isn't any mechanism for this
@@ -2023,6 +2025,19 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
               newProperties.put(TIMELINE_METRICS_SINK_COLLECTION_PERIOD, "10");
               LOG.info("Setting value of " + TIMELINE_METRICS_SINK_COLLECTION_PERIOD + "
: 10");
             }
+
+            if (amsSiteProperties.containsKey(PRECISION_TABLE_TTL_PROPERTY) &&
+              !amsSiteProperties.get(PRECISION_TABLE_TTL_PROPERTY).equals("86400")) {
+              newProperties.put(PRECISION_TABLE_TTL_PROPERTY, String.valueOf(86400));
+              LOG.info("Setting value of " + PRECISION_TABLE_TTL_PROPERTY + " : " + 86400);
+            }
+
+            if (amsSiteProperties.containsKey(CLUSTER_SECOND_TABLE_TTL_PROPERTY) &&
+              !amsSiteProperties.get(CLUSTER_SECOND_TABLE_TTL_PROPERTY).equals("259200"))
{
+              newProperties.put(CLUSTER_SECOND_TABLE_TTL_PROPERTY, String.valueOf(259200));
+              LOG.info("Setting value of " + CLUSTER_SECOND_TABLE_TTL_PROPERTY + " : " +
259200);
+            }
+
             updateConfigurationPropertiesForCluster(cluster, AMS_SITE, newProperties, true,
true);
           }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fd7dbd3b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
index 871e571..c02df71 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
@@ -359,9 +359,9 @@
   </property>
   <property>
     <name>timeline.metrics.cluster.aggregator.second.ttl</name>
-    <value>604800</value>
+    <value>259200</value>
     <description>
-      Cluster wide second resolution data purge interval in seconds. Default is 7 days.
+      Cluster wide second resolution data purge interval in seconds. Default is 3 days.
     </description>
     <value-attributes>
       <type>int</type>
@@ -405,7 +405,7 @@
     <name>timeline.metrics.host.aggregator.ttl</name>
     <value>86400</value>
     <description>
-      1 minute resolution data purge interval in seconds. Default is 1 day for embedded mode
and 3 days for Distributed mode.
+      1 minute resolution data purge interval in seconds. Default is 1 day.
     </description>
     <value-attributes>
       <type>int</type>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fd7dbd3b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 71dd280..7133c27 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -606,11 +606,9 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
     if operatingMode == "distributed":
       putAmsSiteProperty("timeline.metrics.service.watcher.disabled", 'true')
-      putAmsSiteProperty("timeline.metrics.host.aggregator.ttl", 259200)
       putAmsHbaseSiteProperty("hbase.cluster.distributed", 'true')
     else:
       putAmsSiteProperty("timeline.metrics.service.watcher.disabled", 'false')
-      putAmsSiteProperty("timeline.metrics.host.aggregator.ttl", 86400)
       putAmsHbaseSiteProperty("hbase.cluster.distributed", 'false')
 
     rootDir = "file:///var/lib/ambari-metrics-collector/hbase"

http://git-wip-us.apache.org/repos/asf/ambari/blob/fd7dbd3b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
index 5840750..854ce7d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
@@ -1298,11 +1298,15 @@ public class UpgradeCatalog240Test {
     Map<String, String> oldPropertiesAmsSite = new HashMap<String, String>()
{
       {
         put("timeline.metrics.sink.collection.period", "60");
+        put("timeline.metrics.host.aggregator.ttl", "86400");
+        put("timeline.metrics.cluster.aggregator.second.ttl", "604800");
       }
     };
     Map<String, String> newPropertiesAmsSite = new HashMap<String, String>()
{
       {
         put("timeline.metrics.sink.collection.period", "10");
+        put("timeline.metrics.host.aggregator.ttl", "86400");
+        put("timeline.metrics.cluster.aggregator.second.ttl", "259200");
       }
     };
     EasyMockSupport easyMockSupport = new EasyMockSupport();

http://git-wip-us.apache.org/repos/asf/ambari/blob/fd7dbd3b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 75060f4..081a66a 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -2292,7 +2292,6 @@ class TestHDP22StackAdvisor(TestCase):
         "properties": {
           "timeline.metrics.cluster.aggregate.splitpoints": "master.FileSystem.MetaHlogSplitTime_75th_percentile",
           "timeline.metrics.host.aggregate.splitpoints": "master.FileSystem.MetaHlogSplitTime_75th_percentile",
-          "timeline.metrics.host.aggregator.ttl": "86400",
           "timeline.metrics.service.handler.thread.count": "20",
           'timeline.metrics.service.webapp.address': 'host1:6188',
           'timeline.metrics.service.watcher.disabled': 'false',
@@ -2485,7 +2484,6 @@ class TestHDP22StackAdvisor(TestCase):
     expected['ams-hbase-env']['properties']['hbase_regionserver_heapsize'] = '512'
     expected["ams-hbase-env"]['properties']['hbase_master_xmn_size'] = '102'
     expected['ams-hbase-env']['properties']['regionserver_xmn_size'] = '384'
-    expected['ams-site']['properties']['timeline.metrics.host.aggregator.ttl'] = '259200'
     expected['ams-site']['properties']['timeline.metrics.service.watcher.disabled'] = 'true'
     self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)


Mime
View raw message