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

Christopher Tubbs commented on ACCUMULO-2114:
---------------------------------------------

Well, I was thinking that the "default" namespace could be the results of 
getConnector().namespaceOps().getDefaultNamespace(), and the connector-specific 
default namespace would be the results of 
getConnector(namespace).namespaceOps().getDefaultNamespace(). But, I can see 
how this could be non-intuitive for users to understand the answer to the 
question: "What is the *default* default namespace?". Alternatively, we could 
add a separate namespaceOps().getCurrentNamespace() or something. The merits of 
that can be debated later if we decide to pursue that feature.

Other reasons for moving it to namespaceOps():
1. Constants are harder to find if separated into a separate file, because 
users don't know to go looking there if they're working with a separate class.
2. Constants files tend to get bloated, which diminishes their value for 
consumers (although they still have value for refactoring).
3. Encouraging client use of constants, with compile-time binding, means that 
compiled client code could break if we change the value of the constant.


> default namespace name should be part of the public api
> -------------------------------------------------------
>
>                 Key: ACCUMULO-2114
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2114
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: John Vines
>            Assignee: Christopher Tubbs
>             Fix For: 1.6.0
>
>
> The name of the default namespace currently lives in 
> org.apache.accumulo.client.impl.Namespaces which is not part of the public 
> api. We should make this variable part of the public API to make it easier 
> for users to interact with namespaces.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to