Skip to content

Commit

Permalink
fix for pspark
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyuan committed Apr 2, 2014
1 parent 77d2703 commit d9a6438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions python/pyspark/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,11 @@ def _getJavaStorageLevel(self, storageLevel):
raise Exception("storageLevel must be of type pyspark.StorageLevel")

newStorageLevel = self._jvm.org.apache.spark.storage.StorageLevel
return newStorageLevel(storageLevel.useDisk, storageLevel.useMemory, storageLevel.useTachyon,
storageLevel.deserialized, storageLevel.replication)
return newStorageLevel(storageLevel.useDisk,
storageLevel.useMemory,
storageLevel.useOffHeap,
storageLevel.deserialized,
storageLevel.replication)

def setJobGroup(self, groupId, description):
"""
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ def getStorageLevel(self):
java_storage_level = self._jrdd.getStorageLevel()
storage_level = StorageLevel(java_storage_level.useDisk(),
java_storage_level.useMemory(),
java_storage_level.useTachyon(),
java_storage_level.useOffHeap(),
java_storage_level.deserialized(),
java_storage_level.replication())
return storage_level
Expand Down

0 comments on commit d9a6438

Please sign in to comment.