|
96 | 96 | import org.codelibs.fesen.client.action.HttpRemoteStoreStatsAction; |
97 | 97 | import org.codelibs.fesen.client.action.HttpSegmentReplicationStatsAction; |
98 | 98 | import org.codelibs.fesen.client.action.HttpWlmStatsAction; |
| 99 | +import org.codelibs.fesen.client.action.HttpClusterAllocationExplainAction; |
| 100 | +import org.codelibs.fesen.client.action.HttpClusterSearchShardsAction; |
| 101 | +import org.codelibs.fesen.client.action.HttpClusterStateAction; |
| 102 | +import org.codelibs.fesen.client.action.HttpGetTaskAction; |
| 103 | +import org.codelibs.fesen.client.action.HttpIndicesSegmentsAction; |
| 104 | +import org.codelibs.fesen.client.action.HttpIndicesShardStoresAction; |
| 105 | +import org.codelibs.fesen.client.action.HttpMultiTermVectorsAction; |
| 106 | +import org.codelibs.fesen.client.action.HttpNodesInfoAction; |
| 107 | +import org.codelibs.fesen.client.action.HttpNodesUsageAction; |
| 108 | +import org.codelibs.fesen.client.action.HttpRecoveryAction; |
| 109 | +import org.codelibs.fesen.client.action.HttpRemoteInfoAction; |
| 110 | +import org.codelibs.fesen.client.action.HttpTermVectorsAction; |
| 111 | +import org.codelibs.fesen.client.action.HttpUpgradeAction; |
| 112 | +import org.codelibs.fesen.client.action.HttpUpgradeStatusAction; |
99 | 113 | import org.codelibs.fesen.client.action.HttpPendingClusterTasksAction; |
100 | 114 | import org.codelibs.fesen.client.action.HttpPutIndexTemplateAction; |
101 | 115 | import org.codelibs.fesen.client.action.HttpPutMappingAction; |
|
125 | 139 | import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsAction; |
126 | 140 | import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest; |
127 | 141 | import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsResponse; |
| 142 | +import org.opensearch.action.admin.cluster.node.info.NodesInfoAction; |
| 143 | +import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest; |
| 144 | +import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse; |
128 | 145 | import org.opensearch.action.admin.cluster.node.stats.NodesStatsAction; |
129 | 146 | import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest; |
130 | 147 | import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; |
131 | 148 | import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksAction; |
132 | 149 | import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; |
133 | 150 | import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; |
| 151 | +import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskAction; |
| 152 | +import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskRequest; |
| 153 | +import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskResponse; |
134 | 154 | import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksAction; |
135 | 155 | import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest; |
136 | 156 | import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; |
| 157 | +import org.opensearch.action.admin.cluster.node.usage.NodesUsageAction; |
| 158 | +import org.opensearch.action.admin.cluster.node.usage.NodesUsageRequest; |
| 159 | +import org.opensearch.action.admin.cluster.node.usage.NodesUsageResponse; |
| 160 | +import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainAction; |
| 161 | +import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainRequest; |
| 162 | +import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainResponse; |
| 163 | +import org.opensearch.action.admin.cluster.remote.RemoteInfoAction; |
| 164 | +import org.opensearch.action.admin.cluster.remote.RemoteInfoRequest; |
| 165 | +import org.opensearch.action.admin.cluster.remote.RemoteInfoResponse; |
| 166 | +import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsAction; |
| 167 | +import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsRequest; |
| 168 | +import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse; |
| 169 | +import org.opensearch.action.admin.cluster.state.ClusterStateAction; |
| 170 | +import org.opensearch.action.admin.cluster.state.ClusterStateRequest; |
| 171 | +import org.opensearch.action.admin.cluster.state.ClusterStateResponse; |
137 | 172 | import org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryAction; |
138 | 173 | import org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest; |
139 | 174 | import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesAction; |
|
244 | 279 | import org.opensearch.action.admin.indices.replication.SegmentReplicationStatsAction; |
245 | 280 | import org.opensearch.action.admin.indices.replication.SegmentReplicationStatsRequest; |
246 | 281 | import org.opensearch.action.admin.indices.replication.SegmentReplicationStatsResponse; |
| 282 | +import org.opensearch.action.admin.indices.recovery.RecoveryAction; |
| 283 | +import org.opensearch.action.admin.indices.recovery.RecoveryRequest; |
| 284 | +import org.opensearch.action.admin.indices.recovery.RecoveryResponse; |
| 285 | +import org.opensearch.action.admin.indices.segments.IndicesSegmentResponse; |
| 286 | +import org.opensearch.action.admin.indices.segments.IndicesSegmentsAction; |
| 287 | +import org.opensearch.action.admin.indices.segments.IndicesSegmentsRequest; |
| 288 | +import org.opensearch.action.admin.indices.shards.IndicesShardStoresAction; |
| 289 | +import org.opensearch.action.admin.indices.shards.IndicesShardStoresRequest; |
| 290 | +import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse; |
247 | 291 | import org.opensearch.action.admin.indices.stats.IndicesStatsAction; |
248 | 292 | import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; |
249 | 293 | import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; |
| 294 | +import org.opensearch.action.admin.indices.upgrade.get.UpgradeStatusAction; |
| 295 | +import org.opensearch.action.admin.indices.upgrade.get.UpgradeStatusRequest; |
| 296 | +import org.opensearch.action.admin.indices.upgrade.get.UpgradeStatusResponse; |
| 297 | +import org.opensearch.action.admin.indices.upgrade.post.UpgradeAction; |
| 298 | +import org.opensearch.action.admin.indices.upgrade.post.UpgradeRequest; |
| 299 | +import org.opensearch.action.admin.indices.upgrade.post.UpgradeResponse; |
250 | 300 | import org.opensearch.action.admin.indices.validate.query.ValidateQueryAction; |
251 | 301 | import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequest; |
252 | 302 | import org.opensearch.action.admin.indices.validate.query.ValidateQueryResponse; |
|
297 | 347 | import org.opensearch.action.search.SearchScrollAction; |
298 | 348 | import org.opensearch.action.search.SearchScrollRequest; |
299 | 349 | import org.opensearch.action.support.clustermanager.AcknowledgedResponse; |
| 350 | +import org.opensearch.action.termvectors.MultiTermVectorsAction; |
| 351 | +import org.opensearch.action.termvectors.MultiTermVectorsRequest; |
| 352 | +import org.opensearch.action.termvectors.MultiTermVectorsResponse; |
| 353 | +import org.opensearch.action.termvectors.TermVectorsAction; |
| 354 | +import org.opensearch.action.termvectors.TermVectorsRequest; |
| 355 | +import org.opensearch.action.termvectors.TermVectorsResponse; |
300 | 356 | import org.opensearch.action.update.UpdateAction; |
301 | 357 | import org.opensearch.action.update.UpdateRequest; |
302 | 358 | import org.opensearch.action.update.UpdateResponse; |
@@ -887,25 +943,81 @@ public HttpClient(final Settings settings, final ThreadPool threadPool, final Li |
887 | 943 | new HttpWlmStatsAction(this, WlmStatsAction.INSTANCE).execute((WlmStatsRequest) request, actionListener); |
888 | 944 | }); |
889 | 945 |
|
890 | | - // org.codelibs.fesen.action.admin.cluster.allocation.ClusterAllocationExplainAction |
891 | | - // org.codelibs.fesen.action.admin.cluster.node.tasks.get.GetTaskAction |
892 | | - // org.codelibs.fesen.action.admin.cluster.node.stats.NodesStatsAction |
893 | | - // org.codelibs.fesen.action.admin.cluster.node.usage.NodesUsageAction |
894 | | - // org.codelibs.fesen.action.admin.cluster.node.info.NodesInfoAction |
895 | | - // org.codelibs.fesen.action.admin.cluster.remote.RemoteInfoAction |
896 | | - // org.codelibs.fesen.action.admin.cluster.shards.ClusterSearchShardsAction |
897 | | - // org.codelibs.fesen.action.admin.cluster.state.ClusterStateAction |
898 | | - // org.codelibs.fesen.action.admin.cluster.stats.ClusterStatsAction |
899 | | - // org.codelibs.fesen.action.admin.indices.recovery.RecoveryAction |
900 | | - // org.codelibs.fesen.action.admin.indices.segments.IndicesSegmentsAction |
901 | | - // org.codelibs.fesen.action.admin.indices.shards.IndicesShardStoresActions |
902 | | - // org.codelibs.fesen.action.admin.indices.stats.IndicesStatsAction |
903 | | - // org.codelibs.fesen.action.admin.indices.upgrade.get.UpgradeStatusAction |
904 | | - // org.codelibs.fesen.action.admin.indices.upgrade.post.UpgradeAction |
905 | | - // org.codelibs.fesen.action.admin.indices.upgrade.post.UpgradeSettingsAction |
906 | | - // org.codelibs.fesen.action.termvectors.MultiTermVectorsAction |
907 | | - // org.codelibs.fesen.action.termvectors.TermVectorsAction |
908 | | - // org.opensearch.action.admin.cluster.wlm.WlmStatsAction |
| 946 | + actions.put(GetTaskAction.INSTANCE, (request, listener) -> { |
| 947 | + @SuppressWarnings("unchecked") |
| 948 | + final ActionListener<GetTaskResponse> actionListener = (ActionListener<GetTaskResponse>) listener; |
| 949 | + new HttpGetTaskAction(this, GetTaskAction.INSTANCE).execute((GetTaskRequest) request, actionListener); |
| 950 | + }); |
| 951 | + actions.put(NodesUsageAction.INSTANCE, (request, listener) -> { |
| 952 | + @SuppressWarnings("unchecked") |
| 953 | + final ActionListener<NodesUsageResponse> actionListener = (ActionListener<NodesUsageResponse>) listener; |
| 954 | + new HttpNodesUsageAction(this, NodesUsageAction.INSTANCE).execute((NodesUsageRequest) request, actionListener); |
| 955 | + }); |
| 956 | + actions.put(NodesInfoAction.INSTANCE, (request, listener) -> { |
| 957 | + @SuppressWarnings("unchecked") |
| 958 | + final ActionListener<NodesInfoResponse> actionListener = (ActionListener<NodesInfoResponse>) listener; |
| 959 | + new HttpNodesInfoAction(this, NodesInfoAction.INSTANCE).execute((NodesInfoRequest) request, actionListener); |
| 960 | + }); |
| 961 | + actions.put(RemoteInfoAction.INSTANCE, (request, listener) -> { |
| 962 | + @SuppressWarnings("unchecked") |
| 963 | + final ActionListener<RemoteInfoResponse> actionListener = (ActionListener<RemoteInfoResponse>) listener; |
| 964 | + new HttpRemoteInfoAction(this, RemoteInfoAction.INSTANCE).execute((RemoteInfoRequest) request, actionListener); |
| 965 | + }); |
| 966 | + actions.put(ClusterAllocationExplainAction.INSTANCE, (request, listener) -> { |
| 967 | + @SuppressWarnings("unchecked") |
| 968 | + final ActionListener<ClusterAllocationExplainResponse> actionListener = |
| 969 | + (ActionListener<ClusterAllocationExplainResponse>) listener; |
| 970 | + new HttpClusterAllocationExplainAction(this, ClusterAllocationExplainAction.INSTANCE) |
| 971 | + .execute((ClusterAllocationExplainRequest) request, actionListener); |
| 972 | + }); |
| 973 | + actions.put(ClusterSearchShardsAction.INSTANCE, (request, listener) -> { |
| 974 | + @SuppressWarnings("unchecked") |
| 975 | + final ActionListener<ClusterSearchShardsResponse> actionListener = (ActionListener<ClusterSearchShardsResponse>) listener; |
| 976 | + new HttpClusterSearchShardsAction(this, ClusterSearchShardsAction.INSTANCE).execute((ClusterSearchShardsRequest) request, |
| 977 | + actionListener); |
| 978 | + }); |
| 979 | + actions.put(ClusterStateAction.INSTANCE, (request, listener) -> { |
| 980 | + @SuppressWarnings("unchecked") |
| 981 | + final ActionListener<ClusterStateResponse> actionListener = (ActionListener<ClusterStateResponse>) listener; |
| 982 | + new HttpClusterStateAction(this, ClusterStateAction.INSTANCE).execute((ClusterStateRequest) request, actionListener); |
| 983 | + }); |
| 984 | + actions.put(RecoveryAction.INSTANCE, (request, listener) -> { |
| 985 | + @SuppressWarnings("unchecked") |
| 986 | + final ActionListener<RecoveryResponse> actionListener = (ActionListener<RecoveryResponse>) listener; |
| 987 | + new HttpRecoveryAction(this, RecoveryAction.INSTANCE).execute((RecoveryRequest) request, actionListener); |
| 988 | + }); |
| 989 | + actions.put(IndicesSegmentsAction.INSTANCE, (request, listener) -> { |
| 990 | + @SuppressWarnings("unchecked") |
| 991 | + final ActionListener<IndicesSegmentResponse> actionListener = (ActionListener<IndicesSegmentResponse>) listener; |
| 992 | + new HttpIndicesSegmentsAction(this, IndicesSegmentsAction.INSTANCE).execute((IndicesSegmentsRequest) request, actionListener); |
| 993 | + }); |
| 994 | + actions.put(IndicesShardStoresAction.INSTANCE, (request, listener) -> { |
| 995 | + @SuppressWarnings("unchecked") |
| 996 | + final ActionListener<IndicesShardStoresResponse> actionListener = (ActionListener<IndicesShardStoresResponse>) listener; |
| 997 | + new HttpIndicesShardStoresAction(this, IndicesShardStoresAction.INSTANCE).execute((IndicesShardStoresRequest) request, |
| 998 | + actionListener); |
| 999 | + }); |
| 1000 | + actions.put(UpgradeStatusAction.INSTANCE, (request, listener) -> { |
| 1001 | + @SuppressWarnings("unchecked") |
| 1002 | + final ActionListener<UpgradeStatusResponse> actionListener = (ActionListener<UpgradeStatusResponse>) listener; |
| 1003 | + new HttpUpgradeStatusAction(this, UpgradeStatusAction.INSTANCE).execute((UpgradeStatusRequest) request, actionListener); |
| 1004 | + }); |
| 1005 | + actions.put(UpgradeAction.INSTANCE, (request, listener) -> { |
| 1006 | + @SuppressWarnings("unchecked") |
| 1007 | + final ActionListener<UpgradeResponse> actionListener = (ActionListener<UpgradeResponse>) listener; |
| 1008 | + new HttpUpgradeAction(this, UpgradeAction.INSTANCE).execute((UpgradeRequest) request, actionListener); |
| 1009 | + }); |
| 1010 | + actions.put(TermVectorsAction.INSTANCE, (request, listener) -> { |
| 1011 | + @SuppressWarnings("unchecked") |
| 1012 | + final ActionListener<TermVectorsResponse> actionListener = (ActionListener<TermVectorsResponse>) listener; |
| 1013 | + new HttpTermVectorsAction(this, TermVectorsAction.INSTANCE).execute((TermVectorsRequest) request, actionListener); |
| 1014 | + }); |
| 1015 | + actions.put(MultiTermVectorsAction.INSTANCE, (request, listener) -> { |
| 1016 | + @SuppressWarnings("unchecked") |
| 1017 | + final ActionListener<MultiTermVectorsResponse> actionListener = (ActionListener<MultiTermVectorsResponse>) listener; |
| 1018 | + new HttpMultiTermVectorsAction(this, MultiTermVectorsAction.INSTANCE).execute((MultiTermVectorsRequest) request, |
| 1019 | + actionListener); |
| 1020 | + }); |
909 | 1021 | } |
910 | 1022 |
|
911 | 1023 | @Override |
@@ -1093,7 +1205,8 @@ protected ForkJoinPool createThreadPool(final Settings settings) { |
1093 | 1205 | } |
1094 | 1206 |
|
1095 | 1207 | protected List<NamedXContentRegistry.Entry> getDefaultNamedXContents() { |
1096 | | - // TODO check SearchModule |
| 1208 | + // SearchModule.getNamedXContents() requires too many dependencies to instantiate. |
| 1209 | + // Maintain the aggregation parser mappings manually. |
1097 | 1210 | final Map<String, ContextParser<Object, ? extends Aggregation>> map = new HashMap<>(); |
1098 | 1211 | map.put(CardinalityAggregationBuilder.NAME, (p, c) -> ParsedCardinality.fromXContent(p, (String) c)); |
1099 | 1212 | map.put(InternalHDRPercentiles.NAME, (p, c) -> ParsedHDRPercentiles.fromXContent(p, (String) c)); |
|
0 commit comments