Skip to content

Commit 5180985

Browse files
committed
Revert "Extend FilterInputStream and use the stream directly (#613)"
This reverts commit 4fa14a3.
1 parent ead54cb commit 5180985

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

core/src/main/java/org/apache/spark/shuffle/api/ShuffleBlockInputStream.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.spark.shuffle.api;
1919

20-
import java.io.FilterInputStream;
2120
import org.apache.spark.storage.BlockId;
2221

2322
import java.io.InputStream;
@@ -27,15 +26,20 @@
2726
* An object defining the shuffle block and length metadata associated with the block.
2827
* @since 3.0.0
2928
*/
30-
public class ShuffleBlockInputStream extends FilterInputStream {
29+
public class ShuffleBlockInputStream {
3130
private final BlockId blockId;
31+
private final InputStream inputStream;
3232

3333
public ShuffleBlockInputStream(BlockId blockId, InputStream inputStream) {
34-
super(inputStream);
3534
this.blockId = blockId;
35+
this.inputStream = inputStream;
3636
}
3737

3838
public BlockId getBlockId() {
3939
return this.blockId;
4040
}
41+
42+
public InputStream getInputStream() {
43+
return this.inputStream;
44+
}
4145
}

core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ private[spark] class BlockStoreShuffleReader[K, C](
7373
}
7474
}.asJava).iterator()
7575

76-
val retryingWrappedStreams = streamsIterator.asScala.map { rawReaderStream =>
76+
val retryingWrappedStreams = streamsIterator.asScala.map { shuffleBlock =>
77+
val rawReaderStream = shuffleBlock.getInputStream
7778
if (shuffleExecutorComponents.shouldWrapPartitionReaderStream()) {
7879
if (compressShuffle) {
7980
compressionCodec.compressedInputStream(

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
22

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

0 commit comments

Comments
 (0)