ishaniahuja commented on a change in pull request #2072:
URL: https://github.com/apache/hadoop/pull/2072#discussion_r440095900



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
##########
@@ -1314,7 +1352,30 @@ private String 
convertXmsPropertiesToCommaSeparatedString(final Hashtable<String
     return properties;
   }
 
+  private boolean isKeyForPrefixSet(String key, Set<String> dirSet) {
+
+    for (String dir : dirSet) {
+      if (dir.isEmpty() || key.startsWith(dir)) {
+        return true;
+      }
+
+      try {
+        URI uri = new URI(dir);
+        if (null == uri.getAuthority()) {
+          if (key.startsWith(dir + "/")){
+            return true;
+          }
+        }
+      } catch (URISyntaxException e) {
+        LOG.info("URI syntax error creating URI for {}", dir);

Review comment:
       but what if only one comma separated value is incorrect, we would be 
throwing an exception adn crashing the app/jvm?




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



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

Reply via email to