Пример #1
0
    def test_edp_config_hints(self):
        provider = pl.SparkProvider()

        res = provider.get_edp_config_hints(edp.JOB_TYPE_SHELL, "1.6.0")
        self.assertEqual({
            'configs': {},
            'args': [],
            'params': {}
        }, res['job_config'])

        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_SHELL, "2.1.0")
        self.assertEqual({
            'args': [],
            'configs': {},
            'params': {}
        }, res['job_config'])

        res = provider.get_edp_config_hints(edp.JOB_TYPE_SPARK, "2.2")
        self.assertEqual({'args': [], 'configs': []}, res['job_config'])

        res = provider.get_edp_config_hints(edp.JOB_TYPE_SHELL, "2.2")
        self.assertEqual({
            'args': [],
            'configs': {},
            'params': {}
        }, res['job_config'])
Пример #2
0
    def test_supported_job_types(self):
        provider = pl.SparkProvider()

        res = provider.get_edp_job_types()
        self.assertEqual([edp.JOB_TYPE_SHELL, edp.JOB_TYPE_SPARK],
                         res['1.3.1'])
        self.assertEqual([edp.JOB_TYPE_SHELL, edp.JOB_TYPE_SPARK],
                         res['1.6.0'])
Пример #3
0
 def setUp(self):
     super(SparkValidationTest, self).setUp()
     pb.setup_plugins()
     self.plugin = pl.SparkProvider()