Skip to content

Commit

Permalink
HADOOP-16928. Make javadoc work on Java 17 (#6976)
Browse files Browse the repository at this point in the history
Contributed by Cheng Pan
  • Loading branch information
pan3793 authored Sep 4, 2024
1 parent 3bbfb2b commit 9486844
Show file tree
Hide file tree
Showing 72 changed files with 317 additions and 336 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
/**
* 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
* name/value pairs as XML data. Each resource is named by either a
Expand All @@ -130,16 +130,16 @@
*
* <p>Unless explicitly turned off, Hadoop by default specifies two
* resources, loaded in-order from the classpath: <ol>
* <li><tt>
* <li><code>
* <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>
* </ol>
* Applications may add additional resources, which are loaded
* 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>.
* Once a resource declares a value final, no subsequently-loaded
Expand All @@ -153,9 +153,9 @@
* &lt;/property&gt;</code></pre>
*
* 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
* available properties are:<ol>
Expand Down Expand Up @@ -185,22 +185,22 @@
* &lt;/property&gt;
* </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
* <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.
* <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.
* 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
* 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.
*
* <h4 id="Tags">Tags</h4>
* <h3 id="Tags">Tags</h3>
*
* <p>Optionally we can tag related properties together by using tag
* attributes. System tags are defined by hadoop.tags.system property. Users
Expand All @@ -220,9 +220,9 @@
* &lt;tag&gt;HDFS,SECURITY&lt;/tag&gt;
* &lt;/property&gt;
* </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
@InterfaceStability.Stable
Expand Down Expand Up @@ -576,7 +576,7 @@ public static void addDeprecations(DeprecationDelta[] deltas) {
* 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
* 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
* aliases of each other, and setting any one of them resets all the others
Expand Down Expand Up @@ -604,7 +604,7 @@ public static void addDeprecation(String key, String[] newKeys,
* 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
* 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
* use #addDeprecations(DeprecationDelta[] deltas) instead.
Expand All @@ -624,7 +624,7 @@ public static void addDeprecation(String key, String newKey,
* 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
* 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
* aliases of each other, and setting any one of them resets all the others
Expand All @@ -648,7 +648,7 @@ public static void addDeprecation(String key, String[] newKeys) {
* 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
* 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
* use #addDeprecations(DeprecationDelta[] deltas) instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ protected static synchronized Map<URI, Statistics> getAllStatistics() {
* The main factory method for creating a file system. Get a file system for
* the URI's scheme and authority. The scheme of the <code>uri</code>
* determines a configuration property name,
* <tt>fs.AbstractFileSystem.<i>scheme</i>.impl</tt> whose value names the
* <code>fs.AbstractFileSystem.<i>scheme</i>.impl</code> whose value names the
* AbstractFileSystem class.
*
* The entire URI and conf is passed to the AbstractFileSystem factory method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ boolean apply(Path p) throws IOException {

/**
* Set replication for an existing file.
* Implement the abstract <tt>setReplication</tt> of <tt>FileSystem</tt>
* Implement the abstract <code>setReplication</code> of <code>FileSystem</code>
* @param src file name
* @param replication new replication
* @throws IOException if an I/O error occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ private boolean isDirectory(Path f)
}
/**
* Set replication for an existing file.
* Implement the abstract <tt>setReplication</tt> of <tt>FileSystem</tt>
* Implement the abstract <code>setReplication</code> of <code>FileSystem</code>
* @param src file name
* @param replication new replication
* @throws IOException if an I/O error occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1977,9 +1977,9 @@ public RemoteIterator<LocatedFileStatus> listFiles(
LocatedFileStatus curFile;

/**
* Returns <tt>true</tt> if the iterator has more files.
* Returns <code>true</code> if the iterator has more files.
*
* @return <tt>true</tt> if the iterator has more files.
* @return <code>true</code> if the iterator has more files.
* @throws AccessControlException if not allowed to access next
* file's status or locations
* @throws FileNotFoundException if next file does not exist any more
Expand Down Expand Up @@ -2071,34 +2071,34 @@ public LocatedFileStatus next() throws IOException {
* <dl>
* <dd>
* <dl>
* <dt> <tt> ? </tt>
* <dt> <code> ? </code>
* <dd> Matches any single character.
*
* <dt> <tt> * </tt>
* <dt> <code> * </code>
* <dd> Matches zero or more characters.
*
* <dt> <tt> [<i>abc</i>] </tt>
* <dt> <code> [<i>abc</i>] </code>
* <dd> Matches a single character from character set
* <tt>{<i>a,b,c</i>}</tt>.
* <code>{<i>a,b,c</i>}</code>.
*
* <dt> <tt> [<i>a</i>-<i>b</i>] </tt>
* <dt> <code> [<i>a</i>-<i>b</i>] </code>
* <dd> Matches a single character from the character range
* <tt>{<i>a...b</i>}</tt>. Note: character <tt><i>a</i></tt> must be
* lexicographically less than or equal to character <tt><i>b</i></tt>.
* <code>{<i>a...b</i>}</code>. Note: character <code><i>a</i></code> must be
* lexicographically less than or equal to character <code><i>b</i></code>.
*
* <dt> <tt> [^<i>a</i>] </tt>
* <dt> <code> [^<i>a</i>] </code>
* <dd> Matches a single char that is not from character set or range
* <tt>{<i>a</i>}</tt>. Note that the <tt>^</tt> character must occur
* <code>{<i>a</i>}</code>. Note that the <code>^</code> character must occur
* immediately to the right of the opening bracket.
*
* <dt> <tt> \<i>c</i> </tt>
* <dt> <code> \<i>c</i> </code>
* <dd> Removes (escapes) any special meaning of character <i>c</i>.
*
* <dt> <tt> {ab,cd} </tt>
* <dd> Matches a string from the string set <tt>{<i>ab, cd</i>} </tt>
* <dt> <code> {ab,cd} </code>
* <dd> Matches a string from the string set <code>{<i>ab, cd</i>} </code>
*
* <dt> <tt> {ab,c{de,fh}} </tt>
* <dd> Matches a string from string set <tt>{<i>ab, cde, cfh</i>}</tt>
* <dt> <code> {ab,c{de,fh}} </code>
* <dd> Matches a string from string set <code>{<i>ab, cde, cfh</i>}</code>
*
* </dl>
* </dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2178,34 +2178,34 @@ public FileStatus[] listStatus(Path[] files, PathFilter filter)
* <dl>
* <dd>
* <dl>
* <dt> <tt> ? </tt>
* <dt> <code> ? </code>
* <dd> Matches any single character.
*
* <dt> <tt> * </tt>
* <dt> <code> * </code>
* <dd> Matches zero or more characters.
*
* <dt> <tt> [<i>abc</i>] </tt>
* <dt> <code> [<i>abc</i>] </code>
* <dd> Matches a single character from character set
* <tt>{<i>a,b,c</i>}</tt>.
* <code>{<i>a,b,c</i>}</code>.
*
* <dt> <tt> [<i>a</i>-<i>b</i>] </tt>
* <dt> <code> [<i>a</i>-<i>b</i>] </code>
* <dd> Matches a single character from the character range
* <tt>{<i>a...b</i>}</tt>. Note that character <tt><i>a</i></tt> must be
* lexicographically less than or equal to character <tt><i>b</i></tt>.
* <code>{<i>a...b</i>}</code>. Note that character <code><i>a</i></code> must be
* lexicographically less than or equal to character <code><i>b</i></code>.
*
* <dt> <tt> [^<i>a</i>] </tt>
* <dt> <code> [^<i>a</i>] </code>
* <dd> Matches a single character that is not from character set or range
* <tt>{<i>a</i>}</tt>. Note that the <tt>^</tt> character must occur
* <code>{<i>a</i>}</code>. Note that the <code>^</code> character must occur
* immediately to the right of the opening bracket.
*
* <dt> <tt> \<i>c</i> </tt>
* <dt> <code> \<i>c</i> </code>
* <dd> Removes (escapes) any special meaning of character <i>c</i>.
*
* <dt> <tt> {ab,cd} </tt>
* <dd> Matches a string from the string set <tt>{<i>ab, cd</i>} </tt>
* <dt> <code> {ab,cd} </code>
* <dd> Matches a string from the string set <code>{<i>ab, cd</i>} </code>
*
* <dt> <tt> {ab,c{de,fh}} </tt>
* <dd> Matches a string from the string set <tt>{<i>ab, cde, cfh</i>}</tt>
* <dt> <code> {ab,c{de,fh}} </code>
* <dd> Matches a string from the string set <code>{<i>ab, cde, cfh</i>}</code>
*
* </dl>
* </dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
public interface RemoteIterator<E> {
/**
* Returns <tt>true</tt> if the iteration has more elements.
* Returns <code>true</code> if the iteration has more elements.
*
* @return <tt>true</tt> if the iterator has more elements.
* @return <code>true</code> if the iterator has more elements.
* @throws IOException if any IO error occurs
*/
boolean hasNext() throws IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public boolean add(E e) {
}

/**
* Construct a new EnumSetWritable. If the <tt>value</tt> argument is null or
* its size is zero, the <tt>elementType</tt> argument must not be null. If
* the argument <tt>value</tt>'s size is bigger than zero, the argument
* <tt>elementType</tt> is not be used.
* Construct a new EnumSetWritable. If the <code>value</code> argument is null or
* its size is zero, the <code>elementType</code> argument must not be null. If
* the argument <code>value</code>'s size is bigger than zero, the argument
* <code>elementType</code> is not be used.
*
* @param value enumSet value.
* @param elementType elementType.
Expand All @@ -72,7 +72,7 @@ public EnumSetWritable(EnumSet<E> value, Class<E> elementType) {
}

/**
* Construct a new EnumSetWritable. Argument <tt>value</tt> should not be null
* Construct a new EnumSetWritable. Argument <code>value</code> should not be null
* or empty.
*
* @param value enumSet value.
Expand All @@ -83,10 +83,10 @@ public EnumSetWritable(EnumSet<E> value) {

/**
* reset the EnumSetWritable with specified
* <tt>value</tt> and <tt>elementType</tt>. If the <tt>value</tt> argument
* is null or its size is zero, the <tt>elementType</tt> argument must not be
* null. If the argument <tt>value</tt>'s size is bigger than zero, the
* argument <tt>elementType</tt> is not be used.
* <code>value</code> and <code>elementType</code>. If the <code>value</code> argument
* is null or its size is zero, the <code>elementType</code> argument must not be
* null. If the argument <code>value</code>'s size is bigger than zero, the
* argument <code>elementType</code> is not be used.
*
* @param value enumSet Value.
* @param elementType elementType.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ static Method getStaticProtobufMethod(Class<?> declaredClass, String method,
}

/**
* Find and load the class with given name <tt>className</tt> by first finding
* it in the specified <tt>conf</tt>. If the specified <tt>conf</tt> is null,
* Find and load the class with given name <code>className</code> by first finding
* it in the specified <code>conf</code>. If the specified <code>conf</code> is null,
* try load it directly.
*
* @param conf configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@
* <p>The actual compression algorithm used to compress key and/or values can be
* specified by using the appropriate {@link CompressionCodec}.</p>
*
* <p>The recommended way is to use the static <tt>createWriter</tt> methods
* <p>The recommended way is to use the static <code>createWriter</code> methods
* provided by the <code>SequenceFile</code> to chose the preferred format.</p>
*
* <p>The {@link SequenceFile.Reader} acts as the bridge and can read any of the
* above <code>SequenceFile</code> formats.</p>
*
* <h3 id="Formats">SequenceFile Formats</h3>
* <h2 id="Formats">SequenceFile Formats</h2>
*
* <p>Essentially there are 3 different formats for <code>SequenceFile</code>s
* depending on the <code>CompressionType</code> specified. All of them share a
* <a href="#Header">common header</a> described below.
*
* <h4 id="Header">SequenceFile Header</h4>
* <h3 id="Header">SequenceFile Header</h3>
* <ul>
* <li>
* version - 3 bytes of magic header <b>SEQ</b>, followed by 1 byte of actual
Expand Down Expand Up @@ -136,7 +136,7 @@
* </li>
* </ul>
*
* <h5>Uncompressed SequenceFile Format</h5>
* <h4>Uncompressed SequenceFile Format</h4>
* <ul>
* <li>
* <a href="#Header">Header</a>
Expand All @@ -155,7 +155,7 @@
* </li>
* </ul>
*
* <h5>Record-Compressed SequenceFile Format</h5>
* <h4>Record-Compressed SequenceFile Format</h4>
* <ul>
* <li>
* <a href="#Header">Header</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
* <p>
* The decompression requires large amounts of memory. Thus you should call the
* {@link #close() close()} method as soon as possible, to force
* <tt>CBZip2InputStream</tt> to release the allocated memory. See
* <code>CBZip2InputStream</code> to release the allocated memory. See
* {@link CBZip2OutputStream CBZip2OutputStream} for information about memory
* usage.
* </p>
*
* <p>
* <tt>CBZip2InputStream</tt> reads bytes from the compressed source stream via
* <code>CBZip2InputStream</code> reads bytes from the compressed source stream via
* the single byte {@link java.io.InputStream#read() read()} method exclusively.
* Thus you should consider to use a buffered source stream.
* </p>
Expand Down Expand Up @@ -279,7 +279,7 @@ private void makeMaps() {
* specified stream.
*
* <p>
* Although BZip2 headers are marked with the magic <tt>"Bz"</tt> this
* Although BZip2 headers are marked with the magic <code>"Bz"</code> this
* constructor expects the next byte in the stream to be the first one after
* the magic. Thus callers have to skip the first two bytes. Otherwise this
* constructor will throw an exception.
Expand All @@ -289,7 +289,7 @@ private void makeMaps() {
* @throws IOException
* if the stream content is malformed or an I/O error occurs.
* @throws NullPointerException
* if <tt>in == null</tt>
* if <code>in == null</code>
*/
public CBZip2InputStream(final InputStream in, READ_MODE readMode)
throws IOException {
Expand Down
Loading

0 comments on commit 9486844

Please sign in to comment.