fapifta opened a new pull request #103: HDDS-2378 - Change OZONE as string used in the code where OzoneConsts.OZONE is suitable URL: https://github.com/apache/hadoop-ozone/pull/103 ## What changes were proposed in this pull request? In #95 review it came up that the tests could use the OzoneConsts.OZONE constant instead of using the "ozone" string literal, this PR is aiming to address this issue globally in the whole codebase. As it is commented in the JIRA the changes were made in this PR where suitable in the following way: There are some places where we use the string literal "Ozone" which I would not change, the places are: - RocksDBStore, and RDBStore, where it is used to specify the name of jmx keys. - ServerUtils uses it in a function parameter passed to a log message that seems fine. - StorageContainerManager, and OzoneManager uses the full capital in InterfaceAudience annotation, that is fine. - CommonHeadersContainerResponseFilter is using this in headers I would not change the protocol In TestAuthorizationHeaderV4 we use "ozone" that is ok, as we provide a string to parse, and check elements provided, in this case I would not change to a constant makes it harder to read. CreateSubcommand I am unsure, the default is specified with full capital I am not brave enough to change it to the lowercase version, though my instinct tells that it would be most likely ok. Also while going through the S3 related tests, that were coming up with the query, I changed a few other literals to suitable constants, like: "OWNER" -> OzoneConsts.OWNER (makes it lowercase) "VOLUME" -> OzoneConsts.VOLUME (makes it lowercase) "hdfs" -> OzoneConsts.OZONE_SIMPLE_HDFS_USER "xxBucket" -> OzoneConsts.BUCKET "s3Bucket" -> OzoneConsts.S3_BUCKET "key1" -> OzoneConsts.KEY (in cases where only 1 key is used) ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-2378 ## How was this patch tested? There are no change in the code logic, mostly tests were changed, the expectation is that all the JUnit tests should run as they ran before. I have ran most of the changed tests locally, they seemed ok.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org