Skip to content

Commit db1236c

Browse files
authored
Remove deprecated endpoints of hot threads API (#55109)
This removes deprecated endpoints in hot threads action. Closes #52640
1 parent af11ec5 commit db1236c

File tree

3 files changed

+3
-128
lines changed

3 files changed

+3
-128
lines changed

docs/reference/release-notes/8.0.0-alpha1.asciidoc

+3
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ Mapping::
1515
* Dynamic mappings in indices created on 8.0 and later have stricter validation at mapping update time.
1616
(e.g. incorrect analyzer settings or unknown field types). {pull}51233[#51233]
1717

18+
Deprecations::
19+
* Remove undocumented endpoints of hot threads API {pull}55109[#55109]
20+
1821
coming[8.0.0]

rest-api-spec/src/main/resources/rest-api-spec/api/nodes.hot_threads.json

-81
Original file line numberDiff line numberDiff line change
@@ -24,87 +24,6 @@
2424
"description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
2525
}
2626
}
27-
},
28-
{
29-
"path":"/_cluster/nodes/hotthreads",
30-
"methods":[
31-
"GET"
32-
],
33-
"parts":{},
34-
"deprecated":{
35-
"version":"7.0.0",
36-
"description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
37-
}
38-
},
39-
{
40-
"path":"/_cluster/nodes/{node_id}/hotthreads",
41-
"methods":[
42-
"GET"
43-
],
44-
"parts":{
45-
"node_id":{
46-
"type":"list",
47-
"description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
48-
}
49-
},
50-
"deprecated":{
51-
"version":"7.0.0",
52-
"description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
53-
}
54-
},
55-
{
56-
"path":"/_nodes/hotthreads",
57-
"methods":[
58-
"GET"
59-
],
60-
"parts":{},
61-
"deprecated":{
62-
"version":"7.0.0",
63-
"description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
64-
}
65-
},
66-
{
67-
"path":"/_nodes/{node_id}/hotthreads",
68-
"methods":[
69-
"GET"
70-
],
71-
"parts":{
72-
"node_id":{
73-
"type":"list",
74-
"description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
75-
}
76-
},
77-
"deprecated":{
78-
"version":"7.0.0",
79-
"description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
80-
}
81-
},
82-
{
83-
"path":"/_cluster/nodes/hot_threads",
84-
"methods":[
85-
"GET"
86-
],
87-
"parts":{},
88-
"deprecated":{
89-
"version":"7.0.0",
90-
"description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
91-
}
92-
},
93-
{
94-
"path":"/_cluster/nodes/{node_id}/hot_threads",
95-
"methods":[
96-
"GET"
97-
],
98-
"parts":{
99-
"node_id":{
100-
"type":"list",
101-
"description":"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
102-
}
103-
},
104-
"deprecated":{
105-
"version":"7.0.0",
106-
"description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
107-
}
10827
}
10928
]
11029
},

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java

-47
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,11 @@
3434

3535
import java.io.IOException;
3636
import java.util.List;
37-
import java.util.Locale;
3837

3938
import static org.elasticsearch.rest.RestRequest.Method.GET;
4039

4140
public class RestNodesHotThreadsAction extends BaseRestHandler {
4241

43-
private static final String formatDeprecatedMessageWithoutNodeID = "[%s] is a deprecated endpoint. " +
44-
"Please use [/_nodes/hot_threads] instead.";
45-
private static final String formatDeprecatedMessageWithNodeID = "[%s] is a deprecated endpoint. " +
46-
"Please use [/_nodes/{nodeId}/hot_threads] instead.";
47-
private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS = String.format(Locale.ROOT,
48-
formatDeprecatedMessageWithoutNodeID,
49-
"/_cluster/nodes/hot_threads"
50-
);
51-
private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS = String.format(Locale.ROOT,
52-
formatDeprecatedMessageWithNodeID,
53-
"/_cluster/nodes/{nodeId}/hot_threads"
54-
);
55-
private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS = String.format(Locale.ROOT,
56-
formatDeprecatedMessageWithoutNodeID,
57-
"/_cluster/nodes/hotthreads"
58-
);
59-
private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS = String.format(Locale.ROOT,
60-
formatDeprecatedMessageWithNodeID,
61-
"/_cluster/nodes/{nodeId}/hotthreads"
62-
);
63-
private static final String DEPRECATED_MESSAGE_NODES_HOTTHREADS = String.format(Locale.ROOT,
64-
formatDeprecatedMessageWithoutNodeID,
65-
"/_nodes/hotthreads"
66-
);
67-
private static final String DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS = String.format(Locale.ROOT,
68-
formatDeprecatedMessageWithNodeID,
69-
"/_nodes/{nodeId}/hotthreads"
70-
);
71-
72-
@Override
73-
public List<DeprecatedRoute> deprecatedRoutes() {
74-
return List.of(
75-
new DeprecatedRoute(GET, "/_cluster/nodes/hot_threads",
76-
DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS),
77-
new DeprecatedRoute(GET, "/_cluster/nodes/{nodeId}/hot_threads",
78-
DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS),
79-
new DeprecatedRoute(GET, "/_cluster/nodes/hotthreads",
80-
DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS),
81-
new DeprecatedRoute(GET, "/_cluster/nodes/{nodeId}/hotthreads",
82-
DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS),
83-
new DeprecatedRoute(GET, "/_nodes/hotthreads",
84-
DEPRECATED_MESSAGE_NODES_HOTTHREADS),
85-
new DeprecatedRoute(GET, "/_nodes/{nodeId}/hotthreads",
86-
DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS));
87-
}
88-
8942
@Override
9043
public List<Route> routes() {
9144
return List.of(

0 commit comments

Comments
 (0)