You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/01/11 16:35:04 UTC

[GitHub] keith-turner commented on a change in pull request #347: ACCUMULO-4746 Fluent API for Mutation

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_r161005568
 
 

 ##########
 File path: core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
 ##########
 @@ -183,6 +185,190 @@ private Value nv(String s) {
     return new Value(s.getBytes());
   }
 
+  @Test
+  public void testAtFamilyTypes() {
+    final String fam = "f16bc";
+    final String qual = "q1pm2";
+    final String val = "v8672194923750";
+
+    Mutation expected = new Mutation("row5");
+    expected.put(fam, qual, val);
+
+    // Test all family methods, keeping qual and val constant as Strings
+    // fam: byte[]
+    Mutation actual = new Mutation("row5");
+    actual.at().family(fam.getBytes(UTF_8)).qualifier(qual).set(val);
 
 Review comment:
   > Is there a reason to not make the fluent-methods you want to add on a new class, e.g. MutationBuilder?
   
   I was puzzling over this question and shared what I came up with on the issue.
   
   https://issues.apache.org/jira/browse/ACCUMULO-4746?focusedCommentId=16269423&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16269423

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