gak*_*gak 2 python mapreduce hadoop-streaming mrjob
我从Python库mrjob开始有几个不同的工作,包括具有多个步骤的工作.如何更换streamjob自定义名称?例如,wordcount_step_1,wordcount_step_2等.

当然,只需在执行作业时使用--jobconf选项指定它.
例如:
if __name__ == '__main__':
# Be careful, this appends all job args, if you have lots it could be a problem
sys.argv.extend(["--jobconf", "mapred.job.name=%s" % " ".join(sys.argv)])
MRYourJobClass.run()
Run Code Online (Sandbox Code Playgroud)