Skip to content

Commit

Permalink
fix tests in python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Apr 17, 2015
1 parent aa39c55 commit 2654bfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def load(f):
chunks.append(load(open(path, 'rb')))
current_chunk = []
gc.collect()
batch /= 2
batch //= 2
limit = self._next_limit()
MemoryBytesSpilled += (used_memory - get_used_memory()) << 20
DiskBytesSpilled += os.path.getsize(path)
Expand Down
7 changes: 5 additions & 2 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
import time
import zipfile
import random
import itertools
import threading
import hashlib
from StringIO import StringIO

from py4j.protocol import Py4JJavaError

Expand All @@ -50,6 +48,11 @@
xrange = range
basestring = str

if sys.version >= "3":
from io import StringIO
else:
from StringIO import StringIO


from pyspark.conf import SparkConf
from pyspark.context import SparkContext
Expand Down

0 comments on commit 2654bfd

Please sign in to comment.