Skip to content

Commit

Permalink
in inline mode, copy file if there's no mapper to imitate cat (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
David Marin committed Oct 9, 2015
1 parent d75e0e0 commit fa891e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mrjob/inline.py
Expand Up @@ -18,6 +18,7 @@
import logging
import os
from io import BytesIO
from shutil import copyfile

from mrjob.job import MRJob
from mrjob.parse import parse_mr_job_stderr
Expand Down Expand Up @@ -117,6 +118,11 @@ def _run_step(self, step_num, step_type, input_path, output_path,
working_dir, env, child_stdin=None):
step = self._get_step(step_num)

# if no mapper, just pass the data through (see #1141)
if step_type == 'mapper' and not step.get('mapper'):
copyfile(input_path, output_path)
return

# Passing local=False ensures the job uses proper names for file
# options (see issue #851 on github)
common_args = (['--step-num=%d' % step_num] +
Expand Down

0 comments on commit fa891e7

Please sign in to comment.