Skip to content

Commit 1ddc909

Browse files
authored
YARN-11381. Fix hadoop-yarn-common module Java Doc Errors. (#5153). Contributed by Shilun Fan.
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
1 parent 87429f4 commit 1ddc909

Some content is hidden

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

42 files changed

+330
-188
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public synchronized void close() {
9191

9292
/**
9393
* Getter/Setter methods for log4j.
94+
*
95+
* @return containerLogDir.
9496
*/
9597

9698
public String getContainerLogDir() {
@@ -118,6 +120,8 @@ public long getTotalLogFileSize() {
118120
/**
119121
* Setter so that log4j can configure it from the
120122
* configuration(log4j.properties).
123+
*
124+
* @param logSize log size.
121125
*/
122126
public void setTotalLogFileSize(long logSize) {
123127
maxEvents = (int)(logSize / EVENT_SIZE);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public void flush() {
5454

5555
/**
5656
* Getter/Setter methods for log4j.
57+
*
58+
* @return containerLogDir.
5759
*/
5860

5961
public String getContainerLogDir() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected T getProxyInternal() {
7373

7474
/**
7575
* Stop the current proxy when performFailover.
76-
* @param currentProxy
76+
* @param currentProxy currentProxy.
7777
*/
7878
@Override
7979
public synchronized void performFailover(T currentProxy) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private ClientRMProxy(){
6565
* @param protocol Client protocol for which proxy is being requested.
6666
* @param <T> Type of proxy.
6767
* @return Proxy to the ResourceManager for the specified client protocol.
68-
* @throws IOException
68+
* @throws IOException io error occur.
6969
*/
7070
public static <T> T createRMProxy(final Configuration configuration,
7171
final Class<T> protocol) throws IOException {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public ProxyInfo<T> getProxy() {
8080

8181
/**
8282
* PerformFailover does nothing in this class.
83-
* @param currentProxy
83+
* @param currentProxy currentProxy.
8484
*/
8585
@Override
8686
public void performFailover(T currentProxy) {
@@ -89,7 +89,7 @@ public void performFailover(T currentProxy) {
8989

9090
/**
9191
* Close the current proxy.
92-
* @throws IOException
92+
* @throws IOException io error occur.
9393
*/
9494
@Override
9595
public void close() throws IOException {

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

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ protected RMProxy() {
7070

7171
/**
7272
* Verify the passed protocol is supported.
73+
*
74+
* @param protocol protocol.
7375
*/
7476
@Private
7577
public void checkAllowedProtocols(Class<?> protocol) {}
7678

7779
/**
7880
* Get the ResourceManager address from the provided Configuration for the
7981
* given protocol.
82+
*
83+
* @param conf configuration.
84+
* @param protocol protocol.
85+
* @return inet socket address.
86+
* @throws IOException io error occur.
8087
*/
8188
@Private
8289
public InetSocketAddress getRMAddress(
@@ -91,6 +98,13 @@ public InetSocketAddress getRMAddress(
9198
* this is a direct connection to the ResourceManager address. When HA is
9299
* enabled, the proxy handles the failover between the ResourceManagers as
93100
* well.
101+
*
102+
* @param configuration configuration.
103+
* @param protocol protocol.
104+
* @param instance RMProxy instance.
105+
* @param <T> Generic T.
106+
* @return RMProxy.
107+
* @throws IOException io error occur.
94108
*/
95109
@Private
96110
protected static <T> T createRMProxy(final Configuration configuration,
@@ -108,6 +122,15 @@ protected static <T> T createRMProxy(final Configuration configuration,
108122
* this is a direct connection to the ResourceManager address. When HA is
109123
* enabled, the proxy handles the failover between the ResourceManagers as
110124
* well.
125+
*
126+
* @param configuration configuration.
127+
* @param protocol protocol.
128+
* @param instance RMProxy instance.
129+
* @param retryTime retry Time.
130+
* @param retryInterval retry Interval.
131+
* @param <T> Generic T.
132+
* @return RMProxy.
133+
* @throws IOException io error occur.
111134
*/
112135
@Private
113136
protected static <T> T createRMProxy(final Configuration configuration,
@@ -136,6 +159,13 @@ private static <T> T newProxyInstance(final YarnConfiguration conf,
136159
/**
137160
* Get a proxy to the RM at the specified address. To be used to create a
138161
* RetryProxy.
162+
*
163+
* @param conf configuration.
164+
* @param protocol protocol.
165+
* @param rmAddress rmAddress.
166+
* @param <T> Generic T.
167+
* @return RM proxy.
168+
* @throws IOException io error occur.
139169
*/
140170
@Private
141171
public <T> T getProxy(final Configuration conf,
@@ -195,7 +225,11 @@ private <T> RMFailoverProxyProvider<T> createRMFailoverProxyProvider(
195225
}
196226

197227
/**
198-
* Fetch retry policy from Configuration
228+
* Fetch retry policy from Configuration.
229+
*
230+
* @param conf configuration.
231+
* @param isHAEnabled is HA enabled.
232+
* @return RetryPolicy.
199233
*/
200234
@Private
201235
@VisibleForTesting
@@ -218,6 +252,12 @@ public static RetryPolicy createRetryPolicy(Configuration conf,
218252
/**
219253
* Fetch retry policy from Configuration and create the
220254
* retry policy with specified retryTime and retry interval.
255+
*
256+
* @param conf configuration.
257+
* @param retryTime retry time.
258+
* @param retryInterval retry interval.
259+
* @param isHAEnabled is HA enabled.
260+
* @return RetryPolicy.
221261
*/
222262
protected static RetryPolicy createRetryPolicy(Configuration conf,
223263
long retryTime, long retryInterval, boolean isHAEnabled) {

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ public abstract int initiateUpgrade(String appName, String fileName,
255255
*
256256
* @param appName the name of the application.
257257
* @param componentInstances the name of the component instances.
258+
* @return exit code.
259+
* @throws IOException io error occur.
260+
* @throws YarnException exceptions from yarn servers.
258261
*/
259262
@Public
260263
@Unstable
@@ -267,6 +270,9 @@ public abstract int actionUpgradeInstances(String appName,
267270
*
268271
* @param appName the name of the application.
269272
* @param components the name of the components.
273+
* @return exit code.
274+
* @throws IOException io error occur.
275+
* @throws YarnException exceptions from yarn servers.
270276
*/
271277
@Public
272278
@Unstable
@@ -279,6 +285,9 @@ public abstract int actionUpgradeComponents(String appName,
279285
* @param appName the name of the application.
280286
* @param userName the name of the user.
281287
* @return exit code
288+
* @throws IOException io error occur.
289+
* @throws YarnException exceptions from yarn servers.
290+
* @throws InterruptedException if interrupted.
282291
*/
283292
@Public
284293
@Unstable
@@ -297,6 +306,8 @@ public abstract String getInstances(String appName,
297306
* @param appName the name of the application
298307
* @param fileName specification of application upgrade to save.
299308
* @return exit code
309+
* @throws IOException io error occur.
310+
* @throws YarnException exceptions from yarn servers.
300311
*/
301312
@Public
302313
@Unstable
@@ -308,8 +319,8 @@ public abstract int actionUpgradeExpress(String appName, File fileName)
308319
*
309320
* @param appName the name of the application
310321
* @return exit code
311-
* @throws IOException
312-
* @throws YarnException
322+
* @throws IOException io error occur.
323+
* @throws YarnException exceptions from yarn servers.
313324
*/
314325
@Public
315326
@Unstable
@@ -321,6 +332,9 @@ public abstract int actionCancelUpgrade(String appName) throws IOException,
321332
*
322333
* @param appName the name of the application.
323334
* @param componentInstances the name of the component instances.
335+
* @throws IOException io error occur.
336+
* @throws YarnException exceptions from yarn servers.
337+
* @return exit code.
324338
*/
325339
@Public
326340
@Unstable

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public abstract TimelinePutResponse putEntities(
114114
*
115115
* @param domain
116116
* an {@link TimelineDomain} object
117-
* @throws IOException
118-
* @throws YarnException
117+
* @throws IOException io error occur.
118+
* @throws YarnException exceptions from yarn servers.
119119
*/
120120
@Public
121121
public abstract void putDomain(
@@ -133,8 +133,8 @@ public abstract void putDomain(
133133
* @param domain
134134
* an {@link TimelineDomain} object
135135
* @param appAttemptId {@link ApplicationAttemptId}
136-
* @throws IOException
137-
* @throws YarnException
136+
* @throws IOException io error occur.
137+
* @throws YarnException exceptions from yarn servers.
138138
*/
139139
@Public
140140
public abstract void putDomain(ApplicationAttemptId appAttemptId,
@@ -151,8 +151,8 @@ 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
155-
* @throws YarnException
154+
* @throws IOException io error occur.
155+
* @throws YarnException exceptions from yarn servers.
156156
*/
157157
@Public
158158
public abstract Token<TimelineDelegationTokenIdentifier> getDelegationToken(
@@ -166,8 +166,8 @@ public abstract Token<TimelineDelegationTokenIdentifier> getDelegationToken(
166166
* @param timelineDT
167167
* the delegation token to renew
168168
* @return the new expiration time
169-
* @throws IOException
170-
* @throws YarnException
169+
* @throws IOException io error occur.
170+
* @throws YarnException exceptions from yarn servers.
171171
*/
172172
@Public
173173
public abstract long renewDelegationToken(
@@ -181,8 +181,8 @@ public abstract long renewDelegationToken(
181181
*
182182
* @param timelineDT
183183
* the delegation token to cancel
184-
* @throws IOException
185-
* @throws YarnException
184+
* @throws IOException io error occur.
185+
* @throws YarnException exceptions from yarn servers.
186186
*/
187187
@Public
188188
public abstract void cancelDelegationToken(

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public abstract class TimelineReaderClient extends CompositeService {
4242

4343
/**
4444
* Create a new instance of Timeline Reader Client.
45+
*
46+
* @return instance of Timeline Reader Client.
4547
*/
4648
@InterfaceAudience.Public
4749
public static TimelineReaderClient createTimelineReaderClient() {
@@ -59,7 +61,7 @@ public TimelineReaderClient(String name) {
5961
* @param fields Fields to be fetched. Defaults to INFO.
6062
* @param filters Filters to be applied while fetching entities.
6163
* @return entity of the application
62-
* @throws IOException
64+
* @throws IOException io error occur.
6365
*/
6466
public abstract TimelineEntity getApplicationEntity(
6567
ApplicationId appId, String fields, Map<String, String> filters)
@@ -71,7 +73,7 @@ public abstract TimelineEntity getApplicationEntity(
7173
* @param fields Fields to be fetched. Defaults to INFO.
7274
* @param filters Filters to be applied while fetching entities.
7375
* @return entity associated with application attempt
74-
* @throws IOException
76+
* @throws IOException io error occur.
7577
*/
7678
public abstract TimelineEntity getApplicationAttemptEntity(
7779
ApplicationAttemptId appAttemptId, String fields,
@@ -85,7 +87,7 @@ public abstract TimelineEntity getApplicationAttemptEntity(
8587
* @param limit Number of entities to return.
8688
* @param fromId Retrieve next set of generic ids from given fromId
8789
* @return list of application attempt entities
88-
* @throws IOException
90+
* @throws IOException io error occur.
8991
*/
9092
public abstract List<TimelineEntity> getApplicationAttemptEntities(
9193
ApplicationId appId, String fields, Map<String, String> filters,
@@ -97,7 +99,7 @@ public abstract List<TimelineEntity> getApplicationAttemptEntities(
9799
* @param fields Fields to be fetched. Defaults to INFO.
98100
* @param filters Filters to be applied while fetching entities.
99101
* @return timeline entity for container
100-
* @throws IOException
102+
* @throws IOException io error occur.
101103
*/
102104
public abstract TimelineEntity getContainerEntity(
103105
ContainerId containerId, String fields, Map<String, String> filters)
@@ -111,7 +113,7 @@ public abstract TimelineEntity getContainerEntity(
111113
* @param limit Number of entities to return.
112114
* @param fromId Retrieve next set of generic ids from given fromId
113115
* @return list of entities
114-
* @throws IOException
116+
* @throws IOException io error occur.
115117
*/
116118
public abstract List<TimelineEntity> getContainerEntities(
117119
ApplicationId appId, String fields,

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ipc/RPCUtil.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,28 @@
2222
import java.lang.reflect.Constructor;
2323
import java.lang.reflect.InvocationTargetException;
2424

25-
import org.apache.hadoop.classification.InterfaceAudience;
25+
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
2626
import org.apache.hadoop.ipc.RemoteException;
2727
import org.apache.hadoop.yarn.exceptions.YarnException;
2828

2929
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
3030

31-
@InterfaceAudience.LimitedPrivate({ "MapReduce", "YARN" })
31+
@LimitedPrivate({ "MapReduce", "YARN" })
3232
public class RPCUtil {
3333

3434
/**
35-
* Returns an instance of {@link YarnException}
35+
* Returns an instance of {@link YarnException}.
36+
* @param t instance of Throwable.
37+
* @return instance of YarnException.
3638
*/
3739
public static YarnException getRemoteException(Throwable t) {
3840
return new YarnException(t);
3941
}
4042

4143
/**
42-
* Returns an instance of {@link YarnException}
44+
* Returns an instance of {@link YarnException}.
45+
* @param message yarn exception message.
46+
* @return instance of YarnException.
4347
*/
4448
public static YarnException getRemoteException(String message) {
4549
return new YarnException(message);
@@ -92,6 +96,8 @@ private static <T extends RuntimeException> T instantiateRuntimeException(
9296
* ServiceException
9397
* @return An instance of the actual exception, which will be a subclass of
9498
* {@link YarnException} or {@link IOException}
99+
* @throws IOException io error occur.
100+
* @throws YarnException exceptions from yarn servers.
95101
*/
96102
public static Void unwrapAndThrowException(ServiceException se)
97103
throws IOException, YarnException {

0 commit comments

Comments
 (0)