Browse Source

Remove deprecated endpoints of hot threads API (#55109)

This removes deprecated endpoints in hot threads action.

Closes #52640
muachilin 5 years ago
parent
commit
db1236ce3d

+ 3 - 0
docs/reference/release-notes/8.0.0-alpha1.asciidoc

@@ -15,4 +15,7 @@ Mapping::
 * Dynamic mappings in indices created on 8.0 and later have stricter validation at mapping update time.
   (e.g. incorrect analyzer settings or unknown field types). {pull}51233[#51233]
 
+Deprecations::
+* Remove undocumented endpoints of hot threads API {pull}55109[#55109]
+
 coming[8.0.0]

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

@@ -24,87 +24,6 @@
               "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"
             }
           }
-        },
-        {
-          "path":"/_cluster/nodes/hotthreads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{},
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
-          }
-        },
-        {
-          "path":"/_cluster/nodes/{node_id}/hotthreads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{
-            "node_id":{
-              "type":"list",
-              "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"
-            }
-          },
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
-          }
-        },
-        {
-          "path":"/_nodes/hotthreads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{},
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
-          }
-        },
-        {
-          "path":"/_nodes/{node_id}/hotthreads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{
-            "node_id":{
-              "type":"list",
-              "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"
-            }
-          },
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"
-          }
-        },
-        {
-          "path":"/_cluster/nodes/hot_threads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{},
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
-          }
-        },
-        {
-          "path":"/_cluster/nodes/{node_id}/hot_threads",
-          "methods":[
-            "GET"
-          ],
-          "parts":{
-            "node_id":{
-              "type":"list",
-              "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"
-            }
-          },
-          "deprecated":{
-            "version":"7.0.0",
-            "description":"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"
-          }
         }
       ]
     },

+ 0 - 47
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesHotThreadsAction.java

@@ -34,58 +34,11 @@ import org.elasticsearch.rest.action.RestResponseListener;
 
 import java.io.IOException;
 import java.util.List;
-import java.util.Locale;
 
 import static org.elasticsearch.rest.RestRequest.Method.GET;
 
 public class RestNodesHotThreadsAction extends BaseRestHandler {
 
-    private static final String formatDeprecatedMessageWithoutNodeID = "[%s] is a deprecated endpoint. " + 
-        "Please use [/_nodes/hot_threads] instead.";
-    private static final String formatDeprecatedMessageWithNodeID = "[%s] is a deprecated endpoint. " + 
-        "Please use [/_nodes/{nodeId}/hot_threads] instead.";
-    private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithoutNodeID, 
-        "/_cluster/nodes/hot_threads"
-    ); 
-    private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithNodeID, 
-        "/_cluster/nodes/{nodeId}/hot_threads"
-    );
-    private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithoutNodeID, 
-        "/_cluster/nodes/hotthreads"
-    ); 
-    private static final String DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithNodeID, 
-        "/_cluster/nodes/{nodeId}/hotthreads"
-    ); 
-    private static final String DEPRECATED_MESSAGE_NODES_HOTTHREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithoutNodeID, 
-        "/_nodes/hotthreads"
-    ); 
-    private static final String DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS = String.format(Locale.ROOT, 
-        formatDeprecatedMessageWithNodeID, 
-        "/_nodes/{nodeId}/hotthreads"
-    );
-
-    @Override
-    public List<DeprecatedRoute> deprecatedRoutes() {
-        return List.of(
-            new DeprecatedRoute(GET, "/_cluster/nodes/hot_threads",
-                    DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS),
-            new DeprecatedRoute(GET, "/_cluster/nodes/{nodeId}/hot_threads",
-                    DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS),
-            new DeprecatedRoute(GET, "/_cluster/nodes/hotthreads",
-                    DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS),
-            new DeprecatedRoute(GET, "/_cluster/nodes/{nodeId}/hotthreads",
-                    DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS),
-            new DeprecatedRoute(GET, "/_nodes/hotthreads",
-                    DEPRECATED_MESSAGE_NODES_HOTTHREADS),
-            new DeprecatedRoute(GET, "/_nodes/{nodeId}/hotthreads",
-                    DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS));
-    }
-
     @Override
     public List<Route> routes() {
         return List.of(