Browse Source

AMBARI-25288: Copy File Operation in Filesview is overwriting the file (#3473)

Zhiguo Wu 3 years ago
parent
commit
8883fbc9af

+ 1 - 1
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java

@@ -463,7 +463,7 @@ public class HdfsApi {
   public void copy(final String src, final String dest) throws IOException, InterruptedException, HdfsApiException {
   public void copy(final String src, final String dest) throws IOException, InterruptedException, HdfsApiException {
     boolean result = execute(new PrivilegedExceptionAction<Boolean>() {
     boolean result = execute(new PrivilegedExceptionAction<Boolean>() {
       public Boolean run() throws Exception {
       public Boolean run() throws Exception {
-        return FileUtil.copy(fs, new Path(src), fs, new Path(dest), false, conf);
+        return FileUtil.copy(fs, new Path(src), fs, new Path(dest), false, false, conf);
       }
       }
     });
     });