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-1190) The update() method on the ProxyServer should throw a MutationsRejectedException
Date Tue, 26 Mar 2013 15:21:16 GMT

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

Keith Turner commented on ACCUMULO-1190:
----------------------------------------

bq. I can do that. It seems like it may be a little weird for the user of the proxy, however,
if they only see the first or the last exception that was thrown. Merging the constraint violation
for many different mutations may be a little funky too.

I think the best strategy to deal with this is to call close() on the batchwriter and use
that exception as the final exception.  

{code:java}

void proxyUpdate(sessionID, mutations){

  if(sessionFailed(sessionID))
     return; 

  try{
     bw = getBatchWriter(sessionID);
     bw.addMutations(mutations);
  }catch(MRE e){
     MRE sessionException = e;
     try{
        //close should throw MRE again and release resources... the MRE thrown by close should
contain all error info
        bw.close();
     }catch(MRE e2){
        sessionException = e2;
     }
 
     markSessionFailed(sessionID, sessionException);
  }
}
{code}
                
> The update() method on the ProxyServer should throw a MutationsRejectedException 
> ---------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-1190
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1190
>             Project: Accumulo
>          Issue Type: Bug
>          Components: proxy
>            Reporter: Corey J. Nolet
>            Assignee: Corey J. Nolet
>            Priority: Minor
>             Fix For: 1.5.0
>
>         Attachments: ACCUMULO-1190.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message