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

Christopher Tubbs commented on ACCUMULO-2992:
---------------------------------------------

I took a look at the patch, and it looks fine, but what seems to be missing is 
an explanation as to why the old method was deprecated.

This code was deprecated because clients shouldn't be expected to be able to 
have knowledge of, or permission to use, a server's configuration. For 
backwards-compatibility and convenience, the use of this deprecated code was 
left in the shell, with warnings suppressed, under the understanding that 
eventually the shell would cease to use site configuration at all at some 
point. Refactoring to use a different method doesn't address the original 
issue, but just moves the concerns to a new location.

The use of site configuration should continue to be considered deprecated 
within client code (including the shell), though, but that's not obvious with 
this patch, which in removing the use of deprecated code, appears to have 
resolved any concerns. Perhaps along with this patch, there's some comment 
which can be made to clarify in the code to future developers that the use of 
SiteConfiguration now (vs. the old method) should be considered deprecated in 
the shell?

> Eliminate (use of) AccumuloConfiguration.getSiteConfiguration()
> ---------------------------------------------------------------
>
>                 Key: ACCUMULO-2992
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2992
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Bill Havanki
>            Assignee: Bill Havanki
>            Priority: Trivial
>              Labels: configuration
>             Fix For: 1.6.1, 1.7.0
>
>
> The static method {{AccumuloConfiguration.getSiteConfiguration()}} has been 
> deprecated for a long time. [~ecn] got rid of a lot of uses in ACCUMULO-2401. 
> This ticket is to get rid of the rest. Each call can be replaced with:
> {code}
> SiteConfiguration.getInstance(DefaultConfiguration.getInstance());
> {code}
> The method itself can also be eliminated, as {{AccumuloConfiguration}} is not 
> public API, assuming the elimination would not cause a problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to