Add integration test for Hive on vanilla2

Change-Id: I396fcbb7b02fcac3070b365a8471386f872d7ce5
Closes-bug: #1405600
This commit is contained in:
Evgeny Sikachev 2014-12-25 14:00:30 +03:00
parent a0bd8e1e03
commit b1ff5d40d4
2 changed files with 30 additions and 8 deletions

View File

@ -220,15 +220,18 @@ class EDPTest(base.ITestCase):
self.cluster_info['node_info']['namenode_ip'],
hdfs_input_path, self.edp_info.read_hive_example_input())
input_id = self._create_data_source('hive-input', 'hdfs',
hdfs_input_path)
output_id = self._create_data_source('hive-output', 'hdfs',
input_id = self._create_data_source(self.rand_name('hive-input'),
'hdfs', hdfs_input_path)
output_id = self._create_data_source(self.rand_name('hive-output'),
'hdfs',
'/user/hive/warehouse/output')
script_id = self._create_job_binary_internals(
'hive-script', self.edp_info.read_hive_example_script())
job_binary_id = self._create_job_binary('hive-edp',
self.rand_name('hive-script'),
self.edp_info.read_hive_example_script())
job_binary_id = self._create_job_binary(self.rand_name('hive-edp'),
'internal-db://%s' % script_id)
job_id = self._create_job('edp-test-hive', edp.JOB_TYPE_HIVE,
job_id = self._create_job(self.rand_name('edp-test-hive'),
edp.JOB_TYPE_HIVE,
[job_binary_id], [])
job_execution_id = self.sahara.job_executions.create(
job_id, self.cluster_id, input_id, output_id, {}).id

View File

@ -120,7 +120,8 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
{
'name': 'master-node-rm-nn',
'flavor_id': self.flavor_id,
'node_processes': ['namenode', 'resourcemanager'],
'node_processes': ['namenode', 'resourcemanager',
'hiveserver'],
'floating_ip_pool': self.floating_ip_pool,
'auto_security_group': True,
'count': 1,
@ -192,6 +193,21 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
def _run_edp_tests(self):
skipped_edp_job_types = self.plugin_config.SKIP_EDP_JOB_TYPES
if utils_edp.JOB_TYPE_PIG not in skipped_edp_job_types:
yield self._edp_pig_test()
if utils_edp.JOB_TYPE_MAPREDUCE not in skipped_edp_job_types:
yield self._edp_mapreduce_test()
if utils_edp.JOB_TYPE_MAPREDUCE_STREAMING not in skipped_edp_job_types:
yield self._edp_mapreduce_streaming_test()
if utils_edp.JOB_TYPE_JAVA not in skipped_edp_job_types:
yield self._edp_java_test()
if utils_edp.JOB_TYPE_HIVE not in skipped_edp_job_types:
yield self._check_edp_hive()
# TODO(esikachev): Until fix bug 1413602
def _run_edp_tests_after_scaling(self):
skipped_edp_job_types = self.plugin_config.SKIP_EDP_JOB_TYPES
if utils_edp.JOB_TYPE_PIG not in skipped_edp_job_types:
yield self._edp_pig_test()
if utils_edp.JOB_TYPE_MAPREDUCE not in skipped_edp_job_types:
@ -239,6 +255,9 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
lib_data_list=[{'jar': java_jar}],
configs=java_configs)
def _check_edp_hive(self):
return self.check_edp_hive()
@b.errormsg("Failure while cluster scaling: ")
def _check_scaling(self):
change_list = [
@ -288,7 +307,7 @@ class VanillaTwoGatingTest(cluster_configs.ClusterConfigTest,
@b.errormsg("Failure while EDP testing after cluster scaling: ")
def _check_edp_after_scaling(self):
self._check_edp()
self.poll_jobs_status(list(self._run_edp_tests_after_scaling()))
@testcase.skipIf(
cfg.ITConfig().vanilla_two_config.SKIP_ALL_TESTS_FOR_PLUGIN,