[
https://issues.apache.org/jira/browse/YARN-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14548102#comment-14548102
]
Tsuyoshi Ozawa commented on YARN-2336:
--------------------------------------
[~ajisakaa] thank you for updating. We're almost there.
TestRMWebServicesFairScheduler#testClusterSchedulerWithSubQueues: Can we add a
following test to verify non-existence of the field 'childQueues'? Also, could
you add a same kind of test to TestRMWebServicesCapacitySched for the
consistency of APIs between CapacityScheduler and FairScheduler?
{code}
try {
subQueueInfo.getJSONObject(1).getJSONObject("childQueues");
Assert.fail("subQueue should omit field 'childQueues' when childQueue " +
"is empty.");
} catch (JSONException je) {
je.getMessage().contains("JSONObject[\"childQueues\"] not found.");
}
{code}
ResourceManagerRest.md: we should describe "childQueues is omitted if the queue
doesn't have childQueue":
{code}
| childQueues | array of queues(JSON)/queue objects(XML) | A collection of
sub-queue information |
{code}
We should fix CapacityScheduler's 'queues' field as same as FairScheduler's one:
{code}
| queues | array of queues(JSON)/zero or more queue objects(XML) | A collection
of queue resources |
{code}
Minor nits: A following comment can be fixed as "return null to omit
childQueues field when its size is zero.". Also we should add a reason to do
this like "This is for consistency of return value of REST API between
FairScheduler and CapacityScheduler - childQueues and ". What do you think?
{code}
+ // return null for FairSchedulerLeafQueueInfo to avoid childQueues being
+ // displayed in the response of REST API.
{code}
> Fair scheduler REST api returns a missing '[' bracket JSON for deep queue tree
> ------------------------------------------------------------------------------
>
> Key: YARN-2336
> URL: https://issues.apache.org/jira/browse/YARN-2336
> Project: Hadoop YARN
> Issue Type: Bug
> Components: fairscheduler
> Affects Versions: 2.4.1, 2.6.0
> Reporter: Kenji Kikushima
> Assignee: Akira AJISAKA
> Labels: BB2015-05-RFC
> Attachments: YARN-2336-2.patch, YARN-2336-3.patch, YARN-2336-4.patch,
> YARN-2336.005.patch, YARN-2336.007.patch, YARN-2336.008.patch, YARN-2336.patch
>
>
> When we have sub queues in Fair Scheduler, REST api returns a missing '['
> blacket JSON for childQueues.
> This issue found by [~ajisakaa] at YARN-1050.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)