Skip to content

Commit

Permalink
change ser/de of JavaArray and JavaList
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxusen committed Jan 15, 2016
1 parent d0a5c32 commit 4e8df6c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/pyspark/mllib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ def _java2py(sc, r, encoding="bytes"):
if clsName in _picklable_classes:
r = sc._jvm.SerDe.dumps(r)
elif isinstance(r, (JavaArray, JavaList)):
try:
r = sc._jvm.SerDe.dumps(r)
except Py4JJavaError:
pass # not pickable
r = list(r)

if isinstance(r, (bytearray, bytes)):
r = PickleSerializer().loads(bytes(r), encoding=encoding)
Expand Down

0 comments on commit 4e8df6c

Please sign in to comment.