浏览代码

AMBARI-4696. Deprecation warnings show up in stderr because of using
sets in Ganglia (aonishuk)

Andrew Onischuk 11 年之前
父节点
当前提交
ef1e7a232c

+ 8 - 9
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py

@@ -18,7 +18,6 @@ limitations under the License.
 
 from resource_management import *
 from resource_management.core.system import System
-from sets import Set
 
 config = Script.get_config()
 
@@ -38,15 +37,15 @@ rrdcached_base_dir = config['configurations']['global']["rrdcached_base_dir"]
 ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0]
 
 hostname = config["hostname"]
-namenode_host = Set(default("/clusterHostInfo/namenode_host", []))
-jtnode_host = Set(default("/clusterHostInfo/jtnode_host", []))
-hs_host = Set(default("/clusterHostInfo/hs_host", []))
-hbase_master_hosts = Set(default("/clusterHostInfo/hbase_master_hosts", []))
+namenode_host = set(default("/clusterHostInfo/namenode_host", []))
+jtnode_host = set(default("/clusterHostInfo/jtnode_host", []))
+hs_host = set(default("/clusterHostInfo/hs_host", []))
+hbase_master_hosts = set(default("/clusterHostInfo/hbase_master_hosts", []))
 # datanodes are marked as slave_hosts
-slave_hosts = Set(default("/clusterHostInfo/slave_hosts", []))
-tt_hosts = Set(default("/clusterHostInfo/mapred_tt_hosts", []))
-hbase_rs_hosts = Set(default("/clusterHostInfo/hbase_rs_hosts", []))
-flume_hosts = Set(default("/clusterHostInfo/flume_hosts", []))
+slave_hosts = set(default("/clusterHostInfo/slave_hosts", []))
+tt_hosts = set(default("/clusterHostInfo/mapred_tt_hosts", []))
+hbase_rs_hosts = set(default("/clusterHostInfo/hbase_rs_hosts", []))
+flume_hosts = set(default("/clusterHostInfo/flume_hosts", []))
 
 pure_slave = not hostname in (namenode_host | jtnode_host | hs_host | hbase_master_hosts | slave_hosts | tt_hosts | hbase_rs_hosts | flume_hosts)
 is_namenode_master = hostname in namenode_host

+ 13 - 14
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py

@@ -18,7 +18,6 @@ limitations under the License.
 
 from resource_management import *
 from resource_management.core.system import System
-from sets import Set
 
 config = Script.get_config()
 
@@ -38,20 +37,20 @@ rrdcached_base_dir = config['configurations']['global']["rrdcached_base_dir"]
 ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0]
 
 hostname = config["hostname"]
-namenode_host = Set(default("/clusterHostInfo/namenode_host", []))
-jtnode_host = Set(default("/clusterHostInfo/jtnode_host", []))
-rm_host = Set(default("/clusterHostInfo/rm_host", []))
-hs_host = Set(default("/clusterHostInfo/hs_host", []))
-hbase_master_hosts = Set(default("/clusterHostInfo/hbase_master_hosts", []))
+namenode_host = set(default("/clusterHostInfo/namenode_host", []))
+jtnode_host = set(default("/clusterHostInfo/jtnode_host", []))
+rm_host = set(default("/clusterHostInfo/rm_host", []))
+hs_host = set(default("/clusterHostInfo/hs_host", []))
+hbase_master_hosts = set(default("/clusterHostInfo/hbase_master_hosts", []))
 # datanodes are marked as slave_hosts
-slave_hosts = Set(default("/clusterHostInfo/slave_hosts", []))
-tt_hosts = Set(default("/clusterHostInfo/mapred_tt_hosts", []))
-nm_hosts = Set(default("/clusterHostInfo/nm_hosts", []))
-hbase_rs_hosts = Set(default("/clusterHostInfo/hbase_rs_hosts", []))
-flume_hosts = Set(default("/clusterHostInfo/flume_hosts", []))
-jn_hosts = Set(default("/clusterHostInfo/journalnode_hosts", []))
-nimbus_server_hosts = Set(default("/clusterHostInfo/nimbus_hosts", []))
-supervisor_server_hosts = Set(default("/clusterHostInfo/supervisor_hosts", []))
+slave_hosts = set(default("/clusterHostInfo/slave_hosts", []))
+tt_hosts = set(default("/clusterHostInfo/mapred_tt_hosts", []))
+nm_hosts = set(default("/clusterHostInfo/nm_hosts", []))
+hbase_rs_hosts = set(default("/clusterHostInfo/hbase_rs_hosts", []))
+flume_hosts = set(default("/clusterHostInfo/flume_hosts", []))
+jn_hosts = set(default("/clusterHostInfo/journalnode_hosts", []))
+nimbus_server_hosts = set(default("/clusterHostInfo/nimbus_hosts", []))
+supervisor_server_hosts = set(default("/clusterHostInfo/supervisor_hosts", []))
 
 pure_slave = not hostname in (namenode_host | jtnode_host | rm_host | hs_host |\
                               hbase_master_hosts |slave_hosts | tt_hosts | hbase_rs_hosts |\