diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java index b0d8a944da..7e67b11657 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java @@ -273,10 +273,10 @@ public FSCreate(InputStream is, String path, String perm, boolean override, shor @Override public Void execute(FileSystem fs) throws IOException { if (replication == -1) { - replication = (short) fs.getConf().getInt("dfs.replication", 3); + replication = fs.getDefaultReplication(); } if (blockSize == -1) { - blockSize = fs.getConf().getInt("dfs.block.size", 67108864); + blockSize = fs.getDefaultBlockSize(); } FsPermission fsPermission = getPermission(permission); int bufferSize = fs.getConf().getInt("httpfs.buffer.size", 4096); diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 620b226d33..2b478692d5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -258,6 +258,8 @@ Release 0.23.1 - UNRELEASED HDFS-2574. Remove references to some deprecated properties in conf templates and defaults files. (Joe Crobak via harsh) + HDFS-2722. HttpFs should not be using an int for block size. (harsh) + OPTIMIZATIONS HDFS-2130. Switch default checksum to CRC32C. (todd)