本文整理汇总了Python中mrjob.local.LocalMRJobRunner.get_job_name方法的典型用法代码示例。如果您正苦于以下问题:Python LocalMRJobRunner.get_job_name方法的具体用法?Python LocalMRJobRunner.get_job_name怎么用?Python LocalMRJobRunner.get_job_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mrjob.local.LocalMRJobRunner
的用法示例。
在下文中一共展示了LocalMRJobRunner.get_job_name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_owner_and_label_kwargs
# 需要导入模块: from mrjob.local import LocalMRJobRunner [as 别名]
# 或者: from mrjob.local.LocalMRJobRunner import get_job_name [as 别名]
def test_owner_and_label_kwargs(self):
runner = LocalMRJobRunner(conf_path=False,
owner='ads', label='ads_chain')
match = JOB_NAME_RE.match(runner.get_job_name())
assert_equal(match.group(1), 'ads_chain')
assert_equal(match.group(2), 'ads')
示例2: test_empty_no_user
# 需要导入模块: from mrjob.local import LocalMRJobRunner [as 别名]
# 或者: from mrjob.local.LocalMRJobRunner import get_job_name [as 别名]
def test_empty_no_user(self):
self.getuser_should_fail = True
runner = LocalMRJobRunner(conf_path=False)
match = JOB_NAME_RE.match(runner.get_job_name())
assert_equal(match.group(1), 'no_script')
assert_equal(match.group(2), 'no_user')
示例3: test_auto_owner
# 需要导入模块: from mrjob.local import LocalMRJobRunner [as 别名]
# 或者: from mrjob.local.LocalMRJobRunner import get_job_name [as 别名]
def test_auto_owner(self):
os.environ['USER'] = 'mcp'
runner = LocalMRJobRunner(conf_path=False)
match = JOB_NAME_RE.match(runner.get_job_name())
assert_equal(match.group(1), 'no_script')
assert_equal(match.group(2), 'mcp')
示例4: test_empty
# 需要导入模块: from mrjob.local import LocalMRJobRunner [as 别名]
# 或者: from mrjob.local.LocalMRJobRunner import get_job_name [as 别名]
def test_empty(self):
runner = LocalMRJobRunner(conf_path=False)
match = JOB_NAME_RE.match(runner.get_job_name())
assert_equal(match.group(1), 'no_script')
assert_equal(match.group(2), getpass.getuser())