[
https://issues.apache.org/jira/browse/YARN-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16196338#comment-16196338
]
Jian He commented on YARN-7202:
-------------------------------
Thanks for the patch, few comments:
- STARTED and STOPPED are mutually exclusive conditions, I don't think we need
to try to serialize these two conditions. The additional if/else are
unnecessary. We can simply do return from stopService or startService
{code}
if (updateServiceData.getState() != null
&& updateServiceData.getState() == ServiceState.STOPPED) {
Response r = stopService(appName, false);
if (r.getStatus() ==
Response.status(Status.BAD_REQUEST).build()
.getStatus() ||
r.getStatus() ==
Response.status(Status.NOT_FOUND).build()
.getStatus()) {
hasBadRequest = true;
} else if (r.getStatus() ==
Response.status(Status.INTERNAL_SERVER_ERROR).build()
.getStatus()) {
hasErrors = true;
}
}
// If a START is requested
if (updateServiceData.getState() != null
&& updateServiceData.getState() == ServiceState.STARTED) {
Response r = startService(appName);
if (r.getStatus() ==
Response.status(Status.BAD_REQUEST).build()
.getStatus()) {
hasBadRequest = true;
} else if (r.getStatus() ==
Response.status(Status.INTERNAL_SERVER_ERROR).build()
.getStatus()) {
hasErrors = true;
}
}
{code}
- A bit confused with the TestApiService - It tries to use
TestYarnNativeService's MiniYarnCluster framework which is supposed for fully
end-to-end integration test. But the test overrides the ServiceClient with its
own mocked client, then what's the point of using the MiniYarnCluster framework
?
- Are these dependencies required?
{code}
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-server-tests</artifactId>
<type>test-jar</type>
</dependency>
{code}
> End-to-end UT for api-server
> ----------------------------
>
> Key: YARN-7202
> URL: https://issues.apache.org/jira/browse/YARN-7202
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Jian He
> Assignee: Eric Yang
> Attachments: YARN-7202.yarn-native-services.001.patch,
> YARN-7202.yarn-native-services.002.patch,
> YARN-7202.yarn-native-services.003.patch,
> YARN-7202.yarn-native-services.004.patch,
> YARN-7202.yarn-native-services.005.patch,
> YARN-7202.yarn-native-services.006.patch,
> YARN-7202.yarn-native-services.007.patch,
> YARN-7202.yarn-native-services.008.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]