Skip to content

Commit

Permalink
Revert "HBASE-25449 'dfs.client.read.shortcircuit' should not be set …
Browse files Browse the repository at this point in the history
…in hbase-default.xml"

This reverts commit 49aba57.
  • Loading branch information
Apache9 committed Jan 12, 2021
1 parent 686b72c commit c218e57
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 103 deletions.
4 changes: 2 additions & 2 deletions hbase-common/src/main/resources/hbase-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,15 +1461,15 @@ 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.
</description>
</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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
42 changes: 0 additions & 42 deletions hbase-common/src/test/resources/hdfs-default.xml

This file was deleted.

42 changes: 0 additions & 42 deletions hbase-common/src/test/resources/hdfs-scr-enabled.xml

This file was deleted.

0 comments on commit c218e57

Please sign in to comment.