You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ar...@apache.org on 2014/09/17 03:20:26 UTC
[8/9] git commit: HDFS-7079. Few more unit test fixes for HDFS-6581.
(Arpit Agarwal)
HDFS-7079. Few more unit test fixes for HDFS-6581. (Arpit Agarwal)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dcbc4673
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dcbc4673
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dcbc4673
Branch: refs/heads/HDFS-6581
Commit: dcbc46730131a1bdf8416efeb4571794e5c8e369
Parents: a24a933
Author: arp <ar...@apache.org>
Authored: Tue Sep 16 18:19:57 2014 -0700
Committer: arp <ar...@apache.org>
Committed: Tue Sep 16 18:19:57 2014 -0700
----------------------------------------------------------------------
.../hadoop/fs/shell/CommandWithDestination.java | 23 ++++++++++----------
.../hadoop-hdfs/CHANGES-HDFS-6581.txt | 2 ++
2 files changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dcbc4673/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);
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dcbc4673/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
index f6c8672..e1f51c1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
@@ -50,4 +50,6 @@
HDFS-7064. Fix unit test failures in HDFS-6581 branch. (Xiaoyu Yao via
Arpit Agarwal)
+ HDFS-6581. Few more unit test fixes for HDFS-6581. (Arpit Agarwal)
+