You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/22 11:21:20 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #1105: HDDS-3828. Configuration parsing of ozone insight should be based on fields

adoroszlai commented on a change in pull request #1105:
URL: https://github.com/apache/hadoop-ozone/pull/1105#discussion_r443489367



##########
File path: hadoop-ozone/insight/src/main/java/org/apache/hadoop/ozone/insight/ConfigurationSubCommand.java
##########
@@ -71,9 +71,9 @@ private void showConfig(Class clazz, Type type) {
 
     String prefix = configGroup.prefix();
 
-    for (Method method : clazz.getMethods()) {
-      if (method.isAnnotationPresent(Config.class)) {
-        Config config = method.getAnnotation(Config.class);
+    for (Field field : clazz.getDeclaredFields()) {

Review comment:
       Shouldn't it handle inherited fields, too?  I don't think we have such a configuration object hierarchy currently, but injection is prepared for it:
   
   https://github.com/apache/hadoop-ozone/blob/53549eea6f5dfc8e4cc9594583d7510b206a8acd/hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigurationReflectionUtil.java#L37-L44




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org