You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/01/12 08:19:51 UTC

[hbase] branch branch-2.2 updated: Revert "HBASE-25449 'dfs.client.read.shortcircuit' should not be set in hbase-default.xml"

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new b223e84  Revert "HBASE-25449 'dfs.client.read.shortcircuit' should not be set in hbase-default.xml"
b223e84 is described below

commit b223e84c5ae838fd4f255746b5c28e067048572a
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Tue Jan 12 16:19:13 2021 +0800

    Revert "HBASE-25449 'dfs.client.read.shortcircuit' should not be set in hbase-default.xml"
    
    This reverts commit 9e4e808701af356df17a85b32e1945aea0eb0ef6.
---
 hbase-common/src/main/resources/hbase-default.xml  |  4 +--
 .../hadoop/hbase/TestHBaseConfiguration.java       | 17 ---------
 hbase-common/src/test/resources/hdfs-default.xml   | 42 ----------------------
 .../src/test/resources/hdfs-scr-enabled.xml        | 42 ----------------------
 4 files changed, 2 insertions(+), 103 deletions(-)

diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml
index 435f4b4..367b24a 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -1378,7 +1378,7 @@ possible configurations would overwhelm and obscure the important.
   </property>
   <property>
     <name>dfs.client.read.shortcircuit</name>
-    <value></value>
+    <value>false</value>
     <description>
       If set to true, this configuration parameter enables short-circuit local
       reads.
@@ -1386,7 +1386,7 @@ possible configurations would overwhelm and obscure the important.
   </property>
   <property>
     <name>dfs.domain.socket.path</name>
-    <value></value>
+    <value>none</value>
     <description>
       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 1144f1d..6a0b428 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 class TestHBaseConfiguration {
     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 fdb3c36..0000000
--- a/hbase-common/src/test/resources/hdfs-default.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<configuration>
-  <property>
-    <name>dfs.client.read.shortcircuit</name>
-    <value>false</value>
-    <description>
-      If set to true, this configuration parameter enables short-circuit local
-      reads.
-    </description>
-  </property>
-  <property>
-    <name>dfs.domain.socket.path</name>
-    <value></value>
-    <description>
-    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.
-    </description>
-  </property>
-</configuration>
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 8594494..0000000
--- a/hbase-common/src/test/resources/hdfs-scr-enabled.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<configuration>
-  <property>
-    <name>dfs.client.read.shortcircuit</name>
-    <value>true</value>
-    <description>
-      If set to true, this configuration parameter enables short-circuit local
-      reads.
-    </description>
-  </property>
-  <property>
-    <name>dfs.domain.socket.path</name>
-    <value>/var/lib/hadoop-hdfs/dn_socket</value>
-    <description>
-    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.
-    </description>
-  </property>
-</configuration>