[ 
https://issues.apache.org/jira/browse/YUNIKORN-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798230#comment-17798230
 ] 

Chia-Ping Tsai commented on YUNIKORN-2235:
------------------------------------------

{quote}
URL: /applications?state=<STATE>. Response would be Array of Applications. Why 
array of applications? As of now, application id can be re used (for example, 
cron jobs etc). Since there could be more than one run of the same application 
ran at different times, we would need to expose details of all those different 
runs. Hence, array of applications. Mostly, there would be one item in the 
response array. End users would be able to interpret the response based on the 
app time etc (in case of more than one run). Running, Completed & Rejected apps 
are stored in different maps. Especially, Completed apps are being handled 
differently through new app id (generated internally). Need to handle each 
state appropriately and return the applications details.
{quote}

thanks for nice explanation. just one question: 

I guess the implementation is to iterate all applications collections and then 
filter out the unrequested state. If the iteration cost is acceptable now, is 
there room to add more queries in the future? Also, as a user I may expect it 
accepts other queries ( user, group, queue, and so on).


> Add new RESTful API for retrieving application
> ----------------------------------------------
>
>                 Key: YUNIKORN-2235
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2235
>             Project: Apache YuniKorn
>          Issue Type: New Feature
>          Components: core - scheduler
>            Reporter: Xie YiFan
>            Assignee: Xie YiFan
>            Priority: Minor
>              Labels: pull-request-available
>
> *Situation:*
> Currently, the path format of retrieving application is 
> /ws/v1/partition/\{partitionName}/queue/\{queueName}/application/\{appId}.
> We have to give 3 parameters (partitionName, queueName & appID) to fetch 
> application information. But one application can only be submitted to one 
> queue and PartitionContext stores all applications. It means that we can 
> fetch the target application without queue name.
> *Proposal:*
> As we have discussed in slack, we can add the following 2 RESTful API.
>  # /ws/v1/partition/\{partitionName}/applications/\{type} 
> aim to list applications IDs via the types: rejected, running and completed
>  # /ws/v1/partition/\{partitionName}/application/\{applicationID} 
> aim to retrieving one application object directly.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to