You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2015/09/15 02:46:53 UTC

ambari git commit: AMBARI-13039. Optimize precision table Region split policy for AMS. Issue with property updates. (swagle)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 b21cd67d6 -> c20d89cde


AMBARI-13039. Optimize precision table Region split policy for AMS. Issue with property updates. (swagle)


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

Branch: refs/heads/branch-2.1
Commit: c20d89cde9afb74cc143c0946672044405c45857
Parents: b21cd67
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Mon Sep 14 17:41:00 2015 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Mon Sep 14 17:41:09 2015 -0700

----------------------------------------------------------------------
 .../0.1.0/configuration/ams-site.xml            | 38 +++++++++++++++++++-
 .../0.1.0/package/scripts/split_points.py       |  3 +-
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 20 +++++++++--
 3 files changed, 56 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c20d89cd/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 5c7a39b..f2970f1 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
@@ -333,6 +333,24 @@
       Pre-split regions using the split points corresponding to this property
       for the precision table that stores seconds aggregate data.
     </description>
+    <depends-on>
+      <property>
+        <type>ams-hbase-site</type>
+        <name>hbase.regionserver.global.memstore.upperLimit</name>
+      </property>
+      <property>
+        <type>ams-hbase-site</type>
+        <name>hbase.hregion.memstore.flush.size</name>
+      </property>
+      <property>
+        <type>ams-hbase-env</type>
+        <name>hbase_master_heapsize</name>
+      </property>
+      <property>
+        <type>ams-hbase-env</type>
+        <name>hbase_regionserver_heapsize</name>
+      </property>
+    </depends-on>
   </property>
   <property>
     <name>timeline.metrics.cluster.aggregate.splitpoints</name>
@@ -341,6 +359,24 @@
       Pre-split regions using the split points corresponding to this property
       for the aggregate table that stores seconds aggregate data across hosts.
     </description>
+    <depends-on>
+      <property>
+        <type>ams-hbase-site</type>
+        <name>hbase.regionserver.global.memstore.upperLimit</name>
+      </property>
+      <property>
+        <type>ams-hbase-site</type>
+        <name>hbase.hregion.memstore.flush.size</name>
+      </property>
+      <property>
+        <type>ams-hbase-env</type>
+        <name>hbase_master_heapsize</name>
+      </property>
+      <property>
+        <type>ams-hbase-env</type>
+        <name>hbase_regionserver_heapsize</name>
+      </property>
+    </depends-on>
   </property>
 
   <property>
@@ -348,7 +384,7 @@
     <value>60</value>
     <description>
       Time in seconds to sleep before report metrics to collector.
-      Default resolution is 1 minutes.
+      Default resolution is 1 minute.
     </description>
   </property>
   <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c20d89cd/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/split_points.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/split_points.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/split_points.py
index 6160712..b8b38f9 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/split_points.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/split_points.py
@@ -158,7 +158,8 @@ class FindSplitPointsForAMSRegions():
 
 def main(argv = None):
   scriptDir = os.path.realpath(os.path.dirname(argv[0]))
-  serviceMetricsDir = os.path.join(scriptDir, 'service-metrics')
+  serviceMetricsDir = os.path.join(scriptDir, os.pardir, 'files', 'service-metrics')
+  print 'serviceMetricsDir: %s' % serviceMetricsDir
   if os.path.exists(serviceMetricsDir):
     onlyargs = argv[1:]
     if len(onlyargs) < 3:

http://git-wip-us.apache.org/repos/asf/ambari/blob/c20d89cd/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 c83dd47..52dcfbd 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
@@ -372,10 +372,24 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
 
     from split_points import FindSplitPointsForAMSRegions
+
+    ams_hbase_site = None
+    ams_hbase_env = None
+
+    # Overriden properties form the UI
+    if "ams-hbase-site" in services["configurations"]:
+      ams_hbase_site = services["configurations"]["ams-hbase-site"]["properties"]
+    if "ams-hbase-env" in services["configurations"]:
+       ams_hbase_env = services["configurations"]["ams-hbase-env"]["properties"]
+
+    # Recommendations
+    if not ams_hbase_site:
+      ams_hbase_site = configurations["ams-hbase-site"]["properties"]
+    if not ams_hbase_env:
+      ams_hbase_env = configurations["ams-hbase-env"]["properties"]
+
     split_point_finder = FindSplitPointsForAMSRegions(
-      configurations["ams-hbase-site"]["properties"],
-      configurations["ams-hbase-env"]["properties"],
-      serviceMetricsDir, mode, servicesList)
+      ams_hbase_site, ams_hbase_env, serviceMetricsDir, mode, servicesList)
 
     result = split_point_finder.get_split_points()
     precision_splits = ' '