bharatviswa504 commented on a change in pull request #1377: HDDS-2057.
Incorrect Default OM Port in Ozone FS URI Error Message. Contributed by
Supratim Deka
URL: https://github.com/apache/hadoop/pull/1377#discussion_r319579030
##########
File path:
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
##########
@@ -87,11 +87,15 @@
private static final Pattern URL_SCHEMA_PATTERN =
Pattern.compile("([^\\.]+)\\.([^\\.]+)\\.{0,1}(.*)");
- private static final String URI_EXCEPTION_TEXT = "Ozone file system URL " +
- "should be one of the following formats: " +
- "o3fs://bucket.volume/key OR " +
- "o3fs://bucket.volume.om-host.example.com/key OR " +
- "o3fs://bucket.volume.om-host.example.com:5678/key";
+ private String getUriExceptionText(Configuration conf) {
+ final String URI_EXCEPTION_TEXT = "Ozone file system URL " +
+ "should be one of the following formats: " +
+ "o3fs://bucket.volume/key OR " +
+ "o3fs://bucket.volume.om-host.example.com/key OR " +
+ "o3fs://bucket.volume.om-host.example.com:" +
+ OmUtils.getOmRpcPort(conf) + "/key";
Review comment:
This might not work here, as here the configuration object can be not an
instance of OzoneConfiguration, then ozone-site.xml and ozone-default.xml will
not be added to resources.
The check is done inside BasicOzoneClientAdapterImpl.java
https://github.com/apache/hadoop/blob/trunk/hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java#L112
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]