Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the archive parameters to HadoopJobRunner #1649

Merged
merged 2 commits into from Apr 12, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -401,14 +401,15 @@ class HadoopJobRunner(JobRunner):
def __init__(self, streaming_jar, modules=None, streaming_args=None,
libjars=None, libjars_in_hdfs=None, jobconfs=None,
input_format=None, output_format=None,
end_job_with_atomic_move_dir=True):
end_job_with_atomic_move_dir=True, archives=None):
def get(x, default):
return x is not None and x or default
self.streaming_jar = streaming_jar
self.modules = get(modules, [])
self.streaming_args = get(streaming_args, [])
self.libjars = get(libjars, [])
self.libjars_in_hdfs = get(libjars_in_hdfs, [])
self.archives = get(archives, [])
self.jobconfs = get(jobconfs, {})
self.input_format = input_format
self.output_format = output_format
@@ -478,6 +479,10 @@ def run_job(self, job, tracking_url_callback=None):
if libjars:
arglist += ['-libjars', ','.join(libjars)]

# 'archives' is also a generic option
if self.archives:
arglist += ['-archives', ','.join(self.archives)]

# Add static files and directories
extra_files = get_extra_files(job.extra_files())

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.