Skip to content

Commit 175aabd

Browse files
tasanumadeepakdamri
authored andcommitted
HADOOP-15785. [JDK10] Javadoc build fails on JDK 10 in hadoop-common. Contributed by Dinesh Chitlangia.
1 parent 4f924c2 commit 175aabd

File tree

142 files changed

+510
-477
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+510
-477
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configurable.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626
@InterfaceStability.Stable
2727
public interface Configurable {
2828

29-
/** Set the configuration to be used by this object. */
29+
/**
30+
* Set the configuration to be used by this object.
31+
* @param conf configuration to be used
32+
*/
3033
void setConf(Configuration conf);
3134

32-
/** Return the configuration used by this object. */
35+
/**
36+
* Return the configuration used by this object.
37+
* @return Configuration
38+
*/
3339
Configuration getConf();
3440
}

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
/**
116116
* Provides access to configuration parameters.
117117
*
118-
* <h4 id="Resources">Resources</h4>
118+
* <h3 id="Resources">Resources</h3>
119119
*
120120
* <p>Configurations are specified by resources. A resource contains a set of
121121
* name/value pairs as XML data. Each resource is named by either a
@@ -141,12 +141,12 @@
141141
* Once a resource declares a value final, no subsequently-loaded
142142
* resource can alter that value.
143143
* For example, one might define a final parameter with:
144-
* <tt><pre>
144+
* <pre><code>
145145
* &lt;property&gt;
146146
* &lt;name&gt;dfs.hosts.include&lt;/name&gt;
147147
* &lt;value&gt;/etc/hadoop/conf/hosts.include&lt;/value&gt;
148148
* <b>&lt;final&gt;true&lt;/final&gt;</b>
149-
* &lt;/property&gt;</pre></tt>
149+
* &lt;/property&gt;</code></pre>
150150
*
151151
* Administrators typically define parameters as final in
152152
* <tt>core-site.xml</tt> for values that user applications may not alter.
@@ -164,7 +164,7 @@
164164
*
165165
* <p>For example, if a configuration resource contains the following property
166166
* definitions:
167-
* <tt><pre>
167+
* <pre><code>
168168
* &lt;property&gt;
169169
* &lt;name&gt;basedir&lt;/name&gt;
170170
* &lt;value&gt;/user/${<i>user.name</i>}&lt;/value&gt;
@@ -179,7 +179,7 @@
179179
* &lt;name&gt;otherdir&lt;/name&gt;
180180
* &lt;value&gt;${<i>env.BASE_DIR</i>}/other&lt;/value&gt;
181181
* &lt;/property&gt;
182-
* </pre></tt>
182+
* </code></pre>
183183
*
184184
* <p>When <tt>conf.get("tempdir")</tt> is called, then <tt>${<i>basedir</i>}</tt>
185185
* will be resolved to another property in this Configuration, while
@@ -203,7 +203,7 @@
203203
* can define there own custom tags in hadoop.tags.custom property.
204204
*
205205
* <p>For example, we can tag existing property as:
206-
* <tt><pre>
206+
* <pre><code>
207207
* &lt;property&gt;
208208
* &lt;name&gt;dfs.replication&lt;/name&gt;
209209
* &lt;value&gt;3&lt;/value&gt;
@@ -215,7 +215,7 @@
215215
* &lt;value&gt;3&lt;/value&gt;
216216
* &lt;tag&gt;HDFS,SECURITY&lt;/tag&gt;
217217
* &lt;/property&gt;
218-
* </pre></tt>
218+
* </code></pre>
219219
* <p> Properties marked with tags can be retrieved with <tt>conf
220220
* .getAllPropertiesByTag("HDFS")</tt> or <tt>conf.getAllPropertiesByTags
221221
* (Arrays.asList("YARN","SECURITY"))</tt>.</p>
@@ -581,9 +581,9 @@ public static void addDeprecations(DeprecationDelta[] deltas) {
581581
* If you have multiple deprecation entries to add, it is more efficient to
582582
* use #addDeprecations(DeprecationDelta[] deltas) instead.
583583
*
584-
* @param key
585-
* @param newKeys
586-
* @param customMessage
584+
* @param key to be deprecated
585+
* @param newKeys list of keys that take up the values of deprecated key
586+
* @param customMessage depcrication message
587587
* @deprecated use {@link #addDeprecation(String key, String newKey,
588588
String customMessage)} instead
589589
*/
@@ -605,9 +605,9 @@ public static void addDeprecation(String key, String[] newKeys,
605605
* If you have multiple deprecation entries to add, it is more efficient to
606606
* use #addDeprecations(DeprecationDelta[] deltas) instead.
607607
*
608-
* @param key
609-
* @param newKey
610-
* @param customMessage
608+
* @param key to be deprecated
609+
* @param newKey key that take up the values of deprecated key
610+
* @param customMessage deprecation message
611611
*/
612612
public static void addDeprecation(String key, String newKey,
613613
String customMessage) {
@@ -1404,6 +1404,7 @@ void logDeprecationOnce(String name, String source) {
14041404

14051405
/**
14061406
* Unset a previously set property.
1407+
* @param name the property name
14071408
*/
14081409
public synchronized void unset(String name) {
14091410
String[] names = null;
@@ -1693,6 +1694,7 @@ public void setBooleanIfUnset(String name, boolean value) {
16931694
* is equivalent to <code>set(&lt;name&gt;, value.toString())</code>.
16941695
* @param name property name
16951696
* @param value new value
1697+
* @param <T> enumeration type
16961698
*/
16971699
public <T extends Enum<T>> void setEnum(String name, T value) {
16981700
set(name, value.toString());
@@ -1703,8 +1705,10 @@ public <T extends Enum<T>> void setEnum(String name, T value) {
17031705
* Note that the returned value is trimmed by this method.
17041706
* @param name Property name
17051707
* @param defaultValue Value returned if no mapping exists
1708+
* @param <T> enumeration type
17061709
* @throws IllegalArgumentException If mapping is illegal for the type
17071710
* provided
1711+
* @return enumeration type
17081712
*/
17091713
public <T extends Enum<T>> T getEnum(String name, T defaultValue) {
17101714
final String val = getTrimmed(name);
@@ -1784,6 +1788,7 @@ public void setTimeDuration(String name, long value, TimeUnit unit) {
17841788
* @param unit Unit to convert the stored property, if it exists.
17851789
* @throws NumberFormatException If the property stripped of its unit is not
17861790
* a number
1791+
* @return time duration in given time unit
17871792
*/
17881793
public long getTimeDuration(String name, long defaultValue, TimeUnit unit) {
17891794
return getTimeDuration(name, defaultValue, unit, unit);
@@ -2315,6 +2320,7 @@ public void setStrings(String name, String... values) {
23152320
* the CredentialProvider API and conditionally fallsback to config.
23162321
* @param name property name
23172322
* @return password
2323+
* @throws IOException when error in fetching password
23182324
*/
23192325
public char[] getPassword(String name) throws IOException {
23202326
char[] pass = null;
@@ -2374,7 +2380,7 @@ private CredentialEntry getCredentialEntry(CredentialProvider provider,
23742380
* alias.
23752381
* @param name alias of the provisioned credential
23762382
* @return password or null if not found
2377-
* @throws IOException
2383+
* @throws IOException when error in fetching password
23782384
*/
23792385
public char[] getPasswordFromCredentialProviders(String name)
23802386
throws IOException {
@@ -3483,25 +3489,23 @@ public void writeXml(@Nullable Writer out) throws IOException {
34833489
/**
34843490
* Write out the non-default properties in this configuration to the
34853491
* given {@link Writer}.
3486-
*
3492+
* <ul>
34873493
* <li>
34883494
* When property name is not empty and the property exists in the
34893495
* configuration, this method writes the property and its attributes
34903496
* to the {@link Writer}.
34913497
* </li>
3492-
* <p>
34933498
*
34943499
* <li>
34953500
* When property name is null or empty, this method writes all the
34963501
* configuration properties and their attributes to the {@link Writer}.
34973502
* </li>
3498-
* <p>
34993503
*
35003504
* <li>
35013505
* When property name is not empty but the property doesn't exist in
35023506
* the configuration, this method throws an {@link IllegalArgumentException}.
35033507
* </li>
3504-
* <p>
3508+
* </ul>
35053509
* @param out the writer to write to.
35063510
*/
35073511
public void writeXml(@Nullable String propertyName, Writer out)
@@ -3611,7 +3615,7 @@ private synchronized void appendXMLProperty(Document doc, Element conf,
36113615
/**
36123616
* Writes properties and their attributes (final and resource)
36133617
* to the given {@link Writer}.
3614-
*
3618+
* <ul>
36153619
* <li>
36163620
* When propertyName is not empty, and the property exists
36173621
* in the configuration, the format of the output would be,
@@ -3651,6 +3655,7 @@ private synchronized void appendXMLProperty(Document doc, Element conf,
36513655
* found in the configuration, this method will throw an
36523656
* {@link IllegalArgumentException}.
36533657
* </li>
3658+
* </ul>
36543659
* <p>
36553660
* @param config the configuration
36563661
* @param propertyName property name
@@ -3849,7 +3854,7 @@ public void write(DataOutput out) throws IOException {
38493854
/**
38503855
* get keys matching the the regex
38513856
* @param regex
3852-
* @return Map<String,String> with matching keys
3857+
* @return {@literal Map<String,String>} with matching keys
38533858
*/
38543859
public Map<String,String> getValByRegex(String regex) {
38553860
Pattern p = Pattern.compile(regex);

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigurationWithLogging.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ConfigurationWithLogging(Configuration conf) {
4141
}
4242

4343
/**
44-
* @see Configuration#get(String).
44+
* See {@link Configuration#get(String)}.
4545
*/
4646
@Override
4747
public String get(String name) {
@@ -51,7 +51,7 @@ public String get(String name) {
5151
}
5252

5353
/**
54-
* @see Configuration#get(String, String).
54+
* See {@link Configuration#get(String, String)}.
5555
*/
5656
@Override
5757
public String get(String name, String defaultValue) {
@@ -62,7 +62,7 @@ public String get(String name, String defaultValue) {
6262
}
6363

6464
/**
65-
* @see Configuration#getBoolean(String, boolean).
65+
* See {@link Configuration#getBoolean(String, boolean)}.
6666
*/
6767
@Override
6868
public boolean getBoolean(String name, boolean defaultValue) {
@@ -72,7 +72,7 @@ public boolean getBoolean(String name, boolean defaultValue) {
7272
}
7373

7474
/**
75-
* @see Configuration#getFloat(String, float).
75+
* See {@link Configuration#getFloat(String, float)}.
7676
*/
7777
@Override
7878
public float getFloat(String name, float defaultValue) {
@@ -82,7 +82,7 @@ public float getFloat(String name, float defaultValue) {
8282
}
8383

8484
/**
85-
* @see Configuration#getInt(String, int).
85+
* See {@link Configuration#getInt(String, int)}.
8686
*/
8787
@Override
8888
public int getInt(String name, int defaultValue) {
@@ -92,7 +92,7 @@ public int getInt(String name, int defaultValue) {
9292
}
9393

9494
/**
95-
* @see Configuration#getLong(String, long).
95+
* See {@link Configuration#getLong(String, long)}.
9696
*/
9797
@Override
9898
public long getLong(String name, long defaultValue) {
@@ -102,7 +102,7 @@ public long getLong(String name, long defaultValue) {
102102
}
103103

104104
/**
105-
* @see Configuration#set(String, String, String).
105+
* See {@link Configuration#set(String, String, String)}.
106106
*/
107107
@Override
108108
public void set(String name, String value, String source) {

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoCodec.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,15 @@ private static List<Class<? extends CryptoCodec>> getCodecClasses(
158158
* For example a {@link javax.crypto.Cipher} will maintain its encryption
159159
* context internally when we do encryption/decryption using the
160160
* Cipher#update interface.
161-
* <p/>
161+
* <p>
162162
* Encryption/Decryption is not always on the entire file. For example,
163163
* in Hadoop, a node may only decrypt a portion of a file (i.e. a split).
164164
* In these situations, the counter is derived from the file position.
165-
* <p/>
165+
* <p>
166166
* The IV can be calculated by combining the initial IV and the counter with
167167
* a lossless operation (concatenation, addition, or XOR).
168-
* @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29
168+
* See http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_
169+
* .28CTR.29
169170
*
170171
* @param initIV initial IV
171172
* @param counter counter for input stream position

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
* required in order to ensure that the plain text and cipher text have a 1:1
5555
* mapping. The decryption is buffer based. The key points of the decryption
5656
* are (1) calculating the counter and (2) padding through stream position:
57-
* <p/>
57+
* <p>
5858
* counter = base + pos/(algorithm blocksize);
5959
* padding = pos%(algorithm blocksize);
60-
* <p/>
60+
* <p>
6161
* The underlying stream offset is maintained as state.
6262
*/
6363
@InterfaceAudience.Private

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
* required in order to ensure that the plain text and cipher text have a 1:1
3737
* mapping. The encryption is buffer based. The key points of the encryption are
3838
* (1) calculating counter and (2) padding through stream position.
39-
* <p/>
39+
* <p>
4040
* counter = base + pos/(algorithm blocksize);
4141
* padding = pos%(algorithm blocksize);
42-
* <p/>
42+
* <p>
4343
* The underlying stream offset is maintained as state.
4444
*
4545
* Note that while some of this class' methods are synchronized, this is just to

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/Decryptor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface Decryptor {
3838

3939
/**
4040
* Indicate whether the decryption context is reset.
41-
* <p/>
41+
* <p>
4242
* Certain modes, like CTR, require a different IV depending on the
4343
* position in the stream. Generally, the decryptor maintains any necessary
4444
* context for calculating the IV and counter so that no reinit is necessary
@@ -49,22 +49,22 @@ public interface Decryptor {
4949

5050
/**
5151
* This presents a direct interface decrypting with direct ByteBuffers.
52-
* <p/>
52+
* <p>
5353
* This function does not always decrypt the entire buffer and may potentially
5454
* need to be called multiple times to process an entire buffer. The object
5555
* may hold the decryption context internally.
56-
* <p/>
56+
* <p>
5757
* Some implementations may require sufficient space in the destination
5858
* buffer to decrypt the entire input buffer.
59-
* <p/>
59+
* <p>
6060
* Upon return, inBuffer.position() will be advanced by the number of bytes
6161
* read and outBuffer.position() by bytes written. Implementations should
6262
* not modify inBuffer.limit() and outBuffer.limit().
63-
* <p/>
63+
* <p>
6464
* @param inBuffer a direct {@link ByteBuffer} to read from. inBuffer may
65-
* not be null and inBuffer.remaining() must be > 0
65+
* not be null and inBuffer.remaining() must be {@literal >} 0
6666
* @param outBuffer a direct {@link ByteBuffer} to write to. outBuffer may
67-
* not be null and outBuffer.remaining() must be > 0
67+
* not be null and outBuffer.remaining() must be {@literal >} 0
6868
* @throws IOException if decryption fails
6969
*/
7070
public void decrypt(ByteBuffer inBuffer, ByteBuffer outBuffer)

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/Encryptor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public interface Encryptor {
3737

3838
/**
3939
* Indicate whether the encryption context is reset.
40-
* <p/>
40+
* <p>
4141
* Certain modes, like CTR, require a different IV depending on the
4242
* position in the stream. Generally, the encryptor maintains any necessary
4343
* context for calculating the IV and counter so that no reinit is necessary
@@ -48,22 +48,22 @@ public interface Encryptor {
4848

4949
/**
5050
* This presents a direct interface encrypting with direct ByteBuffers.
51-
* <p/>
51+
* <p>
5252
* This function does not always encrypt the entire buffer and may potentially
5353
* need to be called multiple times to process an entire buffer. The object
5454
* may hold the encryption context internally.
55-
* <p/>
55+
* <p>
5656
* Some implementations may require sufficient space in the destination
5757
* buffer to encrypt the entire input buffer.
58-
* <p/>
58+
* <p>
5959
* Upon return, inBuffer.position() will be advanced by the number of bytes
6060
* read and outBuffer.position() by bytes written. Implementations should
6161
* not modify inBuffer.limit() and outBuffer.limit().
62-
* <p/>
62+
* <p>
6363
* @param inBuffer a direct {@link ByteBuffer} to read from. inBuffer may
64-
* not be null and inBuffer.remaining() must be > 0
64+
* not be null and inBuffer.remaining() must be &gt; 0
6565
* @param outBuffer a direct {@link ByteBuffer} to write to. outBuffer may
66-
* not be null and outBuffer.remaining() must be > 0
66+
* not be null and outBuffer.remaining() must be &gt; 0
6767
* @throws IOException if encryption fails
6868
*/
6969
public void encrypt(ByteBuffer inBuffer, ByteBuffer outBuffer)

0 commit comments

Comments
 (0)