From 946db612eddea0733f96fcc542d06be3dd53d28e Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Mon, 10 Mar 2014 21:47:45 +0000 Subject: [PATCH] HDFS-6055. Merging change r1576095 from trunk to branch-2. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1576098 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop-hdfs/src/main/resources/hdfs-default.xml | 6 +++--- .../src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 5202814cb4f..2f067d1ae2b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -146,6 +146,9 @@ Release 2.4.0 - UNRELEASED HDFS-6070. Cleanup use of ReadStatistics in DFSInputStream. (wang) + HDFS-6055. Change default configuration to limit file name length in HDFS. + (cnauroth) + OPTIMIZATIONS HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml index c47765e410a..28d5cae5549 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml @@ -281,9 +281,9 @@ dfs.namenode.fs-limits.max-component-length - 0 - Defines the maximum number of characters in each component - of a path. A value of 0 will disable the check. + 255 + Defines the maximum number of bytes in UTF-8 encoding in each + component of a path. A value of 0 will disable the check. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java index 5ef46b01f06..3ce2893b8b3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java @@ -88,6 +88,7 @@ public static void beforeClassSetup() throws Exception { Configuration conf = new HdfsConfiguration(); conf.setBoolean(DFSConfigKeys.DFS_WEBHDFS_ENABLED_KEY, true); conf.set(FsPermission.UMASK_LABEL, "000"); + conf.setInt(DFSConfigKeys.DFS_NAMENODE_MAX_COMPONENT_LENGTH_KEY, 0); cluster = new MiniDFSCluster.Builder(conf).build(); webhdfs = WebHdfsTestUtil.getWebHdfsFileSystem(conf, WebHdfsFileSystem.SCHEME); dfs = cluster.getFileSystem();