def test_possible_configs(self): res = w_f.get_possible_job_config(edp.JOB_TYPE_MAPREDUCE) sample_config_property = { 'name': 'mapred.map.tasks', 'value': '2', 'description': 'The default number of map tasks per job.' 'Ignored when mapred.job.tracker is "local". ' } self.assertIn(sample_config_property, res['job_config']["configs"]) res = w_f.get_possible_job_config(edp.JOB_TYPE_HIVE) sample_config_property = { "description": "The serde used by FetchTask to serialize the " "fetch output.", "name": "hive.fetch.output.serde", "value": "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe" } self.assertIn(sample_config_property, res["job_config"]['configs']) res = w_f.get_possible_job_config("impossible_config") self.assertIsNone(res)
def get_job_config_hints(job_type): return w_f.get_possible_job_config(job_type)