mcvsubbu commented on a change in pull request #3834: Unify move method in 
PinotFS
URL: https://github.com/apache/incubator-pinot/pull/3834#discussion_r256912100
 
 

 ##########
 File path: 
pinot-azure-filesystem/src/main/java/org/apache/pinot/filesystem/AzurePinotFS.java
 ##########
 @@ -100,6 +100,18 @@ public boolean delete(URI segmentUri, boolean forceDelete)
   @Override
   public boolean move(URI srcUri, URI dstUri, boolean overwrite)
       throws IOException {
+    if (exists(dstUri)) {
+      if (overwrite) {
+        delete(dstUri, true);
+      } else {
+        // dst file exists, returning
+        return false;
+      }
+    } else {
+      URI parentUri = Paths.get(dstUri).toUri();
 
 Review comment:
   Am i reading this right that we are essentially creating dstUri as a 
directory but asking the user to pass the input param a a file?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to