From notifications-return-41531-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Thu Jan 11 17:26:09 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id A59FF180656 for ; Thu, 11 Jan 2018 17:26:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 95627160C20; Thu, 11 Jan 2018 16:26:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D2F47160C1F for ; Thu, 11 Jan 2018 17:26:08 +0100 (CET) Received: (qmail 60494 invoked by uid 500); 11 Jan 2018 16:26:08 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 60483 invoked by uid 99); 11 Jan 2018 16:26:08 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2018 16:26:08 +0000 From: GitBox To: notifications@accumulo.apache.org Subject: [GitHub] bfach10 commented on a change in pull request #347: ACCUMULO-4746 Fluent API for Mutation Message-ID: <151568796746.13187.14719602035947098953.gitbox@gitbox.apache.org> bfach10 commented on a change in pull request #347: ACCUMULO-4746 Fluent API for Mutation URL: https://github.com/apache/accumulo/pull/347#discussion_r160999000 ########## File path: core/src/test/java/org/apache/accumulo/core/data/MutationTest.java ########## @@ -187,7 +187,8 @@ private Value nv(String s) { public void testPuts() { Mutation m = new Mutation(new Text("r1")); - m.put(nt("cf1"), nt("cq1"), nv("v1")); + m.at().family(nt("cf1")).qualifier(nt("cq1")).set(nv("v1")); Review comment: Idea: add a new group of `set` methods called `conditionalSet` that return a `ConditionalMutation` object. This will enable users to continue the chain and add conditions as well. `public ConditionalMutation conditionalSet(byte[] val) { }` `ConditionalMutation actual = new ConditionalMutation("row5"); actual.at().family("fam123").qualifier("q77").visibility(cv) .conditionalSet("v4224").addCondition(new Condition())` But doing something like this for each subclass could get messy. :/ ---------------------------------------------------------------- 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