Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix another bug introduced by cat optimization

  • Loading branch information...
commit d7719445b8ad22a83f2cff4fb5de8c5447a3f643 1 parent 3b77a9e
@klbostee authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 dumbo/backends/streaming.py
View
5 dumbo/backends/streaming.py
@@ -224,13 +224,12 @@ def cat(self, path, opts):
# cat each file separately when the path contains special chars
ls = os.popen('%s %s/bin/hadoop dfs -ls %s' % \
(hadenv, self.hadoop, path))
- subpaths = [line.split()[-1] for line in ls]
+ lineparts = (line.split()[-1] for line in ls)
+ subpaths = [part for part in lineparts if part.startswith("/")]
ls.close()
else:
subpaths = [path]
for subpath in subpaths:
- if not subpath.startswith("/"):
- continue
dumptb = os.popen('%s %s/bin/hadoop jar %s dumptb %s 2> /dev/null'
% (hadenv, self.hadoop, streamingjar, subpath))
ascodeopt = getopt(opts, 'ascode')
Please sign in to comment.
Something went wrong with that request. Please try again.