Skip to content
Snippets Groups Projects
Commit c484b735 authored by Mosharaf Chowdhury's avatar Mosharaf Chowdhury
Browse files

Bug squashed. CustomParallelInMemoryShuffle is rocking!

We were serializing one (the wrong) thing, trying to deserialize another (the right thing).
parent 23586d3b
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ extends Shuffle[K, V, C] with Logging { ...@@ -70,7 +70,7 @@ extends Shuffle[K, V, C] with Logging {
// Write buckets(i) to a byte array & put in splitsCache instead of file // Write buckets(i) to a byte array & put in splitsCache instead of file
val baos = new ByteArrayOutputStream val baos = new ByteArrayOutputStream
val oos = new ObjectOutputStream(baos) val oos = new ObjectOutputStream(baos)
oos.writeObject(buckets(i)) buckets(i).foreach(pair => oos.writeObject(pair))
oos.close oos.close
baos.close baos.close
...@@ -119,7 +119,7 @@ extends Shuffle[K, V, C] with Logging { ...@@ -119,7 +119,7 @@ extends Shuffle[K, V, C] with Logging {
CustomParallelInMemoryShuffle.MaxRxConnections) - CustomParallelInMemoryShuffle.MaxRxConnections) -
threadPool.getActiveCount threadPool.getActiveCount
while (hasSplits < totalSplits && numThreadsToCreate > 0) { while (hasSplits < totalSplits && numThreadsToCreate > 0) {
// Select a random split to pull // Select a random split to pull
val splitIndex = selectRandomSplit val splitIndex = selectRandomSplit
...@@ -190,7 +190,6 @@ extends Shuffle[K, V, C] with Logging { ...@@ -190,7 +190,6 @@ extends Shuffle[K, V, C] with Logging {
try{ try{
while (true) { while (true) {
// logInfo("" + inputStream.readObject.isInstanceOf[(K, C)])
val (k, c) = inputStream.readObject.asInstanceOf[(K, C)] val (k, c) = inputStream.readObject.asInstanceOf[(K, C)]
combiners(k) = combiners.get(k) match { combiners(k) = combiners.get(k) match {
case Some(oldC) => mergeCombiners(oldC, c) case Some(oldC) => mergeCombiners(oldC, c)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment