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

Stamatis Zampetakis commented on HADOOP-19769:
----------------------------------------------

A quick POC can be found here: 
[https://github.com/zabetak/hadoop/tree/deprecation-check-plugin]

Currently it outputs the following:
{noformat}
[INFO] Collected deprecated properties in 1016 ms
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-common-project/hadoop-common/target/classes/core-default.xml
 contains deprecated property: io.bytes.per.checksum
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-common-project/hadoop-common/target/classes/core-default.xml
 contains deprecated property: fs.default.name
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-hdfs-project/hadoop-hdfs/target/classes/hdfs-default.xml
 contains deprecated property: nfs.allow.insecure.ports
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/target/classes/yarn-default.xml
 contains deprecated property: 
yarn.resourcemanager.system-metrics-publisher.enabled
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/classes/yarn-default.xml
 contains deprecated property: 
yarn.resourcemanager.system-metrics-publisher.enabled
[INFO] File 
/home/zabetak/Projects/Apache/hadoop/hadoop-tools/hadoop-distcp/target/classes/distcp-default.xml
 contains deprecated property: mapreduce.reduce.class
[INFO] Checked configuration files for deprecations in 202 ms
{noformat}

> New maven plugin for checking XML files for deprecated properties
> -----------------------------------------------------------------
>
>                 Key: HADOOP-19769
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19769
>             Project: Hadoop Common
>          Issue Type: Task
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>
> Some of the configuration files that exist in the project contain deprecated 
> properties. Files such as 
> [core-default.xml|https://github.com/apache/hadoop/blob/ee73a9b7db7db9d213354c5ffc33c3d8027c10c6/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml]
>  act as templates for end-users and serve as basis in every new deployment. 
> Leaving deprecated properties in the templates leads to the proliferation of 
> deprecations  increasing technical debt.
> I propose to implement a new maven plugin that collects all deprecated 
> properties present in the project (using bytecode analysis) and then checks 
> that the XML configuration files (at least *default.xml) do not contain such 
> entries.
> Given that the deprecation definitions are spread across modules and they 
> require the class to be loaded its difficult/impossible to perform the checks 
> using regular unit testing thus a custom maven plugin seems to be the 
> cleanest option.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to