Skip to content

Commit

Permalink
Remove confusing taskMetrics.shuffleWriteMetrics() optional call
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 28, 2015
1 parent 8522b6a commit 96811b4
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.io.FileOutputStream;
import java.io.IOException;

import scala.Option;
import scala.Product2;
import scala.Tuple2;
import scala.collection.Iterator;
Expand Down Expand Up @@ -157,10 +156,7 @@ public long[] writePartitionedFile(
threwException = false;
} finally {
Closeables.close(out, threwException);
Option<ShuffleWriteMetrics> maybeWriteMetrics = context.taskMetrics().shuffleWriteMetrics();
if (maybeWriteMetrics.isDefined()) {
maybeWriteMetrics.get().incShuffleWriteTime(System.nanoTime() - writeStartTime);
}
writeMetrics.incShuffleWriteTime(System.nanoTime() - writeStartTime);
}
return lengths;
}
Expand Down

0 comments on commit 96811b4

Please sign in to comment.