Skip to content

Commit 59217e4

Browse files
author
slfan1989
committed
YARN-6572. Fix CheckStyle.
1 parent 1fb0a6c commit 59217e4

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -479,15 +479,10 @@ protected Map<String, RequestInterceptorChainWrapper> getPipelines() {
479479
@VisibleForTesting
480480
protected ClientRequestInterceptor createRequestInterceptorChain() {
481481
Configuration conf = getConfig();
482-
try {
483-
return RouterServerUtil.createRequestInterceptorChain(conf,
484-
YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE,
485-
YarnConfiguration.DEFAULT_ROUTER_CLIENTRM_INTERCEPTOR_CLASS,
486-
ClientRequestInterceptor.class);
487-
} catch (YarnRuntimeException ex) {
488-
throw new YarnRuntimeException("RequestInterceptor pipeline is not configured in the system.",
489-
ex);
490-
}
482+
return RouterServerUtil.createRequestInterceptorChain(conf,
483+
YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE,
484+
YarnConfiguration.DEFAULT_ROUTER_CLIENTRM_INTERCEPTOR_CLASS,
485+
ClientRequestInterceptor.class);
491486
}
492487

493488
/**

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RouterRMAdminService.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,10 @@ protected Map<String, RequestInterceptorChainWrapper> getPipelines() {
187187
@VisibleForTesting
188188
protected RMAdminRequestInterceptor createRequestInterceptorChain() {
189189
Configuration conf = getConfig();
190-
try {
191-
return RouterServerUtil.createRequestInterceptorChain(conf,
192-
YarnConfiguration.ROUTER_RMADMIN_INTERCEPTOR_CLASS_PIPELINE,
193-
YarnConfiguration.DEFAULT_ROUTER_RMADMIN_INTERCEPTOR_CLASS,
194-
RMAdminRequestInterceptor.class);
195-
} catch (YarnRuntimeException ex) {
196-
throw new YarnRuntimeException("Create RequestInterceptor Chain error.", ex);
197-
}
190+
return RouterServerUtil.createRequestInterceptorChain(conf,
191+
YarnConfiguration.ROUTER_RMADMIN_INTERCEPTOR_CLASS_PIPELINE,
192+
YarnConfiguration.DEFAULT_ROUTER_RMADMIN_INTERCEPTOR_CLASS,
193+
RMAdminRequestInterceptor.class);
198194
}
199195

200196
/**

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServices.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,10 @@ protected Map<String, RequestInterceptorChainWrapper> getPipelines() {
179179
*/
180180
@VisibleForTesting
181181
protected RESTRequestInterceptor createRequestInterceptorChain() {
182-
try {
183-
return RouterServerUtil.createRequestInterceptorChain(conf,
184-
YarnConfiguration.ROUTER_WEBAPP_INTERCEPTOR_CLASS_PIPELINE,
185-
YarnConfiguration.DEFAULT_ROUTER_WEBAPP_INTERCEPTOR_CLASS,
186-
RESTRequestInterceptor.class);
187-
} catch (YarnRuntimeException ex) {
188-
throw new YarnRuntimeException("Create RequestInterceptor Chain error.", ex);
189-
}
182+
return RouterServerUtil.createRequestInterceptorChain(conf,
183+
YarnConfiguration.ROUTER_WEBAPP_INTERCEPTOR_CLASS_PIPELINE,
184+
YarnConfiguration.DEFAULT_ROUTER_WEBAPP_INTERCEPTOR_CLASS,
185+
RESTRequestInterceptor.class);
190186
}
191187

192188
/**

0 commit comments

Comments
 (0)