keith-turner commented on a change in pull request #347: ACCUMULO-4746 Fluent API for Mutation URL: https://github.com/apache/accumulo/pull/347#discussion_r158282561
########## File path: core/src/main/java/org/apache/accumulo/core/data/Mutation.java ########## @@ -772,6 +772,236 @@ public void putDelete(byte[] columnFamily, byte[] columnQualifier, ColumnVisibil put(columnFamily, columnQualifier, columnVisibility.getExpression(), true, timestamp, true, EMPTY_BYTES); } + /** + * Fluent API for Mutation + * + * <p> + * Each step of the Mutation is represented by an interface. Inheritance order ensures that chained methods follow prescribed order of: + * + * <p> + * row, family, qualifier, visibility, timestamp + * + * <p> + * set and delete methods end the chain and finalize the mutation + */ + public interface RowStep extends FamilyStep { + FamilyStep row(byte[] r); + + FamilyStep row(CharSequence r); + + FamilyStep row(ByteBuffer r); + + FamilyStep row(Text t); Review comment: Personally I think consistency is important. As long as Text methods elsewhere are not deprecated I think it should be supported here. For better or worse Text is widely used in the Accumulo API. Some Accumulo methods only accept Text, which means in some cases users may already have Text objects that could also be used here. ---------------------------------------------------------------- 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