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-1289) Re-establish SimpleTest for Proxy against MiniAccumuloCluster
Date Thu, 18 Apr 2013 19:30:13 GMT

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

Keith Turner commented on ACCUMULO-1289:
----------------------------------------

bq.  thrift 0.6.1's exceptions don't extend TException

Ah, thats good to know.  MAybe we could do something like the following :

{code:java}
  void translateExceptionBasic(Exception e) throws proxy.thrift.AccumuloException, proxy.thrift.AccumuloSecurityException,
TException {
    try{
      throw e;
    } catch (AccumuloException e) {
      throw new org.apache.accumulo.proxy.thrift.AccumuloException(e.toString());
    } catch (AccumuloSecurityException e) {
      throw new org.apache.accumulo.proxy.thrift.AccumuloSecurityException(e.toString());
    } catch (Exception e) {
      throw new TException(e.toString());
    }
  }

  void translateExceptionTNF(Exception e) throws proxy.thrift.AccumuloException, proxy.thrift.AccumuloSecurityException,
proxy.thrift.TableNotFoundException, TException {
    try{
      throw e;
    } catch (AccumuloException e) {
      throw new org.apache.accumulo.proxy.thrift.AccumuloException(e.toString());
    } catch (AccumuloSecurityException e) {
      throw new org.apache.accumulo.proxy.thrift.AccumuloSecurityException(e.toString());
    } catch (TableNotFoundException e) {
      throw new org.apache.accumulo.proxy.thrift.TableNotFoundException(e.toString());
    } catch (Exception e) {
      throw new TException(e.toString());
    }
  }

{code}

This would not be quite as concise as 1.5.  Functions would have to decide which translate
function to call, basically the one that matches their throws statements.  Could make the
1.5 translate funtion throw instead of return, to make the code as similar as possible.  I
think I might take a crack at this, unless you are interested.  


                
> Re-establish SimpleTest for Proxy against MiniAccumuloCluster
> -------------------------------------------------------------
>
>                 Key: ACCUMULO-1289
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1289
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: proxy
>            Reporter: Corey J. Nolet
>            Assignee: Corey J. Nolet
>            Priority: Minor
>             Fix For: 1.4.4
>
>         Attachments: ACCUMULO-1289.patch
>
>
> Currently the SimpleTest for the proxy server backported from 1.5 is using MockAccumulo
behind it- which isn't making me confident about the proxy and how it may change over time
with future bug fixes.

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