You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/30 16:04:00 UTC

[GitHub] [hadoop] 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

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:
users@infra.apache.org


With regards,
Apache Git Services

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