Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2589 Create new client API
  3. ACCUMULO-2133

[API] Better exceptions for invalid table/namespace arg

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • client

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ctubbsii Christopher Tubbs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: