|
@@ -119,7 +119,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|
/**
|
|
/**
|
|
* Provides access to configuration parameters.
|
|
* Provides access to configuration parameters.
|
|
*
|
|
*
|
|
- * <h3 id="Resources">Resources</h3>
|
|
|
|
|
|
+ * <h2 id="Resources">Resources</h2>
|
|
*
|
|
*
|
|
* <p>Configurations are specified by resources. A resource contains a set of
|
|
* <p>Configurations are specified by resources. A resource contains a set of
|
|
* name/value pairs as XML data. Each resource is named by either a
|
|
* name/value pairs as XML data. Each resource is named by either a
|
|
@@ -130,16 +130,16 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|
*
|
|
*
|
|
* <p>Unless explicitly turned off, Hadoop by default specifies two
|
|
* <p>Unless explicitly turned off, Hadoop by default specifies two
|
|
* resources, loaded in-order from the classpath: <ol>
|
|
* resources, loaded in-order from the classpath: <ol>
|
|
- * <li><tt>
|
|
|
|
|
|
+ * <li><code>
|
|
* <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
|
|
* <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
|
|
- * core-default.xml</a></tt>: Read-only defaults for hadoop.</li>
|
|
|
|
- * <li><tt>core-site.xml</tt>: Site-specific configuration for a given hadoop
|
|
|
|
|
|
+ * core-default.xml</a></code>: Read-only defaults for hadoop.</li>
|
|
|
|
+ * <li><code>core-site.xml</code>: Site-specific configuration for a given hadoop
|
|
* installation.</li>
|
|
* installation.</li>
|
|
* </ol>
|
|
* </ol>
|
|
* Applications may add additional resources, which are loaded
|
|
* Applications may add additional resources, which are loaded
|
|
* subsequent to these resources in the order they are added.
|
|
* subsequent to these resources in the order they are added.
|
|
*
|
|
*
|
|
- * <h4 id="FinalParams">Final Parameters</h4>
|
|
|
|
|
|
+ * <h3 id="FinalParams">Final Parameters</h3>
|
|
*
|
|
*
|
|
* <p>Configuration parameters may be declared <i>final</i>.
|
|
* <p>Configuration parameters may be declared <i>final</i>.
|
|
* Once a resource declares a value final, no subsequently-loaded
|
|
* Once a resource declares a value final, no subsequently-loaded
|
|
@@ -153,9 +153,9 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|
* </property></code></pre>
|
|
* </property></code></pre>
|
|
*
|
|
*
|
|
* Administrators typically define parameters as final in
|
|
* Administrators typically define parameters as final in
|
|
- * <tt>core-site.xml</tt> for values that user applications may not alter.
|
|
|
|
|
|
+ * <code>core-site.xml</code> for values that user applications may not alter.
|
|
*
|
|
*
|
|
- * <h4 id="VariableExpansion">Variable Expansion</h4>
|
|
|
|
|
|
+ * <h3 id="VariableExpansion">Variable Expansion</h3>
|
|
*
|
|
*
|
|
* <p>Value strings are first processed for <i>variable expansion</i>. The
|
|
* <p>Value strings are first processed for <i>variable expansion</i>. The
|
|
* available properties are:<ol>
|
|
* available properties are:<ol>
|
|
@@ -185,22 +185,22 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|
* </property>
|
|
* </property>
|
|
* </code></pre>
|
|
* </code></pre>
|
|
*
|
|
*
|
|
- * <p>When <tt>conf.get("tempdir")</tt> is called, then <tt>${<i>basedir</i>}</tt>
|
|
|
|
|
|
+ * <p>When <code>conf.get("tempdir")</code> is called, then <code>${<i>basedir</i>}</code>
|
|
* will be resolved to another property in this Configuration, while
|
|
* will be resolved to another property in this Configuration, while
|
|
- * <tt>${<i>user.name</i>}</tt> would then ordinarily be resolved to the value
|
|
|
|
|
|
+ * <code>${<i>user.name</i>}</code> would then ordinarily be resolved to the value
|
|
* of the System property with that name.
|
|
* of the System property with that name.
|
|
- * <p>When <tt>conf.get("otherdir")</tt> is called, then <tt>${<i>env.BASE_DIR</i>}</tt>
|
|
|
|
- * will be resolved to the value of the <tt>${<i>BASE_DIR</i>}</tt> environment variable.
|
|
|
|
- * It supports <tt>${<i>env.NAME:-default</i>}</tt> and <tt>${<i>env.NAME-default</i>}</tt> notations.
|
|
|
|
- * The former is resolved to "default" if <tt>${<i>NAME</i>}</tt> environment variable is undefined
|
|
|
|
|
|
+ * <p>When <code>conf.get("otherdir")</code> is called, then <code>${<i>env.BASE_DIR</i>}</code>
|
|
|
|
+ * will be resolved to the value of the <code>${<i>BASE_DIR</i>}</code> environment variable.
|
|
|
|
+ * It supports <code>${<i>env.NAME:-default</i>}</code> and <code>${<i>env.NAME-default</i>}</code> notations.
|
|
|
|
+ * The former is resolved to "default" if <code>${<i>NAME</i>}</code> environment variable is undefined
|
|
* or its value is empty.
|
|
* or its value is empty.
|
|
- * The latter behaves the same way only if <tt>${<i>NAME</i>}</tt> is undefined.
|
|
|
|
|
|
+ * The latter behaves the same way only if <code>${<i>NAME</i>}</code> is undefined.
|
|
* <p>By default, warnings will be given to any deprecated configuration
|
|
* <p>By default, warnings will be given to any deprecated configuration
|
|
* parameters and these are suppressible by configuring
|
|
* parameters and these are suppressible by configuring
|
|
- * <tt>log4j.logger.org.apache.hadoop.conf.Configuration.deprecation</tt> in
|
|
|
|
|
|
+ * <code>log4j.logger.org.apache.hadoop.conf.Configuration.deprecation</code> in
|
|
* log4j.properties file.
|
|
* log4j.properties file.
|
|
*
|
|
*
|
|
- * <h4 id="Tags">Tags</h4>
|
|
|
|
|
|
+ * <h3 id="Tags">Tags</h3>
|
|
*
|
|
*
|
|
* <p>Optionally we can tag related properties together by using tag
|
|
* <p>Optionally we can tag related properties together by using tag
|
|
* attributes. System tags are defined by hadoop.tags.system property. Users
|
|
* attributes. System tags are defined by hadoop.tags.system property. Users
|
|
@@ -220,9 +220,9 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|
* <tag>HDFS,SECURITY</tag>
|
|
* <tag>HDFS,SECURITY</tag>
|
|
* </property>
|
|
* </property>
|
|
* </code></pre>
|
|
* </code></pre>
|
|
- * <p> Properties marked with tags can be retrieved with <tt>conf
|
|
|
|
- * .getAllPropertiesByTag("HDFS")</tt> or <tt>conf.getAllPropertiesByTags
|
|
|
|
- * (Arrays.asList("YARN","SECURITY"))</tt>.</p>
|
|
|
|
|
|
+ * <p> Properties marked with tags can be retrieved with <code>conf
|
|
|
|
+ * .getAllPropertiesByTag("HDFS")</code> or <code>conf.getAllPropertiesByTags
|
|
|
|
+ * (Arrays.asList("YARN","SECURITY"))</code>.</p>
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
@InterfaceStability.Stable
|
|
@InterfaceStability.Stable
|
|
@@ -576,7 +576,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
* It does not override any existing entries in the deprecation map.
|
|
* It does not override any existing entries in the deprecation map.
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* keys, and attempts to call this method after loading resources once,
|
|
* keys, and attempts to call this method after loading resources once,
|
|
- * would lead to <tt>UnsupportedOperationException</tt>
|
|
|
|
|
|
+ * would lead to <code>UnsupportedOperationException</code>
|
|
*
|
|
*
|
|
* If a key is deprecated in favor of multiple keys, they are all treated as
|
|
* If a key is deprecated in favor of multiple keys, they are all treated as
|
|
* aliases of each other, and setting any one of them resets all the others
|
|
* aliases of each other, and setting any one of them resets all the others
|
|
@@ -604,7 +604,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
* It does not override any existing entries in the deprecation map.
|
|
* It does not override any existing entries in the deprecation map.
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* keys, and attempts to call this method after loading resources once,
|
|
* keys, and attempts to call this method after loading resources once,
|
|
- * would lead to <tt>UnsupportedOperationException</tt>
|
|
|
|
|
|
+ * would lead to <code>UnsupportedOperationException</code>
|
|
*
|
|
*
|
|
* If you have multiple deprecation entries to add, it is more efficient to
|
|
* If you have multiple deprecation entries to add, it is more efficient to
|
|
* use #addDeprecations(DeprecationDelta[] deltas) instead.
|
|
* use #addDeprecations(DeprecationDelta[] deltas) instead.
|
|
@@ -624,7 +624,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
* It does not override any existing entries in the deprecation map.
|
|
* It does not override any existing entries in the deprecation map.
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* keys, and attempts to call this method after loading resources once,
|
|
* keys, and attempts to call this method after loading resources once,
|
|
- * would lead to <tt>UnsupportedOperationException</tt>
|
|
|
|
|
|
+ * would lead to <code>UnsupportedOperationException</code>
|
|
*
|
|
*
|
|
* If a key is deprecated in favor of multiple keys, they are all treated as
|
|
* If a key is deprecated in favor of multiple keys, they are all treated as
|
|
* aliases of each other, and setting any one of them resets all the others
|
|
* aliases of each other, and setting any one of them resets all the others
|
|
@@ -648,7 +648,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
* It does not override any existing entries in the deprecation map.
|
|
* It does not override any existing entries in the deprecation map.
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* This is to be used only by the developers in order to add deprecation of
|
|
* keys, and attempts to call this method after loading resources once,
|
|
* keys, and attempts to call this method after loading resources once,
|
|
- * would lead to <tt>UnsupportedOperationException</tt>
|
|
|
|
|
|
+ * would lead to <code>UnsupportedOperationException</code>
|
|
*
|
|
*
|
|
* If you have multiple deprecation entries to add, it is more efficient to
|
|
* If you have multiple deprecation entries to add, it is more efficient to
|
|
* use #addDeprecations(DeprecationDelta[] deltas) instead.
|
|
* use #addDeprecations(DeprecationDelta[] deltas) instead.
|