Prechádzať zdrojové kódy

Revert "AMBARI-10475. BE: Extend stack-advisor to recommend property_value_attributes for HBase (mpapirkovskyy via srimanth)"
Breaks HDP 2.3 install.
This reverts commit 7b468d04ad5bff3b59ee6706d741000c792a7878.

Yusaku Sako 10 rokov pred
rodič
commit
a58352b742

+ 2 - 2
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml

@@ -41,7 +41,7 @@
       <minimum>1024</minimum>
       <maximum>6554</maximum>
       <unit>MB</unit>
-      <increment-step>256</increment-step>
+      <increment-step>250</increment-step>
     </value-attributes>
   </property>
   <property>
@@ -68,7 +68,7 @@ and the -Xmn ratio (hbase_regionserver_xmn_ratio) exceeds this value.
       <minimum>1024</minimum>
       <maximum>16384</maximum>
       <unit>MB</unit>
-      <increment-step>256</increment-step>
+      <increment-step>250</increment-step>
     </value-attributes>
   </property>
    <property>

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py

@@ -113,7 +113,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     if configType not in config:
       config[configType] = {}
     def appendPropertyAttribute(key, attribute, attributeValue):
-      if "property_attributes" not in config[configType]:
+      if"property_attributes" not in config[configType]:
         config[configType]["property_attributes"] = {}
       if key not in config[configType]["property_attributes"]:
         config[configType]["property_attributes"][key] = {}
@@ -147,7 +147,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     putHDFSProperty('namenode_opt_maxnewsize', max(int(clusterData['totalAvailableRam'] / 8), 256))
 
   def recommendHbaseEnvConfigurations(self, configurations, clusterData, services, hosts):
-    putHbaseProperty = self.putProperty(configurations, "hbase-env", services)
+    putHbaseProperty = self.putProperty(configurations, "hbase-env")
     putHbaseProperty('hbase_regionserver_heapsize', int(clusterData['hbaseRam']) * 1024)
     putHbaseProperty('hbase_master_heapsize', int(clusterData['hbaseRam']) * 1024)
 

+ 5 - 16
ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py

@@ -125,18 +125,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
   def recommendHBASEConfigurations(self, configurations, clusterData, services, hosts):
     super(HDP22StackAdvisor, self).recommendHbaseEnvConfigurations(configurations, clusterData, services, hosts)
-    putHbaseEnvPropertyAttributes = self.putPropertyAttribute(configurations, "hbase-env", services)
-
-    rs_hosts = self.getHostsWithComponent("HBASE", "HBASE_REGIONSERVER", services, hosts)
-    if rs_hosts is not None and len(rs_hosts) > 0:
-      min_ram = rs_hosts[0]["Hosts"]["total_mem"]
-      for host in rs_hosts["items"]:
-        host_ram = host["Hosts"]["total_mem"]
-        min_ram = min(min_ram, host_ram)
-
-      putHbaseEnvPropertyAttributes('hbase_regionserver_heapsize', 'max', max(1024, int(min_ram*0.8/1024)))
-
-    putHbaseSiteProperty = self.putProperty(configurations, "hbase-site", services)
+    putHbaseSiteProperty = self.putProperty(configurations, "hbase-site")
     putHbaseSiteProperty("hbase.regionserver.global.memstore.upperLimit", '0.4')
 
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
@@ -165,7 +154,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       hbase_bucketcache_percentage_in_combinedcache_str = "{0:.4f}".format(math.ceil(hbase_bucketcache_percentage_in_combinedcache * 10000) / 10000.0)
 
       # Set values in hbase-site
-      putHbaseProperty = self.putProperty(configurations, "hbase-site", services)
+      putHbaseProperty = self.putProperty(configurations, "hbase-site")
       putHbaseProperty('hfile.block.cache.size', hfile_block_cache_size)
       putHbaseProperty('hbase.regionserver.global.memstore.upperLimit', hbase_regionserver_global_memstore_size)
       putHbaseProperty('hbase.bucketcache.ioengine', 'offheap')
@@ -173,17 +162,17 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       putHbaseProperty('hbase.bucketcache.percentage.in.combinedcache', hbase_bucketcache_percentage_in_combinedcache_str)
 
       # Enable in hbase-env
-      putHbaseEnvProperty = self.putProperty(configurations, "hbase-env", services)
+      putHbaseEnvProperty = self.putProperty(configurations, "hbase-env")
       putHbaseEnvProperty('hbase_max_direct_memory_size', regionserver_max_direct_memory_size)
       putHbaseEnvProperty('hbase_regionserver_heapsize', regionserver_heap_size)
     else:
       # Disable
-      putHbaseProperty = self.putProperty(configurations, "hbase-site", services)
+      putHbaseProperty = self.putProperty(configurations, "hbase-site")
       putHbaseProperty('hbase.bucketcache.ioengine', '')
       putHbaseProperty('hbase.bucketcache.size', '')
       putHbaseProperty('hbase.bucketcache.percentage.in.combinedcache', '')
 
-      putHbaseEnvProperty = self.putProperty(configurations, "hbase-env", services)
+      putHbaseEnvProperty = self.putProperty(configurations, "hbase-env")
       putHbaseEnvProperty('hbase_max_direct_memory_size', '')