ayushtkn commented on code in PR #5704:
URL: https://github.com/apache/ozone/pull/5704#discussion_r1410204758


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/HadoopFsGenerator.java:
##########
@@ -87,6 +87,10 @@ public Void call() throws Exception {
 
     configuration = createOzoneConfiguration();
     uri = URI.create(rootPath);
+    String scheme = uri.getScheme();
+    if (scheme == null) {

Review Comment:
   does this work?
   ```
       if (!uri.isAbsolute()) {
   ```
   



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/HadoopFsGenerator.java:
##########
@@ -87,6 +87,10 @@ public Void call() throws Exception {
 
     configuration = createOzoneConfiguration();
     uri = URI.create(rootPath);
+    String scheme = uri.getScheme();
+    if (scheme == null) {
+      throw new IllegalArgumentException("--path requires FQDN");
+    }

Review Comment:
   Shouldn't we use the default FS in that case? If no FS is specified 
explicitly, the defaultFs should be used, right? Something like this:
   ```
       if (scheme == null) {
         URI defaultUri = FileSystem.getDefaultUri(configuration)
         uri = new URI(defaultUri.getScheme(), defaultUri.getAuthority(), 
uri.getPath());
       }
   ``` 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to