From fab27f1bb032f573b16b53ef4d5bf062314d0ebe Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 11 Jun 2015 17:32:29 +0200 Subject: [PATCH] Create ShardSuggestService/Metrics manually outside of guice This ShardSuggestService is a simple metrics counter and doesn't need to be injected. It just makes IndexShard ctor bigger for no reason. --- .../action/suggest/TransportSuggestAction.java | 8 ++++---- .../org/elasticsearch/index/shard/IndexShard.java | 15 +++++++-------- .../index/shard/IndexShardModule.java | 2 -- .../index/shard/ShadowIndexShard.java | 5 ++--- ...uggestService.java => ShardSuggestMetric.java} | 9 +-------- 5 files changed, 14 insertions(+), 25 deletions(-) rename core/src/main/java/org/elasticsearch/index/suggest/stats/{ShardSuggestService.java => ShardSuggestMetric.java} (89%) diff --git a/core/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java b/core/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java index ac046e6552d..27caf314b0d 100644 --- a/core/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java +++ b/core/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java @@ -39,7 +39,7 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.IndexService; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.suggest.stats.ShardSuggestService; +import org.elasticsearch.index.suggest.stats.ShardSuggestMetric; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.search.suggest.Suggest; import org.elasticsearch.search.suggest.SuggestPhase; @@ -130,8 +130,8 @@ public class TransportSuggestAction extends TransportBroadcastAction