mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
This change the way we store mappings in `Template` during serialization to disk - instead storing it as map we use byte array that we already have. This avoids deserialization-serialization cycle during storing cluster state on disk. # Conflicts: # server/src/main/java/org/elasticsearch/cluster/coordination/ElasticsearchNodeCommand.java
This commit is contained in:
parent
c993176e5f
commit
8fe8e6f039
8 changed files with 42 additions and 19 deletions
|
@ -13,6 +13,7 @@ import org.elasticsearch.cluster.metadata.ComponentTemplate;
|
|||
import org.elasticsearch.cluster.metadata.Template;
|
||||
import org.elasticsearch.common.compress.CompressedXContent;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.xcontent.ToXContent;
|
||||
import org.elasticsearch.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
|
@ -79,7 +80,7 @@ public class GetComponentTemplatesResponseTests extends ESTestCase {
|
|||
builder.startObject();
|
||||
builder.field("name", e.getKey());
|
||||
builder.field("component_template");
|
||||
e.getValue().toXContent(builder, null);
|
||||
e.getValue().toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||
builder.endObject();
|
||||
}
|
||||
builder.endArray();
|
||||
|
|
|
@ -10,6 +10,7 @@ package org.elasticsearch.client.indices;
|
|||
|
||||
import org.elasticsearch.cluster.metadata.ComposableIndexTemplate;
|
||||
import org.elasticsearch.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.xcontent.ToXContent;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -53,7 +54,7 @@ public class GetComposableIndexTemplatesResponseTests extends ESTestCase {
|
|||
builder.startObject();
|
||||
builder.field("name", e.getKey());
|
||||
builder.field("index_template");
|
||||
e.getValue().toXContent(builder, null);
|
||||
e.getValue().toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||
builder.endObject();
|
||||
}
|
||||
builder.endArray();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue