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_r255701989
 
 

 ##########
 File path: 
pinot-hadoop-filesystem/src/main/java/org/apache/pinot/filesystem/HadoopPinotFS.java
 ##########
 @@ -105,31 +118,87 @@ public boolean move(URI srcUri, URI dstUri, boolean 
overwrite)
   @Override
   public boolean copy(URI srcUri, URI dstUri)
       throws IOException {
-    Path source = new Path(srcUri);
-    Path target = new Path(dstUri);
-    RemoteIterator<LocatedFileStatus> sourceFiles = 
_hadoopFS.listFiles(source, true);
-    if (sourceFiles != null) {
-      while (sourceFiles.hasNext()) {
-        boolean succeeded =
-            FileUtil.copy(_hadoopFS, sourceFiles.next().getPath(), _hadoopFS, 
target, true, _hadoopConf);
-        if (!succeeded) {
-          return false;
+    if (!exists(srcUri)) {
 
 Review comment:
   Maybe use a base class and move these there? You can add a TODO

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pinot.apache.org
For additional commands, e-mail: dev-h...@pinot.apache.org

Reply via email to