From ed1d1249fcaeeef09f3b726e95aa91a2609383b8 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Tue, 3 Jan 2012 13:43:27 +0200 Subject: [PATCH] simplify support transport actions, no need to provide several action paths, we can derive them --- .../admin/cluster/node/info/TransportNodesInfoAction.java | 5 ----- .../cluster/node/restart/TransportNodesRestartAction.java | 5 ----- .../cluster/node/stats/TransportNodesStatsAction.java | 5 ----- .../ping/broadcast/TransportBroadcastPingAction.java | 5 ----- .../cluster/ping/single/TransportSinglePingAction.java | 5 ----- .../admin/indices/analyze/TransportAnalyzeAction.java | 5 ----- .../cache/clear/TransportClearIndicesCacheAction.java | 8 -------- .../action/admin/indices/flush/TransportFlushAction.java | 7 ------- .../gateway/snapshot/TransportGatewaySnapshotAction.java | 5 ----- .../admin/indices/optimize/TransportOptimizeAction.java | 7 ------- .../admin/indices/refresh/TransportRefreshAction.java | 5 ----- .../indices/segments/TransportIndicesSegmentsAction.java | 5 ----- .../admin/indices/stats/TransportIndicesStatsAction.java | 5 ----- .../indices/status/TransportIndicesStatusAction.java | 5 ----- .../validate/query/TransportValidateQueryAction.java | 5 ----- .../elasticsearch/action/count/TransportCountAction.java | 5 ----- .../org/elasticsearch/action/get/TransportGetAction.java | 5 ----- .../action/get/TransportShardMultiGetAction.java | 5 ----- .../action/percolate/TransportPercolateAction.java | 5 ----- .../broadcast/TransportBroadcastOperationAction.java | 4 +--- .../support/nodes/TransportNodesOperationAction.java | 4 +--- .../custom/TransportSingleCustomOperationAction.java | 4 +--- .../single/shard/TransportShardSingleOperationAction.java | 4 +--- .../gateway/local/TransportNodesListGatewayMetaState.java | 5 ----- .../local/TransportNodesListGatewayStartedShards.java | 5 ----- .../store/TransportNodesListShardStoreMetaData.java | 5 ----- 26 files changed, 4 insertions(+), 129 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java index 83a0753cc24..80d335ad745 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java @@ -60,11 +60,6 @@ public class TransportNodesInfoAction extends TransportNodesOperationAction nodesInfos = new ArrayList(); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/restart/TransportNodesRestartAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/restart/TransportNodesRestartAction.java index aecc80f6a4b..8c8cfcc1bf0 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/restart/TransportNodesRestartAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/restart/TransportNodesRestartAction.java @@ -79,11 +79,6 @@ public class TransportNodesRestartAction extends TransportNodesOperationAction nodeRestartResponses = newArrayList(); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java index c60827f9f10..6a16c298404 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java @@ -60,11 +60,6 @@ public class TransportNodesStatsAction extends TransportNodesOperationAction nodeStats = Lists.newArrayList(); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java index ba253e0a88c..ec3eb79e38b 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/ping/broadcast/TransportBroadcastPingAction.java @@ -59,11 +59,6 @@ public class TransportBroadcastPingAction extends TransportBroadcastOperationAct return TransportActions.Admin.Cluster.Ping.BROADCAST; } - @Override - protected String transportShardAction() { - return "/cluster/ping/broadcast/shard"; - } - @Override protected BroadcastPingRequest newRequest() { return new BroadcastPingRequest(); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/ping/single/TransportSinglePingAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/ping/single/TransportSinglePingAction.java index 2503f9b14b4..0c5191dbecd 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/ping/single/TransportSinglePingAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/ping/single/TransportSinglePingAction.java @@ -50,11 +50,6 @@ public class TransportSinglePingAction extends TransportShardSingleOperationActi return TransportActions.Admin.Cluster.Ping.SINGLE; } - @Override - protected String transportShardAction() { - return "/cluster/ping/single/shard"; - } - @Override protected ShardIterator shards(ClusterState clusterState, SinglePingRequest request) throws ElasticSearchException { return clusterService.operationRouting() diff --git a/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java b/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java index ecd4c68fdb3..aa93fb76c07 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/analyze/TransportAnalyzeAction.java @@ -86,11 +86,6 @@ public class TransportAnalyzeAction extends TransportSingleCustomOperationAction return TransportActions.Admin.Indices.ANALYZE; } - @Override - protected String transportShardAction() { - return "indices/analyze/shard"; - } - @Override protected ShardsIterator shards(ClusterState clusterState, AnalyzeRequest request) { if (request.index() == null) { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java index db563c26621..dcf4219eb48 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java @@ -43,8 +43,6 @@ import static com.google.common.collect.Lists.newArrayList; /** * Indices clear cache action. - * - * */ public class TransportClearIndicesCacheAction extends TransportBroadcastOperationAction { @@ -67,12 +65,6 @@ public class TransportClearIndicesCacheAction extends TransportBroadcastOperatio return TransportActions.Admin.Indices.Cache.CLEAR; } - @Override - protected String transportShardAction() { - return "indices/cache/clear/shard"; - } - - @Override protected ClearIndicesCacheRequest newRequest() { return new ClearIndicesCacheRequest(); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java index ac5d7dc093d..45269e8a3e4 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java @@ -44,8 +44,6 @@ import static com.google.common.collect.Lists.newArrayList; /** * Flush Action. - * - * */ public class TransportFlushAction extends TransportBroadcastOperationAction { @@ -67,11 +65,6 @@ public class TransportFlushAction extends TransportBroadcastOperationAction { @@ -70,11 +68,6 @@ public class TransportOptimizeAction extends TransportBroadcastOperationAction