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_r255703103
 
 

 ##########
 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:
   One thing that occurs to me as I review something like this, is that for 
some (slow) FS, the latency of making each call may be so bad, that we are 
better off calling some native file system method and you get what you get. 
Going this route is relatively easy, and we just need to make sure that Pinot's 
requirements are met in all file system (i.e. if Pinot uses the case of copying 
from a dir to a file and that case works fine across everything, then that is 
alll we need).
   
   Let us discuss a bit more before we put in too much work to unify file 
systems.

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