Skip to content

Commit 00bc8ee

Browse files
author
slfan1989
committed
HADOOP-18229. Fix Check Style.
1 parent 26731ba commit 00bc8ee

35 files changed

+639
-633
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public ConfigRedactor(Configuration conf) {
5757
* Given a key / value pair, decides whether or not to redact and returns
5858
* either the original value or text indicating it has been redacted.
5959
*
60-
* @param key param key
61-
* @param value param value, will return if conditions permit
60+
* @param key param key.
61+
* @param value param value, will return if conditions permit.
6262
* @return Original value, or text indicating it has been redacted
6363
*/
6464
public String redact(String key, String value) {

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ public long getTimeDuration(String name, String defaultValue,
19081908
* @param name Property name
19091909
* @param vStr The string value with time unit suffix to be converted.
19101910
* @param unit Unit to convert the stored property, if it exists.
1911-
* @return time duration in given time unit
1911+
* @return time duration in given time unit.
19121912
*/
19131913
public long getTimeDurationHelper(String name, String vStr, TimeUnit unit) {
19141914
return getTimeDurationHelper(name, vStr, unit, unit);
@@ -1923,7 +1923,7 @@ public long getTimeDurationHelper(String name, String vStr, TimeUnit unit) {
19231923
* @param vStr The string value with time unit suffix to be converted.
19241924
* @param defaultUnit Unit to convert the stored property, if it exists.
19251925
* @param returnUnit Unit for the returned value.
1926-
* @return time duration in given time unit
1926+
* @return time duration in given time unit.
19271927
*/
19281928
private long getTimeDurationHelper(String name, String vStr,
19291929
TimeUnit defaultUnit, TimeUnit returnUnit) {
@@ -2484,7 +2484,7 @@ public char[] getPasswordFromCredentialProviders(String name)
24842484

24852485
/**
24862486
* Fallback to clear text passwords in configuration.
2487-
* @param name the property name
2487+
* @param name the property name.
24882488
* @return clear text password or null
24892489
*/
24902490
protected char[] getPasswordFromConfig(String name) {
@@ -2550,7 +2550,7 @@ public InetSocketAddress getSocketAddr(
25502550
* Set the socket address for the <code>name</code> property as
25512551
* a <code>host:port</code>.
25522552
* @param name property name.
2553-
* @param addr inetSocketAddress addr
2553+
* @param addr inetSocketAddress addr.
25542554
*/
25552555
public void setSocketAddr(String name, InetSocketAddress addr) {
25562556
set(name, NetUtils.getHostPortString(addr));
@@ -2728,7 +2728,7 @@ public Class<?> getClass(String name, Class<?> defaultValue) {
27282728
* @param name the conf key name.
27292729
* @param defaultValue default value.
27302730
* @param xface the interface implemented by the named class.
2731-
* @param <U> Interface class type
2731+
* @param <U> Interface class type.
27322732
* @return property value as a <code>Class</code>,
27332733
* or <code>defaultValue</code>.
27342734
*/
@@ -2758,7 +2758,7 @@ else if (theClass != null)
27582758
* @param name the property name.
27592759
* @param xface the interface implemented by the classes named by
27602760
* <code>name</code>.
2761-
* @param <U> Interface class type
2761+
* @param <U> Interface class type.
27622762
* @return a <code>List</code> of objects implementing <code>xface</code>.
27632763
*/
27642764
@SuppressWarnings("unchecked")
@@ -2831,7 +2831,7 @@ public Path getLocalPath(String dirsProp, String path)
28312831
* directory does not exist, an attempt is made to create it.
28322832
*
28332833
* @param dirsProp directory in which to locate the file.
2834-
* @param path file-path.
2834+
* @param path file-path.
28352835
* @return local file under the directory with the given path.
28362836
* @throws IOException raised on errors performing I/O.
28372837
*/
@@ -3445,7 +3445,7 @@ void parseNext() throws IOException, XMLStreamException {
34453445

34463446
/**
34473447
* Add tags defined in HADOOP_TAGS_SYSTEM, HADOOP_TAGS_CUSTOM.
3448-
* @param prop properties
3448+
* @param prop properties.
34493449
*/
34503450
public void addTags(Properties prop) {
34513451
// Get all system tags
@@ -3906,8 +3906,8 @@ synchronized boolean getQuietMode() {
39063906
}
39073907

39083908
/** For debugging. List non-default properties to the terminal and exit.
3909-
* @param args the argument to be parsed
3910-
* @throws Exception exception
3909+
* @param args the argument to be parsed.
3910+
* @throws Exception exception.
39113911
*/
39123912
public static void main(String[] args) throws Exception {
39133913
new Configuration().writeXml(System.out);
@@ -3988,8 +3988,8 @@ public static void dumpDeprecatedKeys() {
39883988
/**
39893989
* Returns whether or not a deprecated name has been warned. If the name is not
39903990
* deprecated then always return false
3991-
* @param name proprties
3992-
* @return true if name is a warned deprecation
3991+
* @param name proprties.
3992+
* @return true if name is a warned deprecation.
39933993
*/
39943994
public static boolean hasWarnedDeprecation(String name) {
39953995
DeprecationContext deprecations = deprecationContext.get();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Configured() {
3434
}
3535

3636
/** Construct a Configured.
37-
* @param conf the Configuration object
37+
* @param conf the Configuration object.
3838
*/
3939
public Configured(Configuration conf) {
4040
setConf(conf);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public interface Reconfigurable extends Configurable {
3333
* (or null if it was not previously set). If newVal is null, set the property
3434
* to its default value;
3535
*
36-
* @param property property name
37-
* @param newVal new value
36+
* @param property property name.
37+
* @param newVal new value.
3838
* @throws ReconfigurationException if there was an error applying newVal.
3939
* If the property cannot be changed, throw a
4040
* {@link ReconfigurationException}.
@@ -48,14 +48,14 @@ void reconfigureProperty(String property, String newVal)
4848
* If isPropertyReconfigurable returns true for a property,
4949
* then changeConf should not throw an exception when changing
5050
* this property.
51-
* @param property property name
51+
* @param property property name.
5252
* @return true if property reconfigurable; false if not.
5353
*/
5454
boolean isPropertyReconfigurable(String property);
5555

5656
/**
5757
* Return all the properties that can be changed at run time.
58-
* @return reconfigurable propertys
58+
* @return reconfigurable propertys.
5959
*/
6060
Collection<String> getReconfigurableProperties();
6161
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public ReconfigurableBase() {
7979
/**
8080
* Construct a ReconfigurableBase with the {@link Configuration}
8181
* conf.
82-
* @param conf configuration
82+
* @param conf configuration.
8383
*/
8484
public ReconfigurableBase(Configuration conf) {
8585
super((conf == null) ? new Configuration() : conf);
@@ -92,7 +92,7 @@ public void setReconfigurationUtil(ReconfigurationUtil ru) {
9292

9393
/**
9494
* Create a new configuration.
95-
* @return configuration
95+
* @return configuration.
9696
*/
9797
protected abstract Configuration getNewConf();
9898

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public ReconfigurationException(String property,
7575

7676
/**
7777
* Create a new instance of {@link ReconfigurationException}.
78-
* @param property property name
79-
* @param newVal new value
80-
* @param oldVal old value
78+
* @param property property name.
79+
* @param newVal new value.
80+
* @param oldVal old value.
8181
*/
8282
public ReconfigurationException(String property,
8383
String newVal, String oldVal) {
@@ -89,23 +89,23 @@ public ReconfigurationException(String property,
8989

9090
/**
9191
* Get property that cannot be changed.
92-
* @return property info
92+
* @return property info.
9393
*/
9494
public String getProperty() {
9595
return property;
9696
}
9797

9898
/**
9999
* Get value to which property was supposed to be changed.
100-
* @return new value
100+
* @return new value.
101101
*/
102102
public String getNewValue() {
103103
return newVal;
104104
}
105105

106106
/**
107107
* Get old value of property that cannot be changed.
108-
* @return old value
108+
* @return old value.
109109
*/
110110
public String getOldValue() {
111111
return oldVal;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ private static List<Class<? extends CryptoCodec>> getCodecClasses(
147147
/**
148148
* Create a {@link org.apache.hadoop.crypto.Encryptor}.
149149
*
150-
* @return Encryptor the encryptor
151-
* @throws GeneralSecurityException thrown if create encryptor error
150+
* @return Encryptor the encryptor.
151+
* @throws GeneralSecurityException thrown if create encryptor error.
152152
*/
153153
public abstract Encryptor createEncryptor() throws GeneralSecurityException;
154154

155155
/**
156156
* Create a {@link org.apache.hadoop.crypto.Decryptor}.
157157
*
158158
* @return Decryptor the decryptor
159-
* @throws GeneralSecurityException thrown if create decryptor error
159+
* @throws GeneralSecurityException thrown if create decryptor error.
160160
*/
161161
public abstract Decryptor createDecryptor() throws GeneralSecurityException;
162162

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class CryptoStreamUtils {
4242
/**
4343
* Forcibly free the direct buffer.
4444
*
45-
* @param buffer buffer
45+
* @param buffer buffer.
4646
*/
4747
public static void freeDB(ByteBuffer buffer) {
4848
if (CleanerUtil.UNMAP_SUPPORTED) {
@@ -59,8 +59,8 @@ public static void freeDB(ByteBuffer buffer) {
5959
/**
6060
* Read crypto buffer size.
6161
*
62-
* @param conf configuration
63-
* @return hadoop.security.crypto.buffer.size
62+
* @param conf configuration.
63+
* @return hadoop.security.crypto.buffer.size.
6464
*/
6565
public static int getBufferSize(Configuration conf) {
6666
return conf.getInt(HADOOP_SECURITY_CRYPTO_BUFFER_SIZE_KEY,
@@ -70,7 +70,7 @@ public static int getBufferSize(Configuration conf) {
7070
/**
7171
* AES/CTR/NoPadding or SM4/CTR/NoPadding is required.
7272
*
73-
* @param codec crypto codec
73+
* @param codec crypto codec.
7474
*/
7575
public static void checkCodec(CryptoCodec codec) {
7676
if (codec.getCipherSuite() != CipherSuite.AES_CTR_NOPADDING &&
@@ -83,9 +83,9 @@ public static void checkCodec(CryptoCodec codec) {
8383
/**
8484
* Check and floor buffer size.
8585
*
86-
* @param codec crypto codec
86+
* @param codec crypto codec.
8787
* @param bufferSize the size of the buffer to be used.
88-
* @return calc buffer siez
88+
* @return calc buffer size.
8989
*/
9090
public static int checkBufferSize(CryptoCodec codec, int bufferSize) {
9191
Preconditions.checkArgument(bufferSize >= MIN_BUFFER_SIZE,
@@ -98,8 +98,8 @@ public static int checkBufferSize(CryptoCodec codec, int bufferSize) {
9898
* If input stream is {@link org.apache.hadoop.fs.Seekable}, return it's
9999
* current position, otherwise return 0;
100100
*
101-
* @param in wrapper
102-
* @return current position, otherwise return 0;
101+
* @param in wrapper.
102+
* @return current position, otherwise return 0.
103103
* @throws IOException raised on errors performing I/O.
104104
*/
105105
public static long getInputStreamOffset(InputStream in) throws IOException {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public abstract KeyVersion getKeyVersion(String versionName
466466
* Get key metadata in bulk.
467467
* @param names the names of the keys to get
468468
* @throws IOException raised on errors performing I/O.
469-
* @return Metadata Array
469+
* @return Metadata Array.
470470
*/
471471
public Metadata[] getKeysMetadata(String... names) throws IOException {
472472
Metadata[] result = new Metadata[names.length];
@@ -479,7 +479,7 @@ public Metadata[] getKeysMetadata(String... names) throws IOException {
479479
/**
480480
* Get the key material for all versions of a specific key name.
481481
*
482-
* @param name the base name of the key
482+
* @param name the base name of the key.
483483
* @return the list of key material
484484
* @throws IOException raised on errors performing I/O.
485485
*/
@@ -540,7 +540,7 @@ private String getAlgorithm(String cipher) {
540540
* @param size length of the key.
541541
* @param algorithm algorithm to use for generating the key.
542542
* @return the generated key.
543-
* @throws NoSuchAlgorithmException no such algorithm exception
543+
* @throws NoSuchAlgorithmException no such algorithm exception.
544544
*/
545545
protected byte[] generateKey(int size, String algorithm)
546546
throws NoSuchAlgorithmException {
@@ -562,7 +562,7 @@ protected byte[] generateKey(int size, String algorithm)
562562
* @param options the options for the new key.
563563
* @return the version name of the first version of the key.
564564
* @throws IOException raised on errors performing I/O.
565-
* @throws NoSuchAlgorithmException no such algorithm exception
565+
* @throws NoSuchAlgorithmException no such algorithm exception.
566566
*/
567567
public KeyVersion createKey(String name, Options options)
568568
throws NoSuchAlgorithmException, IOException {
@@ -668,7 +668,7 @@ protected static String buildVersionName(String name, int version) {
668668
* Find the provider with the given key.
669669
*
670670
* @param providerList the list of providers
671-
* @param keyName the key name we are looking for
671+
* @param keyName the key name we are looking for.
672672
* @return the KeyProvider that has the key
673673
* @throws IOException raised on errors performing I/O.
674674
*/

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public interface CryptoExtension extends KeyProviderExtension.Extension {
178178
* Calls to this method allows the underlying KeyProvider to warm-up any
179179
* implementation specific caches used to store the Encrypted Keys.
180180
* @param keyNames Array of Key Names
181-
* @throws IOException thrown if the key material could not be encrypted
181+
* @throws IOException thrown if the key material could not be encrypted.
182182
*/
183183
public void warmUpEncryptedKeys(String... keyNames)
184184
throws IOException;
@@ -476,8 +476,8 @@ public void drain(String keyName) {
476476
* This constructor is to be used by sub classes that provide
477477
* delegating/proxying functionality to the {@link KeyProviderCryptoExtension}
478478
*
479-
* @param keyProvider key provider
480-
* @param extension crypto extension
479+
* @param keyProvider key provider.
480+
* @param extension crypto extension.
481481
*/
482482
protected KeyProviderCryptoExtension(KeyProvider keyProvider,
483483
CryptoExtension extension) {
@@ -560,7 +560,7 @@ public EncryptedKeyVersion reencryptEncryptedKey(EncryptedKeyVersion ekv)
560560
* Calls {@link CryptoExtension#drain(String)} for the given key name on the
561561
* underlying {@link CryptoExtension}.
562562
*
563-
* @param keyName key name
563+
* @param keyName key name.
564564
*/
565565
public void drain(String keyName) {
566566
getExtension().drain(keyName);

0 commit comments

Comments
 (0)