accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1909) Adding list of conditions to conditional mutation is cumbersome.
Date Wed, 20 Nov 2013 15:55:36 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-1909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827781#comment-13827781
] 

Keith Turner commented on ACCUMULO-1909:
----------------------------------------

I am thinking of dropping the requirement of at least one condition in the constructor and
make ConditionalWriter.write() throw an IllegalArgumentException for mutations w/ no conditions.
 I thnik the code example I gave in the description could lead to NullPointerExceptions at
runtime in the case of no conditions, so the requirement is not really catching more bugs
at compile time as I intended.



> Adding list of conditions to conditional mutation is cumbersome.
> ----------------------------------------------------------------
>
>                 Key: ACCUMULO-1909
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1909
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: client, tserver
>            Reporter: Keith Turner
>             Fix For: 1.6.0
>
>
> The conditional mutation constructor requires that a user pass in at least one condition.
 For cases where I have a list of data that I want to create conditions from I have found
this to be very cumbersome writing code like the following.
> {code:java}
>   List<String> cdata = ...;
>   ConditionalMutation cm = null;
>   for(String s : cdata){
>     Condition condition = createCondition(s);
>      if(cm == null)
>         cm = new ConditionalMutation(row, condition)
>     else
>         cm.addCondition(condition);
>    }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message