Example #1
0
 def test_get_possible_mapreduce_config_from(self,
                                             load_hadoop_xml_defaults):
     expected_config = {
         'configs': [],
     }
     actual_config = ch_helper.get_possible_mapreduce_config_from(
         'sample-config.xml')
     load_hadoop_xml_defaults.called_once_with('sample-config.xml')
     self.assertEqual(expected_config, actual_config)
Example #2
0
 def get_possible_job_config(job_type):
     if edp.compare_job_type(job_type, edp.JOB_TYPE_HIVE):
         return {'job_config': ch_helper.get_possible_hive_config_from(
                 'plugins/cdh/v5_4_0/resources/hive-site.xml')}
     if edp.compare_job_type(job_type,
                             edp.JOB_TYPE_MAPREDUCE,
                             edp.JOB_TYPE_MAPREDUCE_STREAMING):
         return {'job_config': ch_helper.get_possible_mapreduce_config_from(
                 'plugins/cdh/v5_4_0/resources/mapred-site.xml')}
     if edp.compare_job_type(job_type, edp.JOB_TYPE_PIG):
         return {'job_config': ch_helper.get_possible_pig_config_from(
                 'plugins/cdh/v5_4_0/resources/mapred-site.xml')}
     return edp_engine.OozieJobEngine.get_possible_job_config(job_type)
Example #3
0
 def get_possible_job_config(job_type):
     if edp.compare_job_type(job_type, edp.JOB_TYPE_HIVE):
         return {'job_config': ch_helper.get_possible_hive_config_from(
                 'plugins/cdh/v5_4_0/resources/hive-site.xml')}
     if edp.compare_job_type(job_type,
                             edp.JOB_TYPE_MAPREDUCE,
                             edp.JOB_TYPE_MAPREDUCE_STREAMING):
         return {'job_config': ch_helper.get_possible_mapreduce_config_from(
                 'plugins/cdh/v5_4_0/resources/mapred-site.xml')}
     if edp.compare_job_type(job_type, edp.JOB_TYPE_PIG):
         return {'job_config': ch_helper.get_possible_pig_config_from(
                 'plugins/cdh/v5_4_0/resources/mapred-site.xml')}
     return edp_engine.OozieJobEngine.get_possible_job_config(job_type)
 def test_get_possible_mapreduce_config_from(self, load_hadoop_xml_defaults):
     expected_config = {"configs": []}
     actual_config = ch_helper.get_possible_mapreduce_config_from("sample-config.xml")
     load_hadoop_xml_defaults.called_once_with("sample-config.xml")
     self.assertEqual(expected_config, actual_config)