From c218e576fe54df208e277365f1ac24f993f2a4b1 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Tue, 12 Jan 2021 16:08:54 +0800 Subject: [PATCH] Revert "HBASE-25449 'dfs.client.read.shortcircuit' should not be set in hbase-default.xml" This reverts commit 49aba571813f649a2ff4482a2209ee9910cc72c3. --- .../src/main/resources/hbase-default.xml | 4 +- .../hadoop/hbase/TestHBaseConfiguration.java | 17 -------- .../src/test/resources/hdfs-default.xml | 42 ------------------- .../src/test/resources/hdfs-scr-enabled.xml | 42 ------------------- 4 files changed, 2 insertions(+), 103 deletions(-) delete mode 100644 hbase-common/src/test/resources/hdfs-default.xml delete mode 100644 hbase-common/src/test/resources/hdfs-scr-enabled.xml diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml index 20f3881edb2c..9092dd147198 100644 --- a/hbase-common/src/main/resources/hbase-default.xml +++ b/hbase-common/src/main/resources/hbase-default.xml @@ -1461,7 +1461,7 @@ possible configurations would overwhelm and obscure the important. dfs.client.read.shortcircuit - + false If set to true, this configuration parameter enables short-circuit local reads. @@ -1469,7 +1469,7 @@ possible configurations would overwhelm and obscure the important. dfs.domain.socket.path - + none This is a path to a UNIX domain socket that will be used for communication between the DataNode and local HDFS clients, if diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java index 1144f1daf351..6a0b4283ed03 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java @@ -115,23 +115,6 @@ public void testSecurityConfCaseInsensitive() { conf.set("hbase.security.authentication", "KERBeros"); Assert.assertTrue(User.isHBaseSecurityEnabled(conf)); } - - @Test - public void testGetConfigOfShortcircuitRead() throws Exception { - Configuration conf = HBaseConfiguration.create(); - Configuration.addDefaultResource("hdfs-default.xml"); - assertEquals("hdfs-default.xml", - conf.getPropertySources("dfs.client.read.shortcircuit")[0]); - assertEquals("false", conf.get("dfs.client.read.shortcircuit")); - assertNull(conf.get("dfs.domain.socket.path")); - Configuration.addDefaultResource("hdfs-scr-enabled.xml"); - assertEquals("hdfs-scr-enabled.xml", - conf.getPropertySources("dfs.client.read.shortcircuit")[0]); - assertEquals("hdfs-scr-enabled.xml", - conf.getPropertySources("dfs.domain.socket.path")[0]); - assertEquals("true", conf.get("dfs.client.read.shortcircuit")); - assertEquals("/var/lib/hadoop-hdfs/dn_socket", conf.get("dfs.domain.socket.path")); - } private static class ReflectiveCredentialProviderClient { public static final String HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME = diff --git a/hbase-common/src/test/resources/hdfs-default.xml b/hbase-common/src/test/resources/hdfs-default.xml deleted file mode 100644 index fdb3c36edc87..000000000000 --- a/hbase-common/src/test/resources/hdfs-default.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - dfs.client.read.shortcircuit - false - - If set to true, this configuration parameter enables short-circuit local - reads. - - - - dfs.domain.socket.path - - - Optional. This is a path to a UNIX domain socket that will be used for - communication between the DataNode and local HDFS clients. - If the string "_PORT" is present in this path, it will be replaced by the - TCP port of the DataNode. - - - diff --git a/hbase-common/src/test/resources/hdfs-scr-enabled.xml b/hbase-common/src/test/resources/hdfs-scr-enabled.xml deleted file mode 100644 index 8594494782c5..000000000000 --- a/hbase-common/src/test/resources/hdfs-scr-enabled.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - dfs.client.read.shortcircuit - true - - If set to true, this configuration parameter enables short-circuit local - reads. - - - - dfs.domain.socket.path - /var/lib/hadoop-hdfs/dn_socket - - Optional. This is a path to a UNIX domain socket that will be used for - communication between the DataNode and local HDFS clients. - If the string "_PORT" is present in this path, it will be replaced by the - TCP port of the DataNode. - - -