Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
windreamer committed Sep 28, 2017
1 parent 054d666 commit e711375
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dpark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,12 +1318,15 @@ def compute(self, split):

def read(self, f, start, end):
for line in f:
line = line.decode('utf-8')
size = len(line)
if not six.PY2:
line = line.decode('utf-8')

if line.endswith('\n'):
yield line[:-1]
else:
yield line
start += len(line)
start += size
if start >= end: break


Expand Down

0 comments on commit e711375

Please sign in to comment.