ibilley7 commented on code in PR #5702: URL: https://github.com/apache/accumulo/pull/5702#discussion_r2190952108
########## core/src/main/java/org/apache/accumulo/core/data/Mutation.java: ########## @@ -701,6 +701,40 @@ public void put(byte[] columnFamily, byte[] columnQualifier, ColumnVisibility co value); } + /** + * Puts a modification in this mutation given the values contained in the key and the value. All + * appropriate fields of the key are defensively copied. + * + * @param key key containing all key fields + * @param value value + */ + public void put(Key key, Value value) { + if (!(Arrays.equals(this.getRow(), key.getRow().getBytes()))) { + throw new IllegalArgumentException("key row is not equal to mutation row"); + } Review Comment: I do not have two keys that I can easily compare, because there's no field in Mutation that stores the key of the current instance. I'm not sure how I would use that compareTo() method given I only have one key available to me, which was passed through as a parameter. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org