mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
This is mostly motivated by the ILM steps changes, that showed up as hot in profiling since instantiating a `Settings` instance turns out to be somewhat expensive. Also cleans up a couple of other spots and some duplication as well.
This commit is contained in:
parent
0989704f28
commit
7630301bd3
33 changed files with 101 additions and 74 deletions
|
@ -36,8 +36,6 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
|
||||
|
||||
/**
|
||||
* A request to create an index.
|
||||
*/
|
||||
|
@ -47,7 +45,7 @@ public class CreateIndexRequest extends TimedRequest implements Validatable, ToX
|
|||
static final ParseField ALIASES = new ParseField("aliases");
|
||||
|
||||
private final String index;
|
||||
private Settings settings = EMPTY_SETTINGS;
|
||||
private Settings settings = Settings.EMPTY;
|
||||
|
||||
private BytesReference mappings;
|
||||
private XContentType mappingsXContentType;
|
||||
|
|
|
@ -178,7 +178,7 @@ public class IndexTemplateMetadata {
|
|||
|
||||
private List<String> indexPatterns;
|
||||
|
||||
private Settings settings = Settings.Builder.EMPTY_SETTINGS;
|
||||
private Settings settings = Settings.EMPTY;
|
||||
|
||||
private MappingMetadata mappings;
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.Set;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
|
||||
|
||||
/**
|
||||
* A request to create an index template.
|
||||
|
@ -66,7 +65,7 @@ public class PutIndexTemplateRequest extends MasterNodeRequest<PutIndexTemplateR
|
|||
|
||||
private boolean create;
|
||||
|
||||
private Settings settings = EMPTY_SETTINGS;
|
||||
private Settings settings = Settings.EMPTY;
|
||||
|
||||
private BytesReference mappings = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue