Skip to content

Commit

Permalink
Revert "Extend FilterInputStream and use the stream directly (#613)"
Browse files Browse the repository at this point in the history
This reverts commit 4fa14a3.
  • Loading branch information
rshkv authored and jdcasale committed Jul 17, 2020
1 parent 6f42404 commit 7e1bb25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.spark.shuffle.api;

import java.io.FilterInputStream;
import org.apache.spark.storage.BlockId;

import java.io.InputStream;
Expand All @@ -27,15 +26,20 @@
* An object defining the shuffle block and length metadata associated with the block.
* @since 3.0.0
*/
public class ShuffleBlockInputStream extends FilterInputStream {
public class ShuffleBlockInputStream {
private final BlockId blockId;
private final InputStream inputStream;

public ShuffleBlockInputStream(BlockId blockId, InputStream inputStream) {
super(inputStream);
this.blockId = blockId;
this.inputStream = inputStream;
}

public BlockId getBlockId() {
return this.blockId;
}

public InputStream getInputStream() {
return this.inputStream;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ private[spark] class BlockStoreShuffleReader[K, C](
}
}.asJava).iterator()

val retryingWrappedStreams = streamsIterator.asScala.map { rawReaderStream =>
val retryingWrappedStreams = streamsIterator.asScala.map { shuffleBlock =>
val rawReaderStream = shuffleBlock.getInputStream
if (shuffleExecutorComponents.shouldWrapPartitionReaderStream()) {
if (compressShuffle) {
compressionCodec.compressedInputStream(
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")

addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1")

Expand Down

0 comments on commit 7e1bb25

Please sign in to comment.