Small cleanup

This commit is contained in:
Martijn van Groningen 2013-11-25 23:18:36 +01:00
parent 036febe110
commit ac03fba9d3
3 changed files with 3 additions and 5 deletions

View File

@ -155,9 +155,9 @@ public class IndexTemplateMetaData {
private Settings settings = ImmutableSettings.Builder.EMPTY_SETTINGS;
private ImmutableOpenMap.Builder<String, CompressedString> mappings;
private final ImmutableOpenMap.Builder<String, CompressedString> mappings;
private ImmutableOpenMap.Builder<String, IndexMetaData.Custom> customs;
private final ImmutableOpenMap.Builder<String, IndexMetaData.Custom> customs;
public Builder(String name) {
this.name = name;
@ -166,7 +166,7 @@ public class IndexTemplateMetaData {
}
public Builder(IndexTemplateMetaData indexTemplateMetaData) {
this(indexTemplateMetaData.name());
this.name = indexTemplateMetaData.name();
order(indexTemplateMetaData.order());
template(indexTemplateMetaData.template());
settings(indexTemplateMetaData.settings());

View File

@ -230,7 +230,6 @@ public class LocalGatewayMetaState extends AbstractComponent implements ClusterS
continue;
}
if (!newMetaData.hasIndex(current.index())) {
// TODO: Create util for toString()
logger.debug("[{}] deleting index that is no longer part of the metadata (indices: [{}])", current.index(), newMetaData.indices().keys());
if (nodeEnv.hasNodeFile()) {
FileSystemUtils.deleteRecursively(nodeEnv.indexLocations(new Index(current.index())));

View File

@ -116,7 +116,6 @@ public class NoneGateway extends AbstractLifecycleComponent<Gateway> implements
// only delete indices when we already received a state (currentMetaData != null)
for (IndexMetaData current : currentMetaData) {
if (!newMetaData.hasIndex(current.index())) {
// TODO: have util for toString()
logger.debug("[{}] deleting index that is no longer part of the metadata (indices: [{}])", current.index(), newMetaData.indices().keys());
if (nodeEnv.hasNodeFile()) {
FileSystemUtils.deleteRecursively(nodeEnv.indexLocations(new Index(current.index())));