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):
513
513
chunks .append (load (open (path , 'rb' )))
514
514
current_chunk = []
515
515
gc .collect ()
516
- batch /= 2
516
+ batch // = 2
517
517
limit = self ._next_limit ()
518
518
MemoryBytesSpilled += (used_memory - get_used_memory ()) << 20
519
519
DiskBytesSpilled += os .path .getsize (path )
Original file line number Diff line number Diff line change 31
31
import time
32
32
import zipfile
33
33
import random
34
- import itertools
35
34
import threading
36
35
import hashlib
37
- from StringIO import StringIO
38
36
39
37
from py4j .protocol import Py4JJavaError
40
38
50
48
xrange = range
51
49
basestring = str
52
50
51
+ if sys .version >= "3" :
52
+ from io import StringIO
53
+ else :
54
+ from StringIO import StringIO
55
+
53
56
54
57
from pyspark .conf import SparkConf
55
58
from pyspark .context import SparkContext
You can’t perform that action at this time.
0 commit comments