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?
    try {
      Assert.fail("subQueue should omit field 'childQueues' when childQueue " +
          "is empty.");
    } catch (JSONException je) {
      je.getMessage().contains("JSONObject[\"childQueues\"] not found.");

ResourceManagerRest.md: we should describe "childQueues is omitted if the queue 
doesn't have childQueue":
| childQueues | array of queues(JSON)/queue objects(XML) | A collection of 
sub-queue information |

We should fix CapacityScheduler's 'queues' field as same as FairScheduler's one:
| queues | array of queues(JSON)/zero or more queue objects(XML) | A collection 
of queue resources |

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?
+    // return null for FairSchedulerLeafQueueInfo to avoid childQueues being
+    // displayed in the response of REST API.

> 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

Reply via email to