[ 
https://issues.apache.org/jira/browse/HDDS-2057?focusedWorklogId=304351&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-304351
 ]

ASF GitHub Bot logged work on HDDS-2057:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Aug/19 16:04
            Start Date: 30/Aug/19 16:04
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on 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]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 304351)
    Remaining Estimate: 0h
            Time Spent: 10m

> Incorrect Default OM Port in Ozone FS URI Error Message
> -------------------------------------------------------
>
>                 Key: HDDS-2057
>                 URL: https://issues.apache.org/jira/browse/HDDS-2057
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Filesystem
>            Reporter: Supratim Deka
>            Assignee: Supratim Deka
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The error message displayed from BasicOzoneFilesystem.initialize specifies 
> 5678 as the OM port. This is not the default port.
> "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";
>  
> This should be fixed to pull the default value from the configuration 
> parameter, instead of a hard-coded value.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to