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

 ##########
 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:
   Correct the method according to the latest API doc we made in PinotFS 
interface.

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