mcvsubbu commented on a change in pull request #3671: Make different PinotFS
concrete classes have the same behaviors
URL: https://github.com/apache/incubator-pinot/pull/3671#discussion_r255701113
##########
File path:
pinot-hadoop-filesystem/src/main/java/org/apache/pinot/filesystem/HadoopPinotFS.java
##########
@@ -92,9 +96,18 @@ public boolean delete(URI segmentUri, boolean forceDelete)
@Override
public boolean move(URI srcUri, URI dstUri, boolean overwrite)
throws IOException {
- if (exists(dstUri) && !overwrite) {
+ if (!exists(srcUri)) {
+ LOGGER.warn("Source {} does not exist", srcUri);
return false;
}
+ if (exists(dstUri)) {
+ if (!overwrite) {
+ return false;
+ } else {
+ delete(dstUri, true);
+ mkdir(dstUri);
Review comment:
not sure why mkdir here. shouldn't we just be doing a move and let the file
system move either a file or a dir?
----------------------------------------------------------------
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]