Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
fix alerting stats API (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinsoor-amzn authored Dec 3, 2019
1 parent edd6766 commit f9670c0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class ScheduledJobStats : BaseNodeResponse, ToXContentFragment {
lateinit var status: ScheduleStatus
var jobSweeperMetrics: JobSweeperMetrics? = null
var jobInfos: Array<JobSchedulerMetrics>? = null
val nodeRoles = node.roles.map { it.roleName().toUpperCase() }

constructor()

Expand Down Expand Up @@ -84,7 +83,7 @@ class ScheduledJobStats : BaseNodeResponse, ToXContentFragment {
override fun toXContent(builder: XContentBuilder, params: ToXContent.Params): XContentBuilder {
builder.field("name", node.name)
builder.field("schedule_status", status)
builder.field("roles", nodeRoles)
builder.field("roles", node.roles.map { it.roleName().toUpperCase() })
if (jobSweeperMetrics != null) {
builder.startObject(RestScheduledJobStatsHandler.JOB_SCHEDULING_METRICS)
jobSweeperMetrics!!.toXContent(builder, params)
Expand Down

0 comments on commit f9670c0

Please sign in to comment.