[
https://issues.apache.org/jira/browse/HDFS-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063435#comment-13063435
]
Ravi Prakash commented on HDFS-2119:
------------------------------------
I tried reducing the duplicated code, but unfortunately its tough.
1. If I try to use common's VersionInfo.java to accept an argument for the name
of the package whose annotation would be read, I would have to call {noformat}
Class myClass = ClassLoader.getSystemClassLoader().loadClass(args[0]);
version =
myClass.getPackage().getAnnotation(HdfsVersionAnnotation.class);
{noformat} and HdfsVersionAnnotation cannot defined in common.
2. Since I can't extend annotations, HdfsVersionAnnotation can't be extended
from HadoopVersionAnnotation
3. If I were to write create HadoopVersionAnnotation from
hdfs/src/saveVersion.sh , there'd be ambiguity in the package info.
Can anyone suggest a way I can reduce the duplicated code? Or should I create a
properties file? Any suggestions anyone?
> "hdfs version" should print out information similar to what "hadoop version"
> prints out
> ---------------------------------------------------------------------------------------
>
> Key: HDFS-2119
> URL: https://issues.apache.org/jira/browse/HDFS-2119
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 0.22.0
> Reporter: Ravi Prakash
> Assignee: Ravi Prakash
> Priority: Minor
> Fix For: 0.22.0
>
> Attachments: HDFS-2119.1.patch, HDFS-2119.2.patch
>
>
> Implement version in hdfs
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira