Przeglądaj źródła

HADOOP-19376. Add fs.hdfs.impl.disable.cache to core-default.xml. (#7249)

Add fs.hdfs.impl.disable.cache to core-default.xml.

This is false, as the default has always been -this just makes the option
more visible for people looking for it.
It also adds details to emphasise the performance hit of disabling the cache

Contributed by hfutatzhanghb
hfutatzhanghb 4 miesięcy temu
rodzic
commit
fd653fa988

+ 11 - 0
hadoop-common-project/hadoop-common/src/main/resources/core-default.xml

@@ -4468,4 +4468,15 @@ The switch to turn S3A auditing on or off.
     <description>The AbstractFileSystem for Ozone FileSystem o3fs uri</description>
     <description>The AbstractFileSystem for Ozone FileSystem o3fs uri</description>
   </property>
   </property>
 
 
+  <property>
+    <name>fs.hdfs.impl.disable.cache</name>
+    <value>false</value>
+    <description>Whether disable cached hdfs filesystem instances or not.
+      If false, return a cached hdfs fileSystem instance to the caller if exists.
+      If true, a new hdfs fileSystem instance will be created,
+      initialized with the configuration and URI, cached and returned to the caller,
+      it is slower than using cached hdfs filesystme instances.
+      </description>
+  </property>
+
 </configuration>
 </configuration>

+ 1 - 0
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java

@@ -227,6 +227,7 @@ public class TestCommonConfigurationFields extends TestConfigurationFieldsBase {
     xmlPropsToSkipCompare.add("hadoop.common.configuration.version");
     xmlPropsToSkipCompare.add("hadoop.common.configuration.version");
     // - org.apache.hadoop.fs.FileSystem
     // - org.apache.hadoop.fs.FileSystem
     xmlPropsToSkipCompare.add("fs.har.impl.disable.cache");
     xmlPropsToSkipCompare.add("fs.har.impl.disable.cache");
+    xmlPropsToSkipCompare.add("fs.hdfs.impl.disable.cache");
 
 
     // - package org.apache.hadoop.tracing.TraceUtils ?
     // - package org.apache.hadoop.tracing.TraceUtils ?
     xmlPropsToSkipCompare.add("hadoop.htrace.span.receiver.classes");
     xmlPropsToSkipCompare.add("hadoop.htrace.span.receiver.classes");