File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ def load(f):
513513 chunks .append (load (open (path , 'rb' )))
514514 current_chunk = []
515515 gc .collect ()
516- batch /= 2
516+ batch // = 2
517517 limit = self ._next_limit ()
518518 MemoryBytesSpilled += (used_memory - get_used_memory ()) << 20
519519 DiskBytesSpilled += os .path .getsize (path )
Original file line number Diff line number Diff line change 3131import time
3232import zipfile
3333import random
34- import itertools
3534import threading
3635import hashlib
37- from StringIO import StringIO
3836
3937from py4j .protocol import Py4JJavaError
4038
5048 xrange = range
5149 basestring = str
5250
51+ if sys .version >= "3" :
52+ from io import StringIO
53+ else :
54+ from StringIO import StringIO
55+
5356
5457from pyspark .conf import SparkConf
5558from pyspark .context import SparkContext
You can’t perform that action at this time.
0 commit comments