[
https://issues.apache.org/jira/browse/YUNIKORN-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kuan Po Tseng updated YUNIKORN-2730:
------------------------------------
Description:
{code:java}
/ws/v1/events/batch
{code}
will return null EventRecores if start argument can't fetch any record,
For example, if I specify start=268 which is larger than HighestID, the
EventRecords is null, it seems to me returning an empty array might be better.
{code:java}
➜ brandboat@suse ~/Code/yunikorn curl -L
http://localhost:9889/ws/v1/events/batch\?start\=268\&count\=2 | jq
{code}
{code:java}
{
"InstanceUUID": "c3dd83f9-6546-4c63-b4cb-622cbb081aa3",
"LowestID": 0,
"HighestID": 267,
"EventRecords": null
} {code}
was:
{code:java}
/ws/v1/events/batch
{code}
will return null EventRecores if start argument can't fetch any record,
For example, if I specify start=268 which is larger than HighestID, the
EventRecords is null, it seems to me returning an empty array might be better.
{code:java}
➜ brandboat@suse ~/Code/yunikorn curl -L
http://localhost:9889/ws/v1/events/batch\?start\=268\&count\=2 | jq
{code}
{code:java}
{
"InstanceUUID": "c3dd83f9-6546-4c63-b4cb-622cbb081aa3",
"LowestID": 0,
"HighestID": 267,
"EventRecords": null
} {code}
> Using empty array to replace null EventRecords from /ws/v1/events/batch
> -----------------------------------------------------------------------
>
> Key: YUNIKORN-2730
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2730
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: core - scheduler
> Reporter: Kuan Po Tseng
> Priority: Minor
>
> {code:java}
> /ws/v1/events/batch
> {code}
> will return null EventRecores if start argument can't fetch any record,
> For example, if I specify start=268 which is larger than HighestID, the
> EventRecords is null, it seems to me returning an empty array might be better.
> {code:java}
> ➜ brandboat@suse ~/Code/yunikorn curl -L
> http://localhost:9889/ws/v1/events/batch\?start\=268\&count\=2 | jq
> {code}
> {code:java}
> {
> "InstanceUUID": "c3dd83f9-6546-4c63-b4cb-622cbb081aa3",
> "LowestID": 0,
> "HighestID": 267,
> "EventRecords": null
> } {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]