You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/01/06 18:29:05 UTC

[GitHub] [hbase] joshelser commented on a change in pull request #2816: HBASE-25449 'dfs.client.read.shortcircuit' should not be set in hbase-default.xml

joshelser commented on a change in pull request #2816:
URL: https://github.com/apache/hbase/pull/2816#discussion_r552888938



##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
##########
@@ -115,6 +115,19 @@ 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"));
+    Configuration.addDefaultResource("hdfs-site.xml");

Review comment:
       Can you rename `hdfs-site` to be some other name, just to avoid other tests inadvertently picking up this configuration file, please?

##########
File path: hbase-common/src/main/resources/hbase-default.xml
##########
@@ -1463,7 +1463,7 @@ possible configurations would overwhelm and obscure the important.
   </property>
   <property>
     <name>dfs.client.read.shortcircuit</name>
-    <value>false</value>
+    <value></value>

Review comment:
       (can't comment on the proper line)
   
   but I think we also need to remove `dfs.domain.socket.path` and its default value of 'none', as that will mask the real domain socket path from hdfs-site

##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java
##########
@@ -115,6 +115,19 @@ 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"));
+    Configuration.addDefaultResource("hdfs-site.xml");

Review comment:
       e.g. `hdfs-scr-enabled.xml`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org