From 0386317abaa3f898b887bfedd44c12537b2a667f Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Tue, 3 May 2011 16:58:59 -0400 Subject: [PATCH] Remove unnecessary aliasAndIndexToIndex map --- .../org/elasticsearch/cluster/metadata/MetaData.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java index f0e50cc28eb..631717adec0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java @@ -55,7 +55,6 @@ public class MetaData implements Iterable { private final ImmutableSet aliases; private final ImmutableMap aliasAndIndexToIndexMap; - private final ImmutableMap> aliasAndIndexToIndexMap2; private MetaData(ImmutableMap indices, ImmutableMap templates) { this.indices = ImmutableMap.copyOf(indices); @@ -105,12 +104,6 @@ public class MetaData implements Iterable { aliasAndIndexToIndexBuilder.put(entry.getKey(), entry.getValue().toArray(new String[entry.getValue().size()])); } this.aliasAndIndexToIndexMap = aliasAndIndexToIndexBuilder.immutableMap(); - - MapBuilder> aliasAndIndexToIndexBuilder2 = newMapBuilder(); - for (Map.Entry> entry : tmpAliasAndIndexToIndexBuilder.map().entrySet()) { - aliasAndIndexToIndexBuilder2.put(entry.getKey(), ImmutableSet.copyOf(entry.getValue())); - } - this.aliasAndIndexToIndexMap2 = aliasAndIndexToIndexBuilder2.immutableMap(); } public ImmutableSet aliases() { @@ -227,7 +220,7 @@ public class MetaData implements Iterable { } public boolean hasConcreteIndex(String index) { - return aliasAndIndexToIndexMap2.containsKey(index); + return aliasAndIndexToIndexMap.containsKey(index); } public IndexMetaData index(String index) {