accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Created] (ACCUMULO-2133) [API] Better exceptions for invalid table/namespace arg
Date Sat, 04 Jan 2014 20:52:50 GMT
Christopher Tubbs created ACCUMULO-2133:

             Summary: [API] Better exceptions for invalid table/namespace arg
                 Key: ACCUMULO-2133
             Project: Accumulo
          Issue Type: Improvement
          Components: client
            Reporter: Christopher Tubbs

It has been discussed in IRC that we should have better exceptions exposed through to the
public API when arguments for table names and namespaces are not valid for the given operation.

One proposal was to create an InvalidNameException (or similar) to extend IllegalArgumentException
when the provided string value is not appropriate for the operation. (One thing we should
be careful about here, is making a separate exception or code for every nuanced and distinct
reason why the argument is invalid.)

Another suggestion was to make additional checked exceptions to handle these invalid argument
values. This idea could be a separate exception or one that extends a base checked exception
type (which currently doesn't exist for Accumulo).

The current behavior (1.6.0-SNAPSHOT) is to throw an AccumuloException, often with a ThriftTableOperationException
as its cause, which contains an INVALID_NAME code and a description specific to the cause.
This is how the server sends the information back to the client when it fails argument checks.
This ticket is regarding how the client should expose that exception back to the consumer
of the client API.... because the current method of doing it is a bit clunky.

This message was sent by Atlassian JIRA

View raw message