Small cleanup
This commit is contained in:
parent
036febe110
commit
ac03fba9d3
|
@ -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());
|
||||
|
|
|
@ -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())));
|
||||
|
|
|
@ -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())));
|
||||
|
|
Loading…
Reference in New Issue