You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/01/14 07:05:31 UTC
[GitHub] yucai commented on a change in pull request #19788:
[SPARK-9853][Core] Optimize shuffle fetch of contiguous partition IDs
yucai commented on a change in pull request #19788: [SPARK-9853][Core] Optimize shuffle fetch of contiguous partition IDs
URL: https://github.com/apache/spark/pull/19788#discussion_r247396067
##########
File path: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/protocol/StreamHandle.java
##########
@@ -57,25 +67,31 @@ public boolean equals(Object other) {
if (other != null && other instanceof StreamHandle) {
StreamHandle o = (StreamHandle) other;
return Objects.equal(streamId, o.streamId)
- && Objects.equal(numChunks, o.numChunks);
+ && Objects.equal(numChunks, o.numChunks)
+ && Arrays.equals(chunkSizes, o.chunkSizes);
}
return false;
}
@Override
public int encodedLength() {
- return 8 + 4;
+ return 8 + 4 + Encoders.IntArrays.encodedLength(chunkSizes);
}
@Override
public void encode(ByteBuf buf) {
buf.writeLong(streamId);
buf.writeInt(numChunks);
+ Encoders.IntArrays.encode(buf, chunkSizes);
}
public static StreamHandle decode(ByteBuf buf) {
long streamId = buf.readLong();
int numChunks = buf.readInt();
- return new StreamHandle(streamId, numChunks);
+ int[] chunkSizes = new int[0];
Review comment:
Got it, many place in this PR has this issue, I will fix them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org