advancedxy commented on code in PR #495:
URL: https://github.com/apache/incubator-uniffle/pull/495#discussion_r1095289731
##########
client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java:
##########
@@ -66,12 +67,15 @@ public RssShuffleDataIterator(
this.serializerInstance = serializer.newInstance();
this.shuffleReadClient = shuffleReadClient;
this.shuffleReadMetrics = shuffleReadMetrics;
- this.codec = Codec.newInstance(rssConf);
+ boolean compress =
rssConf.getBoolean(RssSparkConfig.SPARK_SHUFFLE_COMPRESS.key()
+ .substring(RssSparkConfig.SPARK_RSS_CONFIG_PREFIX.length()),
+ RssSparkConfig.SPARK_SHUFFLE_COMPRESS.defaultValue().get());
+ this.codec = compress ? Codec.newInstance(rssConf) : null;
}
public Iterator<Tuple2<Object, Object>> createKVIterator(ByteBuffer data,
int size) {
clearDeserializationStream();
- byteBufInputStream = new
ByteBufInputStream(Unpooled.wrappedBuffer(data.array(), 0, size), true);
+ byteBufInputStream = new
ByteBufInputStream(Unpooled.wrappedBuffer(data.array(), data.position(), size),
true);
Review Comment:
Thanks for the clarifying.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]