From 3c18fab853d4c72cc4fe88a2a3bde467b3a1c8ad Mon Sep 17 00:00:00 2001 From: skostiuchenkoHDP Date: Thu, 6 Feb 2014 22:34:25 +0200 Subject: [PATCH] Added scaling parameters to HDP plugin config Added SCALE_EXISTING_NG_COUNT and SCALE_NEW_NG_COUNT parameters to HDP plugin config. The default behavior remains as before, but an additional option is added. Cluster scaling is parameterized in order to add an ability to re-use cluster scaling test in performance/benchmark testing. Change-Id: Iba1570f978e4f44046e64f1d38b2f498e7a0c421 --- savanna/tests/integration/configs/config.py | 8 ++++++++ .../tests/integration/configs/itest.conf.sample-full | 5 +++++ .../tests/integration/tests/gating/test_hdp_gating.py | 10 +++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/savanna/tests/integration/configs/config.py b/savanna/tests/integration/configs/config.py index a4194c88ce..d8904f3d95 100644 --- a/savanna/tests/integration/configs/config.py +++ b/savanna/tests/integration/configs/config.py @@ -268,6 +268,14 @@ HDP_CONFIG_OPTS = [ default='/volumes/disk1/hadoop/mapred/userlogs', help='Directory where logs of completed jobs on volume mounted ' 'to node are located.'), + cfg.IntOpt('SCALE_EXISTING_NG_COUNT', + default=1, + help='The number of hosts to add while scaling ' + 'an existing node group.'), + cfg.IntOpt('SCALE_NEW_NG_COUNT', + default=1, + help='The number of hosts to add while scaling ' + 'a new node group.'), cfg.DictOpt('HADOOP_PROCESSES_WITH_PORTS', default={ 'JOBTRACKER': 50030, diff --git a/savanna/tests/integration/configs/itest.conf.sample-full b/savanna/tests/integration/configs/itest.conf.sample-full index 821de02847..9223a64fd4 100644 --- a/savanna/tests/integration/configs/itest.conf.sample-full +++ b/savanna/tests/integration/configs/itest.conf.sample-full @@ -211,6 +211,11 @@ # (string value) #HADOOP_LOG_DIRECTORY_ON_VOLUME = '/volumes/disk1/hadoop/mapred/userlogs' +#The number of hosts to add while scaling an existing node group +#SCALE_EXISTING_NG_COUNT = 1 + +#The number of hosts to add while scaling a new node group +#SCALE_NEW_NG_COUNT = 1 # (dictionary value) #HADOOP_PROCESSES_WITH_PORTS = JOBTRACKER: 50030, NAMENODE: 50070, TASKTRACKER: 50060, DATANODE: 50075, SECONDARY_NAMENODE: 50090 diff --git a/savanna/tests/integration/tests/gating/test_hdp_gating.py b/savanna/tests/integration/tests/gating/test_hdp_gating.py index ed72cb49c6..ff7504d44c 100644 --- a/savanna/tests/integration/tests/gating/test_hdp_gating.py +++ b/savanna/tests/integration/tests/gating/test_hdp_gating.py @@ -232,16 +232,20 @@ class HDPGatingTest(cinder.CinderVolumeTest, edp.EDPTest, #--------------------------------CLUSTER SCALING------------------------------- + datanode_count_after_resizing = ( + cluster_info['node_info']['datanode_count'] + + self.hdp_config.SCALE_EXISTING_NG_COUNT) change_list = [ { 'operation': 'resize', - 'info': ['worker-node-tt-dn', 4] + 'info': ['worker-node-tt-dn', datanode_count_after_resizing] }, { 'operation': 'add', 'info': [ - 'new-worker-node-tt-dn', 1, '%s' - % node_group_template_tt_dn_id + 'new-worker-node-tt-dn', + self.hdp_config.SCALE_NEW_NG_COUNT, + '%s' % node_group_template_tt_dn_id ] } ]