keith-turner commented on a change in pull request #669: Use optimized writeV methods in Mutations URL: https://github.com/apache/accumulo/pull/669#discussion_r222011910
########## File path: core/src/main/java/org/apache/accumulo/core/data/Mutation.java ########## @@ -1613,22 +1615,28 @@ public void write(DataOutput out) throws IOException { } out.write((byte) (0x80 | hasValues)); - WritableUtils.writeVInt(out, row.length); + int size = UnsynchronizedBuffer.writeVInt(integerBuffer, 0, row.length); Review comment: With a utility method like the following, could replace the repeated two lines with a single line. ```java public static void writeVInt(OutputStream out, byte[] workBuffer, int i){ int size = writeVInt(workBuffer, 0, i); out.write(workBuffer, 0 size); } ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services