You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Benjamin Teke (Jira)" <ji...@apache.org> on 2023/01/11 10:08:00 UTC

[jira] [Created] (YARN-11415) Refactor TestConfigurationFieldsBase and the connected test classes

Benjamin Teke created YARN-11415:
------------------------------------

             Summary: Refactor TestConfigurationFieldsBase and the connected test classes
                 Key: YARN-11415
                 URL: https://issues.apache.org/jira/browse/YARN-11415
             Project: Hadoop YARN
          Issue Type: Improvement
            Reporter: Benjamin Teke


YARN-11413 pointed out a strange way of how the configuration tests are executed. The first problem is that there is a [Pattern|https://github.com/apache/hadoop/blob/570b503e3e7e7adf5b0a8fabca76003298216543/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java#L197], that matches only numbers, letters, dots, hyphens and underscores, but not %, which is used in string replacements (i.e {{yarn.nodemanager.aux-services.%s.classpath}} ), so essentially every property that's present in any configuration object and doesn't match this pattern is silently skipped, and documenting it will result in invalid test failures, ergo the test encourages introducing props and not documenting them. The pattern should be fixed in YARN-11413 for %s, but it's necessity could be checked. 

Another issue with this is that it works in a semi-opposite way of what it's supposed to do. To ensure all of the configuration entries are documented it should iterate through all of the configuration fields and check if those have matching xyz-default.xml entries, but currently it just reports the entries that are present in the xyz-default.xml and missing in the matching configuration file.

Lastly the logging should be improved, as {{LOG_CONFIG.debug("  Passes Regex: false");}} isn't providing any useful information, at least the name of the config should be logged.



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

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