[ 
https://issues.apache.org/jira/browse/HDFS-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jing Zhao updated HDFS-7600:
----------------------------
    Attachment: HDFS-7600.000.patch

Thanks for creating the jira, Yi! Upload a patch to refactor the code. In 
general, the patch moves the common static methods and the HelperCommand from 
StoragePolicyAdmin, CacheAdmin and CryptoAdmin into a new class AdminHelper.

> Refine hdfs admin classes to reuse common code
> ----------------------------------------------
>
>                 Key: HDFS-7600
>                 URL: https://issues.apache.org/jira/browse/HDFS-7600
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Yi Liu
>            Assignee: Jing Zhao
>         Attachments: HDFS-7600.000.patch
>
>
> As the review comment in HDFS-7323. 
> In {{StoragePolicyAdmin}} and other class under 
> {{org.apache.hadoop.hdfs.tools}}, such as {{CacheAdmin}}, {{CryptoAdmin}}. 
> There are too many common methods ({{getDFS}}, {{prettifyException}}, 
> {{getOptionDescriptionListing}} ...) and also inner class ({{HelpCommand}}), 
> they are the same, it would be great if we can refine and shift them into a 
> common place.
> This makes the code clean and can be re-used if we add new hdfs admin class 
> in future.



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

Reply via email to