HDFS-3760. primitiveCreate is a write, not a read. Contributed by Andy Isaacson.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1370649 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2012-08-08 02:53:56 +00:00
parent c12e994eda
commit 34554d1e11
2 changed files with 3 additions and 1 deletions

View File

@ -566,6 +566,8 @@ Branch-2 ( Unreleased changes )
HDFS-3754. BlockSender doesn't shutdown ReadaheadPool threads. (eli) HDFS-3754. BlockSender doesn't shutdown ReadaheadPool threads. (eli)
HDFS-3760. primitiveCreate is a write, not a read. (Andy Isaacson via atm)
BREAKDOWN OF HDFS-3042 SUBTASKS BREAKDOWN OF HDFS-3042 SUBTASKS
HDFS-2185. HDFS portion of ZK-based FailoverController (todd) HDFS-2185. HDFS portion of ZK-based FailoverController (todd)

View File

@ -247,7 +247,7 @@ protected HdfsDataOutputStream primitiveCreate(Path f,
FsPermission absolutePermission, EnumSet<CreateFlag> flag, int bufferSize, FsPermission absolutePermission, EnumSet<CreateFlag> flag, int bufferSize,
short replication, long blockSize, Progressable progress, short replication, long blockSize, Progressable progress,
int bytesPerChecksum) throws IOException { int bytesPerChecksum) throws IOException {
statistics.incrementReadOps(1); statistics.incrementWriteOps(1);
return new HdfsDataOutputStream(dfs.primitiveCreate(getPathName(f), return new HdfsDataOutputStream(dfs.primitiveCreate(getPathName(f),
absolutePermission, flag, true, replication, blockSize, absolutePermission, flag, true, replication, blockSize,
progress, bufferSize, bytesPerChecksum),statistics); progress, bufferSize, bytesPerChecksum),statistics);