def test_get_possible_pig_config_from(
         self, load_hadoop_xml_defaults):
     expected_config = {
         'configs': [],
         'args': [],
         'params': {}
     }
     actual_config = ch_helper.get_possible_pig_config_from(
         'sample-config.xml')
     load_hadoop_xml_defaults.assert_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/vanilla/v2_6_0/resources/hive-default.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/vanilla/v2_6_0/resources/mapred-default.xml')}
     if edp.compare_job_type(job_type, edp.JOB_TYPE_PIG):
         return {'job_config': ch_helper.get_possible_pig_config_from(
                 'plugins/vanilla/v2_6_0/resources/mapred-default.xml')}
     return edp_engine.EdpOozieEngine.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/vanilla/v2_6_0/resources/hive-default.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/vanilla/v2_6_0/resources/mapred-default.xml')
         }
     if edp.compare_job_type(job_type, edp.JOB_TYPE_PIG):
         return {
             'job_config':
             ch_helper.get_possible_pig_config_from(
                 'plugins/vanilla/v2_6_0/resources/mapred-default.xml')
         }
     return edp_engine.EdpOozieEngine.get_possible_job_config(job_type)
Example #4
0
 def test_get_possible_pig_config_from(self, load_hadoop_xml_defaults):
     expected_config = {'configs': [], 'args': [], 'params': {}}
     actual_config = ch_helper.get_possible_pig_config_from(
         'sample-config.xml')
     load_hadoop_xml_defaults.called_once_with('sample-config.xml')
     self.assertEqual(expected_config, actual_config)