当前位置: 首页>>代码示例>>Python>>正文


Python MRJobRunner._hadoop_conf_args方法代码示例

本文整理汇总了Python中mrjob.runner.MRJobRunner._hadoop_conf_args方法的典型用法代码示例。如果您正苦于以下问题:Python MRJobRunner._hadoop_conf_args方法的具体用法?Python MRJobRunner._hadoop_conf_args怎么用?Python MRJobRunner._hadoop_conf_args使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mrjob.runner.MRJobRunner的用法示例。


在下文中一共展示了MRJobRunner._hadoop_conf_args方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_hadoop_output_format

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_hadoop_output_format(self):
     format = 'org.apache.hadoop.mapred.SequenceFileOutputFormat'
     runner = MRJobRunner(conf_path=False, hadoop_output_format=format)
     assert_equal(runner._hadoop_conf_args(0, 1),
                  ['-outputformat', format])
     # test multi-step job
     assert_equal(runner._hadoop_conf_args(0, 2), [])
     assert_equal(runner._hadoop_conf_args(1, 2),
                  ['-outputformat', format])
开发者ID:Jyrsa,项目名称:mrjob,代码行数:11,代码来源:runner_test.py

示例2: test_jobconf

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_jobconf(self):
     jobconf = {'FOO': 'bar', 'BAZ': 'qux', 'BAX': 'Arnold'}
     runner = MRJobRunner(conf_path=False, jobconf=jobconf)
     assert_equal(runner._hadoop_conf_args(0, 1),
                  ['-jobconf', 'BAX=Arnold',
                   '-jobconf', 'BAZ=qux',
                   '-jobconf', 'FOO=bar',])
开发者ID:Jyrsa,项目名称:mrjob,代码行数:9,代码来源:runner_test.py

示例3: test_cmdenv

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_cmdenv(self):
     cmdenv = {'FOO': 'bar', 'BAZ': 'qux', 'BAX': 'Arnold'}
     runner = MRJobRunner(conf_path=False, cmdenv=cmdenv)
     assert_equal(runner._hadoop_conf_args(0, 1),
                  ['-cmdenv', 'BAX=Arnold',
                   '-cmdenv', 'BAZ=qux',
                   '-cmdenv', 'FOO=bar',])
开发者ID:Jyrsa,项目名称:mrjob,代码行数:9,代码来源:runner_test.py

示例4: test_hadoop_extra_args_comes_first

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_hadoop_extra_args_comes_first(self):
     runner = MRJobRunner(
         conf_path=False,
         cmdenv={'FOO': 'bar'},
         hadoop_input_format='FooInputFormat',
         hadoop_output_format='BarOutputFormat',
         jobconf={'baz': 'quz'},
         hadoop_extra_args=['-libjar', 'qux.jar'])
     # hadoop_extra_args should come first
     conf_args = runner._hadoop_conf_args(0, 1)
     assert_equal(conf_args[:2], ['-libjar', 'qux.jar'])
     assert_equal(len(conf_args), 10)
开发者ID:Jyrsa,项目名称:mrjob,代码行数:14,代码来源:runner_test.py

示例5: test_hadoop_extra_args

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_hadoop_extra_args(self):
     extra_args = ['-foo', 'bar']
     runner = MRJobRunner(conf_path=False, hadoop_extra_args=extra_args)
     assert_equal(runner._hadoop_conf_args(0, 1), extra_args)
开发者ID:Jyrsa,项目名称:mrjob,代码行数:6,代码来源:runner_test.py

示例6: test_empty

# 需要导入模块: from mrjob.runner import MRJobRunner [as 别名]
# 或者: from mrjob.runner.MRJobRunner import _hadoop_conf_args [as 别名]
 def test_empty(self):
     runner = MRJobRunner(conf_path=False)
     assert_equal(runner._hadoop_conf_args(0, 1), [])
开发者ID:Jyrsa,项目名称:mrjob,代码行数:5,代码来源:runner_test.py


注:本文中的mrjob.runner.MRJobRunner._hadoop_conf_args方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。