hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiten...@apache.org
Subject [22/34] git commit: HDFS-7079. Few more unit test fixes for HDFS-6581. (Arpit Agarwal)
Date Fri, 17 Oct 2014 23:31:09 GMT
HDFS-7079. Few more unit test fixes for HDFS-6581. (Arpit Agarwal)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7d168d9f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7d168d9f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7d168d9f

Branch: refs/heads/branch-2.6
Commit: 7d168d9ff9f1c2ba19a7fc698578c1c69b90de50
Parents: d3ccbd8
Author: arp <arp@apache.org>
Authored: Tue Sep 16 18:19:57 2014 -0700
Committer: Jitendra Pandey <Jitendra@Jitendra-Pandeys-MacBook-Pro-4.local>
Committed: Fri Oct 17 16:00:51 2014 -0700

----------------------------------------------------------------------
 .../hadoop/fs/shell/CommandWithDestination.java | 23 ++++++++++----------
 1 file changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7d168d9f/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java
index 7152f02..65e52fd 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java
@@ -473,19 +473,20 @@ abstract class CommandWithDestination extends FsCommand {
     FSDataOutputStream create(PathData item, boolean lazyPersist)
         throws IOException {
       try {
-        EnumSet<CreateFlag> createFlags = EnumSet.of(CREATE);
         if (lazyPersist) {
-          createFlags.add(LAZY_PERSIST);
+          EnumSet<CreateFlag> createFlags = EnumSet.of(CREATE, LAZY_PERSIST);
+          return create(item.path,
+                        FsPermission.getFileDefault().applyUMask(
+                            FsPermission.getUMask(getConf())),
+                        createFlags,
+                        getConf().getInt("io.file.buffer.size", 4096),
+                        lazyPersist ? 1 : getDefaultReplication(item.path),
+                        getDefaultBlockSize(),
+                        null,
+                        null);
+        } else {
+          return create(item.path, true);
         }
-        return create(item.path,
-                      FsPermission.getFileDefault().applyUMask(
-                          FsPermission.getUMask(getConf())),
-                      createFlags,
-                      getConf().getInt("io.file.buffer.size", 4096),
-                      lazyPersist ? 1 : getDefaultReplication(item.path),
-                      getDefaultBlockSize(),
-                      null,
-                      null);
       } finally { // might have been created but stream was interrupted
         deleteOnExit(item.path);
       }


Mime
View raw message