|
34 | 34 |
|
35 | 35 | import java.io.IOException;
|
36 | 36 | import java.util.List;
|
37 |
| -import java.util.Locale; |
38 | 37 |
|
39 | 38 | import static org.elasticsearch.rest.RestRequest.Method.GET;
|
40 | 39 |
|
41 | 40 | public class RestNodesHotThreadsAction extends BaseRestHandler {
|
42 | 41 |
|
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 |
| - |
89 | 42 | @Override
|
90 | 43 | public List<Route> routes() {
|
91 | 44 | return List.of(
|
|
0 commit comments