Skip to content

Commit d0a76fa

Browse files
pquentingithub-actions[bot]
authored andcommitted
Add transform.get_node_stats API (#5771)
* Add transform.get_node_stats API * Fix description * Fix file names * Remove privileges for now (cherry picked from commit 39c4761)
1 parent 21d0c41 commit d0a76fa

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ get-features-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/ope
260260
get-global-checkpoints,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-apis.html,
261261
get-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-license.html,
262262
get-ml-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-info.html,
263+
get-node-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats,,
263264
get-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-pipeline-api.html,
264265
get-repositories-metering-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-repositories-metering-api.html,
265266
get-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
22+
/**
23+
* Get node stats.
24+
*
25+
* Get per-node information about transform usage.
26+
* @rest_spec_name transform.get_node_stats
27+
* @availability stack since=8.15.0 stability=stable
28+
* @availability serverless stability=stable visibility=public
29+
* @doc_id get-node-stats
30+
*/
31+
export interface Request extends RequestBase {
32+
urls: [
33+
{
34+
path: '/_transform/_node_stats'
35+
methods: ['GET']
36+
}
37+
]
38+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { TransformNodeStats } from './types'
21+
22+
export class Response {
23+
/** @codegen_name stats */
24+
body: TransformNodeStats
25+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { NodeId } from '@_types/common'
21+
import { integer } from '@_types/Numeric'
22+
import { AdditionalProperties } from '@spec_utils/behaviors'
23+
24+
/**
25+
* @behavior_meta AdditionalProperties fieldname=nodes description="Per node statistics"
26+
*/
27+
export class TransformNodeStats
28+
implements AdditionalProperties<NodeId, Scheduler>
29+
{
30+
total: Scheduler
31+
}
32+
33+
export interface Scheduler {
34+
scheduler: TransformNodeStatsDetails
35+
}
36+
37+
export interface TransformNodeStatsDetails {
38+
registered_transform_count: integer
39+
peek_transform?: string
40+
}

0 commit comments

Comments
 (0)