Is there a way to specify the title of a job from mrjob in the Hadoop Administration web interface?

StackOverflow https://stackoverflow.com/questions/15536122

Вопрос

I have several different jobs started from the Python library mrjob, including jobs with multiple steps. How can I replace streamjob with a custom name? For example, wordcount_step_1, wordcount_step_2, etc.

screenshot of Hadoop Administration

Это было полезно?

Решение

Sure, just specify it using the --jobconf option when you execute your job.

For example:

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()

Другие советы

When running the job add the option:

--jobconf mapred.job.name=NameOfTheJob
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top