Skip to content

Commit 0f6e45b

Browse files
author
slfan1989
committed
YARN-11381. Fix CheckStyle.
1 parent b9dc624 commit 0f6e45b

File tree

16 files changed

+83
-49
lines changed

16 files changed

+83
-49
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/AppAdminClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public abstract int actionUpgradeExpress(String appName, File fileName)
308308
*
309309
* @param appName the name of the application
310310
* @return exit code
311-
* @throws IOException
311+
* @throws IOException io error occur.
312312
* @throws YarnException
313313
*/
314314
@Public

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public abstract TimelinePutResponse putEntities(
114114
*
115115
* @param domain
116116
* an {@link TimelineDomain} object
117-
* @throws IOException
117+
* @throws IOException io error occur.
118118
* @throws YarnException
119119
*/
120120
@Public
@@ -133,7 +133,7 @@ public abstract void putDomain(
133133
* @param domain
134134
* an {@link TimelineDomain} object
135135
* @param appAttemptId {@link ApplicationAttemptId}
136-
* @throws IOException
136+
* @throws IOException io error occur.
137137
* @throws YarnException
138138
*/
139139
@Public
@@ -151,7 +151,7 @@ public abstract void putDomain(ApplicationAttemptId appAttemptId,
151151
* securely talking to the timeline server
152152
* @return a delegation token ({@link Token}) that can be used to talk to the
153153
* timeline server
154-
* @throws IOException
154+
* @throws IOException io error occur.
155155
* @throws YarnException
156156
*/
157157
@Public
@@ -166,7 +166,7 @@ public abstract Token<TimelineDelegationTokenIdentifier> getDelegationToken(
166166
* @param timelineDT
167167
* the delegation token to renew
168168
* @return the new expiration time
169-
* @throws IOException
169+
* @throws IOException io error occur.
170170
* @throws YarnException
171171
*/
172172
@Public
@@ -181,7 +181,7 @@ public abstract long renewDelegationToken(
181181
*
182182
* @param timelineDT
183183
* the delegation token to cancel
184-
* @throws IOException
184+
* @throws IOException io error occur.
185185
* @throws YarnException
186186
*/
187187
@Public

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/TimelineReaderClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public TimelineReaderClient(String name) {
5959
* @param fields Fields to be fetched. Defaults to INFO.
6060
* @param filters Filters to be applied while fetching entities.
6161
* @return entity of the application
62-
* @throws IOException
62+
* @throws IOException io error occur.
6363
*/
6464
public abstract TimelineEntity getApplicationEntity(
6565
ApplicationId appId, String fields, Map<String, String> filters)
@@ -71,7 +71,7 @@ public abstract TimelineEntity getApplicationEntity(
7171
* @param fields Fields to be fetched. Defaults to INFO.
7272
* @param filters Filters to be applied while fetching entities.
7373
* @return entity associated with application attempt
74-
* @throws IOException
74+
* @throws IOException io error occur.
7575
*/
7676
public abstract TimelineEntity getApplicationAttemptEntity(
7777
ApplicationAttemptId appAttemptId, String fields,
@@ -85,7 +85,7 @@ public abstract TimelineEntity getApplicationAttemptEntity(
8585
* @param limit Number of entities to return.
8686
* @param fromId Retrieve next set of generic ids from given fromId
8787
* @return list of application attempt entities
88-
* @throws IOException
88+
* @throws IOException io error occur.
8989
*/
9090
public abstract List<TimelineEntity> getApplicationAttemptEntities(
9191
ApplicationId appId, String fields, Map<String, String> filters,
@@ -97,7 +97,7 @@ public abstract List<TimelineEntity> getApplicationAttemptEntities(
9797
* @param fields Fields to be fetched. Defaults to INFO.
9898
* @param filters Filters to be applied while fetching entities.
9999
* @return timeline entity for container
100-
* @throws IOException
100+
* @throws IOException io error occur.
101101
*/
102102
public abstract TimelineEntity getContainerEntity(
103103
ContainerId containerId, String fields, Map<String, String> filters)
@@ -111,7 +111,7 @@ public abstract TimelineEntity getContainerEntity(
111111
* @param limit Number of entities to return.
112112
* @param fromId Retrieve next set of generic ids from given fromId
113113
* @return list of entities
114-
* @throws IOException
114+
* @throws IOException io error occur.
115115
*/
116116
public abstract List<TimelineEntity> getContainerEntities(
117117
ApplicationId appId, String fields,

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/AttributeValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface AttributeValue {
3535
* operations.
3636
*
3737
* @param value
38-
* @throws IOException
38+
* @throws IOException io error occur.
3939
*/
4040
void validateAndInitializeValue(String value) throws IOException;
4141

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Apps.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ public static void addToEnvironment(
257257
* This older version of this method is kept around for compatibility
258258
* because downstream frameworks like Spark and Tez have been using it.
259259
* Downstream frameworks are expected to move off of it.
260+
*
261+
* @param environment
262+
* @param variable
263+
* @param value
260264
*/
261265
@Deprecated
262266
public static void addToEnvironment(

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public class ConverterUtils {
5757
* @param url
5858
* url to convert
5959
* @return path from {@link URL}
60-
* @throws URISyntaxException
60+
* @throws URISyntaxException exception thrown to indicate that a string could not be parsed as a
61+
* URI reference.
6162
*/
6263
@Public
6364
@Deprecated
@@ -171,6 +172,7 @@ public static ApplicationId toApplicationId(
171172
*
172173
* @param protoToken the yarn token
173174
* @param serviceAddr the connect address for the service
175+
* @param <T> Generic Type T.
174176
* @return rpc token
175177
*/
176178
public static <T extends TokenIdentifier> Token<T> convertFromYarn(
@@ -191,6 +193,8 @@ public static <T extends TokenIdentifier> Token<T> convertFromYarn(
191193
*
192194
* @param protoToken the yarn token
193195
* @param service the service for the token
196+
* @param <T> Generic Type T.
197+
* @return rpc token
194198
*/
195199
public static <T extends TokenIdentifier> Token<T> convertFromYarn(
196200
org.apache.hadoop.yarn.api.records.Token protoToken,

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/DockerClientConfigHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public static Credentials readCredentialsFromConfigFile(Path configFile,
131131
*
132132
* @param tokens the Tokens from the ContainerLaunchContext.
133133
* @return the Credentials object populated from the Tokens.
134+
* @throws IOException io error occur.
134135
*/
135136
public static Credentials getCredentialsFromTokensByteBuffer(
136137
ByteBuffer tokens) throws IOException {

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,13 @@ private void createDir(Path path, FsPermission perm) throws IOException {
123123
* Creates the cache loader for the status loading cache. This should be used
124124
* to create an instance of the status cache that is passed into the
125125
* FSDownload constructor.
126+
*
127+
* @param conf configuration.
128+
* @return cache loader for the status loading cache.
126129
*/
127-
public static CacheLoader<Path,Future<FileStatus>>
130+
public static CacheLoader<Path, Future<FileStatus>>
128131
createStatusCacheLoader(final Configuration conf) {
129-
return new CacheLoader<Path,Future<FileStatus>>() {
132+
return new CacheLoader<Path, Future<FileStatus>>() {
130133
public Future<FileStatus> load(Path path) {
131134
try {
132135
FileSystem fs = path.getFileSystem(conf);
@@ -141,10 +144,15 @@ public Future<FileStatus> load(Path path) {
141144

142145
/**
143146
* Returns a boolean to denote whether a cache file is visible to all (public)
144-
* or not
147+
* or not.
145148
*
149+
* @param fs fileSystem.
150+
* @param current current path.
151+
* @param sStat file status.
152+
* @param statCache stat cache.
146153
* @return true if the path in the current path is visible to all, false
147154
* otherwise
155+
* @throws IOException io error occur.
148156
*/
149157
@Private
150158
public static boolean isPublic(FileSystem fs, Path current, FileStatus sStat,
@@ -455,7 +463,7 @@ public Void run() throws Exception {
455463
* Change to 755 or 700 for dirs, 555 or 500 for files.
456464
* @param fs FileSystem
457465
* @param path Path to modify perms for
458-
* @throws IOException
466+
* @throws IOException io error occur.
459467
* @throws InterruptedException
460468
*/
461469
private void changePermissions(FileSystem fs, final Path path)

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ public String toString() {
579579
/**
580580
* Returns boolean indicating whether pid
581581
* is in process tree.
582+
*
583+
* @param pid pid.
584+
* @return if true, processTree contains pid, false, processTree does not contain pid.
582585
*/
583586
public boolean contains(String pid) {
584587
return processTree.containsKey(pid);
@@ -1000,9 +1003,9 @@ public String toString() {
10001003
}
10011004

10021005
/**
1003-
* Test the {@link ProcfsBasedProcessTree}
1006+
* Test the {@link ProcfsBasedProcessTree}.
10041007
*
1005-
* @param args
1008+
* @param args the pid arg.
10061009
*/
10071010
public static void main(String[] args) {
10081011
if (args.length != 1) {

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/RackResolver.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public synchronized static void init(Configuration conf) {
7979
* Utility method for getting a hostname resolved to a node in the
8080
* network topology. This method initializes the class with the
8181
* right resolver implementation.
82-
* @param conf
83-
* @param hostName
82+
* @param conf configuration.
83+
* @param hostName hostname.
8484
* @return node {@link Node} after resolving the hostname
8585
*/
8686
public static Node resolve(Configuration conf, String hostName) {
@@ -92,8 +92,8 @@ public static Node resolve(Configuration conf, String hostName) {
9292
* Utility method for getting a list of hostname resolved to a list of node
9393
* in the network topology. This method initializes the class with the
9494
* right resolver implementation.
95-
* @param conf
96-
* @param hostNames
95+
* @param conf configuration.
96+
* @param hostNames list of hostName.
9797
* @return nodes {@link Node} after resolving the hostnames
9898
*/
9999
public static List<Node> resolve(
@@ -106,7 +106,7 @@ public static List<Node> resolve(
106106
* Utility method for getting a hostname resolved to a node in the
107107
* network topology. This method doesn't initialize the class.
108108
* Call {@link #init(Configuration)} explicitly.
109-
* @param hostName
109+
* @param hostName host name.
110110
* @return node {@link Node} after resolving the hostname
111111
*/
112112
public static Node resolve(String hostName) {
@@ -120,7 +120,7 @@ public static Node resolve(String hostName) {
120120
* Utility method for getting a list of hostname resolved to a list of node
121121
* in the network topology. This method doesn't initialize the class.
122122
* Call {@link #init(Configuration)} explicitly.
123-
* @param hostNames
123+
* @param hostNames list of hostNames.
124124
* @return nodes {@link Node} after resolving the hostnames
125125
*/
126126
public static List<Node> resolve(List<String> hostNames) {

0 commit comments

Comments
 (0)