You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/04/28 20:58:56 UTC

ambari git commit: AMBARI-10803. Phoenix related config parameters should only be generated when phoenix_sql_enabled is true

Repository: ambari
Updated Branches:
  refs/heads/trunk 8a1f93d47 -> c404871b5


AMBARI-10803. Phoenix related config parameters should only be generated when phoenix_sql_enabled is true


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

Branch: refs/heads/trunk
Commit: c404871b54e7b0dfdaada9c46d2aded4b86eef43
Parents: 8a1f93d
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Tue Apr 28 11:42:54 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Tue Apr 28 11:42:54 2015 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/stack_advisor.py    |  5 +++++
 .../services/HBASE/configuration/hbase-site.xml | 22 --------------------
 .../stacks/2.2/common/test_stack_advisor.py     |  3 +++
 3 files changed, 8 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c404871b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 468b27d..3ea58d5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -363,13 +363,18 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       putHbaseEnvPropertyAttributes('hbase_regionserver_heapsize', 'maximum', max(1024, int(min_ram*0.8/1024)))
 
     putHbaseSiteProperty = self.putProperty(configurations, "hbase-site", services)
+    putHbaseSitePropertyAttributes = self.putPropertyAttribute(configurations, "hbase-site")
     putHbaseSiteProperty("hbase.regionserver.global.memstore.upperLimit", '0.4')
 
     if 'hbase-env' in services['configurations'] and 'phoenix_sql_enabled' in services['configurations']['hbase-env']['properties']:
       if 'true' == services['configurations']['hbase-env']['properties']['phoenix_sql_enabled'].lower():
+        putHbaseSiteProperty("hbase.regionserver.rpc.scheduler.factory.class", "org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory")
+        putHbaseSiteProperty("hbase.rpc.controllerfactory.class", "org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory")
         putHbaseSiteProperty("hbase.regionserver.wal.codec", 'org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec')
       else:
         putHbaseSiteProperty("hbase.regionserver.wal.codec", 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec')
+        putHbaseSitePropertyAttributes('hbase.regionserver.rpc.scheduler.factory.class', 'delete', 'true')
+        putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true')
 
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
     if 'ranger-hbase-plugin-properties' in services['configurations'] and ('ranger-hbase-plugin-enabled' in services['configurations']['ranger-hbase-plugin-properties']['properties']):

http://git-wip-us.apache.org/repos/asf/ambari/blob/c404871b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
index c92f76e..43f872a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/configuration/hbase-site.xml
@@ -40,26 +40,4 @@
     <value>16030</value>
     <description>The port for the HBase RegionServer web UI.</description>
   </property> 
-  <property>
-    <name>hbase.regionserver.rpc.scheduler.factory.class</name>
-    <display-name>RegionServer RPC scheduler factory class</display-name>
-    <value>org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory</value>
-    <depends-on>
-      <property>
-        <type>hbase-env</type>
-        <name>phoenix_sql_enabled</name>
-      </property>
-    </depends-on>
-  </property>
-  <property>
-    <name>hbase.rpc.controllerfactory.class</name>
-    <display-name>RPC controller factory class</display-name>
-    <value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value>
-    <depends-on>
-      <property>
-        <type>hbase-env</type>
-        <name>phoenix_sql_enabled</name>
-      </property>
-    </depends-on>
-  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c404871b/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 3948b2e..cfab581 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
@@ -1406,6 +1406,8 @@ class TestHDP22StackAdvisor(TestCase):
       "hbase-site": {
         "properties": {
           "hbase.regionserver.wal.codec": "org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec",
+          "hbase.regionserver.rpc.scheduler.factory.class": "org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory",
+          "hbase.rpc.controllerfactory.class": "org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory",
           "hbase.bucketcache.size": "",
           "hbase.bucketcache.percentage.in.combinedcache": "",
           "hbase.regionserver.global.memstore.upperLimit": "0.4",
@@ -1431,6 +1433,7 @@ class TestHDP22StackAdvisor(TestCase):
     # Test when phoenix_sql_enabled = false
     services['configurations']['hbase-env']['properties']['phoenix_sql_enabled'] = 'false'
     expected['hbase-site']['properties']['hbase.regionserver.wal.codec'] = 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec'
+    expected['hbase-site']['property_attributes'] = {'hbase.regionserver.rpc.scheduler.factory.class': {'delete': 'true'}, 'hbase.rpc.controllerfactory.class': {'delete': 'true'}}
     self.stackAdvisor.recommendHBASEConfigurations(configurations, clusterData, services, None)
     self.assertEquals(configurations, expected)