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/05/13 08:47:23 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24565: [SPARK-27665][Core] Split fetch shuffle blocks protocol from OpenBlocks

cloud-fan commented on a change in pull request #24565: [SPARK-27665][Core] Split fetch shuffle blocks protocol from OpenBlocks
URL: https://github.com/apache/spark/pull/24565#discussion_r283242780
 
 

 ##########
 File path: common/network-common/src/main/java/org/apache/spark/network/protocol/Encoders.java
 ##########
 @@ -89,4 +89,27 @@ public static void encode(ByteBuf buf, String[] strings) {
       return strings;
     }
   }
+
+  /** Integer arrays are encoded with their length followed by integers. */
+  public static class IntArrays {
+    public static int encodedLength(int[] ints) {
+      return 4 * (ints.length + 1);
 
 Review comment:
   nit: seems more readable to write `4 + 4 * ints.length`, which matches the doc better.

----------------------------------------------------------------
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.
 
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