Skip to content

Commit

Permalink
fix a brought-in mistake in StorageLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
RongGu committed Mar 21, 2014
1 parent 70ca182 commit 8011a96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ class StorageLevel private(
def toInt: Int = {
var ret = 0
if (useDisk_) {
ret |= 4
ret |= 8
}
if (useMemory_) {
ret |= 2
ret |= 4
}
if (useTachyon_) {
ret |= 2
Expand All @@ -91,8 +91,8 @@ class StorageLevel private(

override def readExternal(in: ObjectInput) {
val flags = in.readByte()
useDisk_ = (flags & 4) != 0
useMemory_ = (flags & 2) != 0
useDisk_ = (flags & 8) != 0
useMemory_ = (flags & 4) != 0
useTachyon_ = (flags & 2) != 0
deserialized_ = (flags & 1) != 0
replication_ = in.readByte()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
assert(master.getLocations("a1").size === 0, "master did not remove a1")
assert(master.getLocations("a2").size === 0, "master did not remove a2")
}

test("master + 2 managers interaction") {
store = new BlockManager("exec1", actorSystem, master, serializer, 2000, conf, securityMgr)
store2 = new BlockManager("exec2", actorSystem, master, new KryoSerializer(conf), 2000, conf,
securityMgr)

val peers = master.getPeers(store.blockManagerId, 1)
assert(peers.size === 1, "master did not return the other manager as a peer")
assert(peers.head === store2.blockManagerId, "peer returned by master is not the other manager")
Expand Down

0 comments on commit 8011a96

Please sign in to comment.