Merge "Upgrading Spark version to 2.1.0"

This commit is contained in:
Jenkins 2017-06-21 15:50:09 +00:00 committed by Gerrit Code Review
commit 977d06c614
2 changed files with 19 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class SparkProvider(p.ProvisioningPluginBase):
return result
def get_versions(self):
return ['1.6.0', '1.3.1']
return ['2.1.0', '1.6.0', '1.3.1']
def get_configs(self, hadoop_version):
return c_helper.get_plugin_configs()

View File

@ -76,6 +76,14 @@ class SparkPluginTest(base.SaharaWithDbTestCase):
self._test_engine('1.6.0', edp.JOB_TYPE_SHELL,
engine.SparkShellJobEngine)
def test_plugin21_edp_engine(self):
self._test_engine('2.1.0', edp.JOB_TYPE_SPARK,
engine.SparkJobEngine)
def test_plugin22_shell_engine(self):
self._test_engine('2.1.0', edp.JOB_TYPE_SHELL,
engine.SparkShellJobEngine)
def _test_engine(self, version, job_type, eng):
cluster_dict = self._init_cluster_dict(version)
@ -191,6 +199,8 @@ class SparkProviderTest(base.SaharaTestCase):
res['1.3.1'])
self.assertEqual([edp.JOB_TYPE_SHELL, edp.JOB_TYPE_SPARK],
res['1.6.0'])
self.assertEqual([edp.JOB_TYPE_SHELL, edp.JOB_TYPE_SPARK],
res['2.1.0'])
def test_edp_config_hints(self):
provider = pl.SparkProvider()
@ -210,3 +220,11 @@ class SparkProviderTest(base.SaharaTestCase):
res = provider.get_edp_config_hints(edp.JOB_TYPE_SPARK, "1.6.0")
self.assertEqual({'args': [], 'configs': []},
res['job_config'])
res = provider.get_edp_config_hints(edp.JOB_TYPE_SPARK, "2.1.0")
self.assertEqual({'args': [], 'configs': []},
res['job_config'])
res = provider.get_edp_config_hints(edp.JOB_TYPE_SPARK, "2.1.0")
self.assertEqual({'args': [], 'configs': []},
res['job_config'])