accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3604) connector.instanceOperations().setSystemProperty(String,String) returns silently for non-changeable ZK Property's
Date Wed, 29 Apr 2015 14:52:08 GMT

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

Josh Elser commented on ACCUMULO-3604:
--------------------------------------

[~jschwartz73] and I were working on this last night at the Hackathon at Accumulo Summit.
One thing we walked through was how the IllegalArgumentException is thrown in the Master and
how that filters back to the client.

I believe we came to the following assessment:

* Server throws IllegalArgumentException
* Client receives TException with good message about cause of error from the server
* Client wraps TException as AccumuloException which goes back to the client.

This prevents an otherwise simple ticket from needing to change the Thrift method definition
(to throw a named exception or return a boolean to denote expected failure due to a non-ZK
mutable property).

{code}
+   * Only some properties can be changed by this method, an IllegalArgumentException will
be thrown if a read-only property is set.
    *
    * @param property
    *          the name of a per-table property
@@ -39,6 +40,8 @@ public interface InstanceOperations {
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission
+   * @throws IllegalArgumentException
+   *           if the property being set is read-only
{code}

As such, I believe the above needs to be restated. I think the extra {{@throws}} can be removed,
but the javadoc description just needs to be rewritten. This is something I can just fix before
I apply your patch. Is that ok with you, [~jschwartz73]?

> connector.instanceOperations().setSystemProperty(String,String) returns silently for
non-changeable ZK Property's
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-3604
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3604
>             Project: Accumulo
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2
>            Reporter: Josh Elser
>            Assignee: Jeffrey S Schwartz
>              Labels: newbie, summit2015
>             Fix For: 1.5.3, 1.6.3, 1.8.0, 1.7.1
>
>         Attachments: ACCUMULO-3604.patch
>
>
> Only a subset of the configuration {{Property}}'s in Accumulo are modifiable via ZooKeeper
(defined by {{Property.isValidZooProperty}}).
> {{connector.instanceOperations().setProperty(String,String)}} updates the provided property
name with the given value in ZooKeeper. The thing that is never mentioned is that only a subset
of the properties in Accumulo are allowed to be overriden in ZooKeeper. Furthermore, the user
receives no indication that their call failed.
> The Javadoc on {{setSystemProperty(String,String)}} should be updated to inform the users
that only some properties can be changed by this method, and some information should be returned
back to the user to let them know that their call did not succeed (likely an Exception).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message