Merge "Adding validation check for Spark plugin"
This commit is contained in:
commit
39276bd606
@ -75,6 +75,15 @@ class SparkProvider(p.ProvisioningPluginBase):
|
|||||||
raise ex.InvalidComponentCountException("datanode", _("1 or more"),
|
raise ex.InvalidComponentCountException("datanode", _("1 or more"),
|
||||||
nn_count)
|
nn_count)
|
||||||
|
|
||||||
|
rep_factor = c_helper.get_config_value('HDFS', "dfs.replication",
|
||||||
|
cluster)
|
||||||
|
if dn_count < rep_factor:
|
||||||
|
raise ex.InvalidComponentCountException(
|
||||||
|
'datanode', _('%s or more') % rep_factor, dn_count,
|
||||||
|
_('Number of %(dn)s instances should not be less '
|
||||||
|
'than %(replication)s')
|
||||||
|
% {'dn': 'datanode', 'replication': 'dfs.replication'})
|
||||||
|
|
||||||
# validate Spark Master Node and Spark Slaves
|
# validate Spark Master Node and Spark Slaves
|
||||||
sm_count = sum([ng.count for ng
|
sm_count = sum([ng.count for ng
|
||||||
in utils.get_node_groups(cluster, "master")])
|
in utils.get_node_groups(cluster, "master")])
|
||||||
|
@ -76,8 +76,7 @@ class SparkGatingTest(swift.SwiftTest, scaling.ScalingTest,
|
|||||||
'name': 'test-cluster-template-spark',
|
'name': 'test-cluster-template-spark',
|
||||||
'plugin_config': self.plugin_config,
|
'plugin_config': self.plugin_config,
|
||||||
'description': 'test cluster template for Spark plugin',
|
'description': 'test cluster template for Spark plugin',
|
||||||
'cluster_configs': {
|
'cluster_configs': {'HDFS': {'dfs.replication': 1}},
|
||||||
},
|
|
||||||
'node_groups': [
|
'node_groups': [
|
||||||
{
|
{
|
||||||
'name': 'master-node',
|
'name': 'master-node',
|
||||||
|
Loading…
Reference in New Issue
Block a user