|
@@ -37,6 +37,8 @@ import org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskAction;
|
|
|
import org.elasticsearch.action.admin.cluster.node.tasks.get.TransportGetTaskAction;
|
|
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksAction;
|
|
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.TransportListTasksAction;
|
|
|
+import org.elasticsearch.action.admin.cluster.node.usage.NodesUsageAction;
|
|
|
+import org.elasticsearch.action.admin.cluster.node.usage.TransportNodesUsageAction;
|
|
|
import org.elasticsearch.action.admin.cluster.remote.RemoteInfoAction;
|
|
|
import org.elasticsearch.action.admin.cluster.remote.TransportRemoteInfoAction;
|
|
|
import org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryAction;
|
|
@@ -234,6 +236,7 @@ import org.elasticsearch.rest.action.admin.cluster.RestListTasksAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestNodesHotThreadsAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestNodesStatsAction;
|
|
|
+import org.elasticsearch.rest.action.admin.cluster.RestNodesUsageAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestPendingClusterTasksAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestPutRepositoryAction;
|
|
|
import org.elasticsearch.rest.action.admin.cluster.RestPutStoredScriptAction;
|
|
@@ -310,6 +313,7 @@ import org.elasticsearch.rest.action.search.RestMultiSearchAction;
|
|
|
import org.elasticsearch.rest.action.search.RestSearchAction;
|
|
|
import org.elasticsearch.rest.action.search.RestSearchScrollAction;
|
|
|
import org.elasticsearch.threadpool.ThreadPool;
|
|
|
+import org.elasticsearch.usage.UsageService;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -346,7 +350,7 @@ public class ActionModule extends AbstractModule {
|
|
|
public ActionModule(boolean transportClient, Settings settings, IndexNameExpressionResolver indexNameExpressionResolver,
|
|
|
IndexScopedSettings indexScopedSettings, ClusterSettings clusterSettings, SettingsFilter settingsFilter,
|
|
|
ThreadPool threadPool, List<ActionPlugin> actionPlugins, NodeClient nodeClient,
|
|
|
- CircuitBreakerService circuitBreakerService) {
|
|
|
+ CircuitBreakerService circuitBreakerService, UsageService usageService) {
|
|
|
this.transportClient = transportClient;
|
|
|
this.settings = settings;
|
|
|
this.indexNameExpressionResolver = indexNameExpressionResolver;
|
|
@@ -373,7 +377,7 @@ public class ActionModule extends AbstractModule {
|
|
|
if (transportClient) {
|
|
|
restController = null;
|
|
|
} else {
|
|
|
- restController = new RestController(settings, headers, restWrapper, nodeClient, circuitBreakerService);
|
|
|
+ restController = new RestController(settings, headers, restWrapper, nodeClient, circuitBreakerService, usageService);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -405,6 +409,7 @@ public class ActionModule extends AbstractModule {
|
|
|
actions.register(NodesInfoAction.INSTANCE, TransportNodesInfoAction.class);
|
|
|
actions.register(RemoteInfoAction.INSTANCE, TransportRemoteInfoAction.class);
|
|
|
actions.register(NodesStatsAction.INSTANCE, TransportNodesStatsAction.class);
|
|
|
+ actions.register(NodesUsageAction.INSTANCE, TransportNodesUsageAction.class);
|
|
|
actions.register(NodesHotThreadsAction.INSTANCE, TransportNodesHotThreadsAction.class);
|
|
|
actions.register(ListTasksAction.INSTANCE, TransportListTasksAction.class);
|
|
|
actions.register(GetTaskAction.INSTANCE, TransportGetTaskAction.class);
|
|
@@ -515,6 +520,7 @@ public class ActionModule extends AbstractModule {
|
|
|
registerHandler.accept(new RestNodesInfoAction(settings, restController, settingsFilter));
|
|
|
registerHandler.accept(new RestRemoteClusterInfoAction(settings, restController));
|
|
|
registerHandler.accept(new RestNodesStatsAction(settings, restController));
|
|
|
+ registerHandler.accept(new RestNodesUsageAction(settings, restController));
|
|
|
registerHandler.accept(new RestNodesHotThreadsAction(settings, restController));
|
|
|
registerHandler.accept(new RestClusterAllocationExplainAction(settings, restController));
|
|
|
registerHandler.accept(new RestClusterStatsAction(settings, restController));
|