Merge pull request #17833 from rjernst/camelcase2
Internal: Remove XContentBuilderString
This commit is contained in:
commit
34da01f794
|
@ -22,7 +22,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.StatusToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
|
@ -110,10 +109,10 @@ public abstract class DocWriteResponse extends ReplicationResponse implements St
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String _VERSION = "_version";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
|
@ -280,24 +279,24 @@ public class ReplicationResponse extends ActionResponse {
|
|||
|
||||
private static class Fields {
|
||||
|
||||
private static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
private static final XContentBuilderString _SHARD = new XContentBuilderString("_shard");
|
||||
private static final XContentBuilderString _NODE = new XContentBuilderString("_node");
|
||||
private static final XContentBuilderString REASON = new XContentBuilderString("reason");
|
||||
private static final XContentBuilderString STATUS = new XContentBuilderString("status");
|
||||
private static final XContentBuilderString PRIMARY = new XContentBuilderString("primary");
|
||||
private static final String _INDEX = "_index";
|
||||
private static final String _SHARD = "_shard";
|
||||
private static final String _NODE = "_node";
|
||||
private static final String REASON = "reason";
|
||||
private static final String STATUS = "status";
|
||||
private static final String PRIMARY = "primary";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static class Fields {
|
||||
|
||||
private static final XContentBuilderString _SHARDS = new XContentBuilderString("_shards");
|
||||
private static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
private static final XContentBuilderString SUCCESSFUL = new XContentBuilderString("successful");
|
||||
private static final XContentBuilderString PENDING = new XContentBuilderString("pending");
|
||||
private static final XContentBuilderString FAILED = new XContentBuilderString("failed");
|
||||
private static final XContentBuilderString FAILURES = new XContentBuilderString("failures");
|
||||
private static final String _SHARDS = "_shards";
|
||||
private static final String TOTAL = "total";
|
||||
private static final String SUCCESSFUL = "successful";
|
||||
private static final String PENDING = "pending";
|
||||
private static final String FAILED = "failed";
|
||||
private static final String FAILURES = "failures";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.StatusToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
|
@ -234,25 +233,25 @@ public class ClusterHealthResponse extends ActionResponse implements StatusToXCo
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString CLUSTER_NAME = new XContentBuilderString("cluster_name");
|
||||
static final XContentBuilderString STATUS = new XContentBuilderString("status");
|
||||
static final XContentBuilderString TIMED_OUT = new XContentBuilderString("timed_out");
|
||||
static final XContentBuilderString NUMBER_OF_NODES = new XContentBuilderString("number_of_nodes");
|
||||
static final XContentBuilderString NUMBER_OF_DATA_NODES = new XContentBuilderString("number_of_data_nodes");
|
||||
static final XContentBuilderString NUMBER_OF_PENDING_TASKS = new XContentBuilderString("number_of_pending_tasks");
|
||||
static final XContentBuilderString NUMBER_OF_IN_FLIGHT_FETCH = new XContentBuilderString("number_of_in_flight_fetch");
|
||||
static final XContentBuilderString DELAYED_UNASSIGNED_SHARDS = new XContentBuilderString("delayed_unassigned_shards");
|
||||
static final XContentBuilderString TASK_MAX_WAIT_TIME_IN_QUEUE = new XContentBuilderString("task_max_waiting_in_queue");
|
||||
static final XContentBuilderString TASK_MAX_WAIT_TIME_IN_QUEUE_IN_MILLIS = new XContentBuilderString("task_max_waiting_in_queue_millis");
|
||||
static final XContentBuilderString ACTIVE_SHARDS_PERCENT_AS_NUMBER = new XContentBuilderString("active_shards_percent_as_number");
|
||||
static final XContentBuilderString ACTIVE_SHARDS_PERCENT = new XContentBuilderString("active_shards_percent");
|
||||
static final XContentBuilderString ACTIVE_PRIMARY_SHARDS = new XContentBuilderString("active_primary_shards");
|
||||
static final XContentBuilderString ACTIVE_SHARDS = new XContentBuilderString("active_shards");
|
||||
static final XContentBuilderString RELOCATING_SHARDS = new XContentBuilderString("relocating_shards");
|
||||
static final XContentBuilderString INITIALIZING_SHARDS = new XContentBuilderString("initializing_shards");
|
||||
static final XContentBuilderString UNASSIGNED_SHARDS = new XContentBuilderString("unassigned_shards");
|
||||
static final XContentBuilderString VALIDATION_FAILURES = new XContentBuilderString("validation_failures");
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final String CLUSTER_NAME = "cluster_name";
|
||||
static final String STATUS = "status";
|
||||
static final String TIMED_OUT = "timed_out";
|
||||
static final String NUMBER_OF_NODES = "number_of_nodes";
|
||||
static final String NUMBER_OF_DATA_NODES = "number_of_data_nodes";
|
||||
static final String NUMBER_OF_PENDING_TASKS = "number_of_pending_tasks";
|
||||
static final String NUMBER_OF_IN_FLIGHT_FETCH = "number_of_in_flight_fetch";
|
||||
static final String DELAYED_UNASSIGNED_SHARDS = "delayed_unassigned_shards";
|
||||
static final String TASK_MAX_WAIT_TIME_IN_QUEUE = "task_max_waiting_in_queue";
|
||||
static final String TASK_MAX_WAIT_TIME_IN_QUEUE_IN_MILLIS = "task_max_waiting_in_queue_millis";
|
||||
static final String ACTIVE_SHARDS_PERCENT_AS_NUMBER = "active_shards_percent_as_number";
|
||||
static final String ACTIVE_SHARDS_PERCENT = "active_shards_percent";
|
||||
static final String ACTIVE_PRIMARY_SHARDS = "active_primary_shards";
|
||||
static final String ACTIVE_SHARDS = "active_shards";
|
||||
static final String RELOCATING_SHARDS = "relocating_shards";
|
||||
static final String INITIALIZING_SHARDS = "initializing_shards";
|
||||
static final String UNASSIGNED_SHARDS = "unassigned_shards";
|
||||
static final String VALIDATION_FAILURES = "validation_failures";
|
||||
static final String INDICES = "indices";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -78,8 +77,8 @@ public class VerifyRepositoryResponse extends ActionResponse implements ToXConte
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NODES = new XContentBuilderString("nodes");
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final String NODES = "nodes";
|
||||
static final String NAME = "name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
import org.elasticsearch.snapshots.SnapshotInfo;
|
||||
|
||||
|
@ -83,8 +82,8 @@ public class CreateSnapshotResponse extends ActionResponse implements ToXContent
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SNAPSHOT = new XContentBuilderString("snapshot");
|
||||
static final XContentBuilderString ACCEPTED = new XContentBuilderString("accepted");
|
||||
static final String SNAPSHOT = "snapshot";
|
||||
static final String ACCEPTED = "accepted";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.snapshots.SnapshotInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -76,7 +75,7 @@ public class GetSnapshotsResponse extends ActionResponse implements ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SNAPSHOTS = new XContentBuilderString("snapshots");
|
||||
static final String SNAPSHOTS = "snapshots";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
import org.elasticsearch.snapshots.RestoreInfo;
|
||||
|
||||
|
@ -75,8 +74,8 @@ public class RestoreSnapshotResponse extends ActionResponse implements ToXConten
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SNAPSHOT = new XContentBuilderString("snapshot");
|
||||
static final XContentBuilderString ACCEPTED = new XContentBuilderString("accepted");
|
||||
static final String SNAPSHOT = "snapshot";
|
||||
static final String ACCEPTED = "accepted";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus;
|
||||
|
||||
|
@ -135,9 +134,9 @@ public class SnapshotIndexShardStatus extends BroadcastShardResponse implements
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString STAGE = new XContentBuilderString("stage");
|
||||
static final XContentBuilderString REASON = new XContentBuilderString("reason");
|
||||
static final XContentBuilderString NODE = new XContentBuilderString("node");
|
||||
static final String STAGE = "stage";
|
||||
static final String REASON = "reason";
|
||||
static final String NODE = "node";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.elasticsearch.action.admin.cluster.snapshots.status;
|
|||
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
@ -91,7 +90,7 @@ public class SnapshotIndexStatus implements Iterable<SnapshotIndexShardStatus>,
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final String SHARDS = "shards";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.elasticsearch.action.admin.cluster.snapshots.status;
|
|||
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
@ -106,13 +105,13 @@ public class SnapshotShardsStats implements ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SHARDS_STATS = new XContentBuilderString("shards_stats");
|
||||
static final XContentBuilderString INITIALIZING = new XContentBuilderString("initializing");
|
||||
static final XContentBuilderString STARTED = new XContentBuilderString("started");
|
||||
static final XContentBuilderString FINALIZING = new XContentBuilderString("finalizing");
|
||||
static final XContentBuilderString DONE = new XContentBuilderString("done");
|
||||
static final XContentBuilderString FAILED = new XContentBuilderString("failed");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final String SHARDS_STATS = "shards_stats";
|
||||
static final String INITIALIZING = "initializing";
|
||||
static final String STARTED = "started";
|
||||
static final String FINALIZING = "finalizing";
|
||||
static final String DONE = "done";
|
||||
static final String FAILED = "failed";
|
||||
static final String TOTAL = "total";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -130,16 +129,16 @@ public class SnapshotStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString STATS = new XContentBuilderString("stats");
|
||||
static final XContentBuilderString NUMBER_OF_FILES = new XContentBuilderString("number_of_files");
|
||||
static final XContentBuilderString PROCESSED_FILES = new XContentBuilderString("processed_files");
|
||||
static final XContentBuilderString TOTAL_SIZE_IN_BYTES = new XContentBuilderString("total_size_in_bytes");
|
||||
static final XContentBuilderString TOTAL_SIZE = new XContentBuilderString("total_size");
|
||||
static final XContentBuilderString PROCESSED_SIZE_IN_BYTES = new XContentBuilderString("processed_size_in_bytes");
|
||||
static final XContentBuilderString PROCESSED_SIZE = new XContentBuilderString("processed_size");
|
||||
static final XContentBuilderString START_TIME_IN_MILLIS = new XContentBuilderString("start_time_in_millis");
|
||||
static final XContentBuilderString TIME_IN_MILLIS = new XContentBuilderString("time_in_millis");
|
||||
static final XContentBuilderString TIME = new XContentBuilderString("time");
|
||||
static final String STATS = "stats";
|
||||
static final String NUMBER_OF_FILES = "number_of_files";
|
||||
static final String PROCESSED_FILES = "processed_files";
|
||||
static final String TOTAL_SIZE_IN_BYTES = "total_size_in_bytes";
|
||||
static final String TOTAL_SIZE = "total_size";
|
||||
static final String PROCESSED_SIZE_IN_BYTES = "processed_size_in_bytes";
|
||||
static final String PROCESSED_SIZE = "processed_size";
|
||||
static final String START_TIME_IN_MILLIS = "start_time_in_millis";
|
||||
static final String TIME_IN_MILLIS = "time_in_millis";
|
||||
static final String TIME = "time";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -180,10 +179,10 @@ public class SnapshotStatus implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SNAPSHOT = new XContentBuilderString("snapshot");
|
||||
static final XContentBuilderString REPOSITORY = new XContentBuilderString("repository");
|
||||
static final XContentBuilderString STATE = new XContentBuilderString("state");
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final String SNAPSHOT = "snapshot";
|
||||
static final String REPOSITORY = "repository";
|
||||
static final String STATE = "state";
|
||||
static final String INDICES = "indices";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -75,7 +74,7 @@ public class SnapshotsStatusResponse extends ActionResponse implements ToXConten
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SNAPSHOTS = new XContentBuilderString("snapshots");
|
||||
static final String SNAPSHOTS = "snapshots";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.cache.query.QueryCacheStats;
|
||||
import org.elasticsearch.index.engine.SegmentsStats;
|
||||
import org.elasticsearch.index.fielddata.FieldDataStats;
|
||||
|
@ -165,7 +164,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final String COUNT = "count";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -362,17 +361,17 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString PRIMARIES = new XContentBuilderString("primaries");
|
||||
static final XContentBuilderString REPLICATION = new XContentBuilderString("replication");
|
||||
static final XContentBuilderString MIN = new XContentBuilderString("min");
|
||||
static final XContentBuilderString MAX = new XContentBuilderString("max");
|
||||
static final XContentBuilderString AVG = new XContentBuilderString("avg");
|
||||
static final XContentBuilderString INDEX = new XContentBuilderString("index");
|
||||
static final String SHARDS = "shards";
|
||||
static final String TOTAL = "total";
|
||||
static final String PRIMARIES = "primaries";
|
||||
static final String REPLICATION = "replication";
|
||||
static final String MIN = "min";
|
||||
static final String MAX = "max";
|
||||
static final String AVG = "avg";
|
||||
static final String INDEX = "index";
|
||||
}
|
||||
|
||||
private void addIntMinMax(XContentBuilderString field, int min, int max, double avg, XContentBuilder builder) throws IOException {
|
||||
private void addIntMinMax(String field, int min, int max, double avg, XContentBuilder builder) throws IOException {
|
||||
builder.startObject(field);
|
||||
builder.field(Fields.MIN, min);
|
||||
builder.field(Fields.MAX, max);
|
||||
|
@ -380,7 +379,7 @@ public class ClusterStatsIndices implements ToXContent, Streamable {
|
|||
builder.endObject();
|
||||
}
|
||||
|
||||
private void addDoubleMinMax(XContentBuilderString field, double min, double max, double avg, XContentBuilder builder) throws IOException {
|
||||
private void addDoubleMinMax(String field, double min, double max, double avg, XContentBuilder builder) throws IOException {
|
||||
builder.startObject(field);
|
||||
builder.field(Fields.MIN, min);
|
||||
builder.field(Fields.MAX, max);
|
||||
|
|
|
@ -35,7 +35,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.monitor.fs.FsInfo;
|
||||
import org.elasticsearch.monitor.jvm.JvmInfo;
|
||||
import org.elasticsearch.plugins.PluginInfo;
|
||||
|
@ -163,13 +162,13 @@ public class ClusterStatsNodes implements ToXContent, Writeable<ClusterStatsNode
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final XContentBuilderString VERSIONS = new XContentBuilderString("versions");
|
||||
static final XContentBuilderString OS = new XContentBuilderString("os");
|
||||
static final XContentBuilderString PROCESS = new XContentBuilderString("process");
|
||||
static final XContentBuilderString JVM = new XContentBuilderString("jvm");
|
||||
static final XContentBuilderString FS = new XContentBuilderString("fs");
|
||||
static final XContentBuilderString PLUGINS = new XContentBuilderString("plugins");
|
||||
static final String COUNT = "count";
|
||||
static final String VERSIONS = "versions";
|
||||
static final String OS = "os";
|
||||
static final String PROCESS = "process";
|
||||
static final String JVM = "jvm";
|
||||
static final String FS = "fs";
|
||||
static final String PLUGINS = "plugins";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -262,7 +261,7 @@ public class ClusterStatsNodes implements ToXContent, Writeable<ClusterStatsNode
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final String TOTAL = "total";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -332,11 +331,11 @@ public class ClusterStatsNodes implements ToXContent, Writeable<ClusterStatsNode
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString AVAILABLE_PROCESSORS = new XContentBuilderString("available_processors");
|
||||
static final XContentBuilderString ALLOCATED_PROCESSORS = new XContentBuilderString("allocated_processors");
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString NAMES = new XContentBuilderString("names");
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final String AVAILABLE_PROCESSORS = "available_processors";
|
||||
static final String ALLOCATED_PROCESSORS = "allocated_processors";
|
||||
static final String NAME = "name";
|
||||
static final String NAMES = "names";
|
||||
static final String COUNT = "count";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -444,12 +443,12 @@ public class ClusterStatsNodes implements ToXContent, Writeable<ClusterStatsNode
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString CPU = new XContentBuilderString("cpu");
|
||||
static final XContentBuilderString PERCENT = new XContentBuilderString("percent");
|
||||
static final XContentBuilderString OPEN_FILE_DESCRIPTORS = new XContentBuilderString("open_file_descriptors");
|
||||
static final XContentBuilderString MIN = new XContentBuilderString("min");
|
||||
static final XContentBuilderString MAX = new XContentBuilderString("max");
|
||||
static final XContentBuilderString AVG = new XContentBuilderString("avg");
|
||||
static final String CPU = "cpu";
|
||||
static final String PERCENT = "percent";
|
||||
static final String OPEN_FILE_DESCRIPTORS = "open_file_descriptors";
|
||||
static final String MIN = "min";
|
||||
static final String MAX = "max";
|
||||
static final String AVG = "avg";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -567,20 +566,20 @@ public class ClusterStatsNodes implements ToXContent, Writeable<ClusterStatsNode
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString VERSIONS = new XContentBuilderString("versions");
|
||||
static final XContentBuilderString VERSION = new XContentBuilderString("version");
|
||||
static final XContentBuilderString VM_NAME = new XContentBuilderString("vm_name");
|
||||
static final XContentBuilderString VM_VERSION = new XContentBuilderString("vm_version");
|
||||
static final XContentBuilderString VM_VENDOR = new XContentBuilderString("vm_vendor");
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final XContentBuilderString THREADS = new XContentBuilderString("threads");
|
||||
static final XContentBuilderString MAX_UPTIME = new XContentBuilderString("max_uptime");
|
||||
static final XContentBuilderString MAX_UPTIME_IN_MILLIS = new XContentBuilderString("max_uptime_in_millis");
|
||||
static final XContentBuilderString MEM = new XContentBuilderString("mem");
|
||||
static final XContentBuilderString HEAP_USED = new XContentBuilderString("heap_used");
|
||||
static final XContentBuilderString HEAP_USED_IN_BYTES = new XContentBuilderString("heap_used_in_bytes");
|
||||
static final XContentBuilderString HEAP_MAX = new XContentBuilderString("heap_max");
|
||||
static final XContentBuilderString HEAP_MAX_IN_BYTES = new XContentBuilderString("heap_max_in_bytes");
|
||||
static final String VERSIONS = "versions";
|
||||
static final String VERSION = "version";
|
||||
static final String VM_NAME = "vm_name";
|
||||
static final String VM_VERSION = "vm_version";
|
||||
static final String VM_VENDOR = "vm_vendor";
|
||||
static final String COUNT = "count";
|
||||
static final String THREADS = "threads";
|
||||
static final String MAX_UPTIME = "max_uptime";
|
||||
static final String MAX_UPTIME_IN_MILLIS = "max_uptime_in_millis";
|
||||
static final String MEM = "mem";
|
||||
static final String HEAP_USED = "heap_used";
|
||||
static final String HEAP_USED_IN_BYTES = "heap_used_in_bytes";
|
||||
static final String HEAP_MAX = "heap_max";
|
||||
static final String HEAP_MAX_IN_BYTES = "heap_max_in_bytes";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -130,11 +129,11 @@ public class ClusterStatsResponse extends BaseNodesResponse<ClusterStatsNodeResp
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NODES = new XContentBuilderString("nodes");
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString UUID = new XContentBuilderString("uuid");
|
||||
static final XContentBuilderString CLUSTER_NAME = new XContentBuilderString("cluster_name");
|
||||
static final XContentBuilderString STATUS = new XContentBuilderString("status");
|
||||
static final String NODES = "nodes";
|
||||
static final String INDICES = "indices";
|
||||
static final String UUID = "uuid";
|
||||
static final String CLUSTER_NAME = "cluster_name";
|
||||
static final String STATUS = "status";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -103,13 +102,13 @@ public class PendingClusterTasksResponse extends ActionResponse implements Itera
|
|||
|
||||
static final class Fields {
|
||||
|
||||
static final XContentBuilderString TASKS = new XContentBuilderString("tasks");
|
||||
static final XContentBuilderString EXECUTING = new XContentBuilderString("executing");
|
||||
static final XContentBuilderString INSERT_ORDER = new XContentBuilderString("insert_order");
|
||||
static final XContentBuilderString PRIORITY = new XContentBuilderString("priority");
|
||||
static final XContentBuilderString SOURCE = new XContentBuilderString("source");
|
||||
static final XContentBuilderString TIME_IN_QUEUE_MILLIS = new XContentBuilderString("time_in_queue_millis");
|
||||
static final XContentBuilderString TIME_IN_QUEUE = new XContentBuilderString("time_in_queue");
|
||||
static final String TASKS = "tasks";
|
||||
static final String EXECUTING = "executing";
|
||||
static final String INSERT_ORDER = "insert_order";
|
||||
static final String PRIORITY = "priority";
|
||||
static final String SOURCE = "source";
|
||||
static final String TIME_IN_QUEUE_MILLIS = "time_in_queue_millis";
|
||||
static final String TIME_IN_QUEUE = "time_in_queue";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -204,12 +203,12 @@ public class AnalyzeResponse extends ActionResponse implements Iterable<AnalyzeR
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString TOKENS = new XContentBuilderString("tokens");
|
||||
static final XContentBuilderString TOKEN = new XContentBuilderString("token");
|
||||
static final XContentBuilderString START_OFFSET = new XContentBuilderString("start_offset");
|
||||
static final XContentBuilderString END_OFFSET = new XContentBuilderString("end_offset");
|
||||
static final XContentBuilderString TYPE = new XContentBuilderString("type");
|
||||
static final XContentBuilderString POSITION = new XContentBuilderString("position");
|
||||
static final XContentBuilderString DETAIL = new XContentBuilderString("detail");
|
||||
static final String TOKENS = "tokens";
|
||||
static final String TOKEN = "token";
|
||||
static final String START_OFFSET = "start_offset";
|
||||
static final String END_OFFSET = "end_offset";
|
||||
static final String TYPE = "type";
|
||||
static final String POSITION = "position";
|
||||
static final String DETAIL = "detail";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -132,13 +131,13 @@ public class DetailAnalyzeResponse implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString FILTERED_TEXT = new XContentBuilderString("filtered_text");
|
||||
static final XContentBuilderString CUSTOM_ANALYZER = new XContentBuilderString("custom_analyzer");
|
||||
static final XContentBuilderString ANALYZER = new XContentBuilderString("analyzer");
|
||||
static final XContentBuilderString CHARFILTERS = new XContentBuilderString("charfilters");
|
||||
static final XContentBuilderString TOKENIZER = new XContentBuilderString("tokenizer");
|
||||
static final XContentBuilderString TOKENFILTERS = new XContentBuilderString("tokenfilters");
|
||||
static final String NAME = "name";
|
||||
static final String FILTERED_TEXT = "filtered_text";
|
||||
static final String CUSTOM_ANALYZER = "custom_analyzer";
|
||||
static final String ANALYZER = "analyzer";
|
||||
static final String CHARFILTERS = "charfilters";
|
||||
static final String TOKENIZER = "tokenizer";
|
||||
static final String TOKENFILTERS = "tokenfilters";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.util.iterable.Iterables;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.indices.flush.ShardsSyncedFlushResult;
|
||||
import org.elasticsearch.indices.flush.SyncedFlushService;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
@ -181,14 +180,14 @@ public class SyncedFlushResponse extends ActionResponse implements ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _SHARDS = new XContentBuilderString("_shards");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString SUCCESSFUL = new XContentBuilderString("successful");
|
||||
static final XContentBuilderString FAILED = new XContentBuilderString("failed");
|
||||
static final XContentBuilderString FAILURES = new XContentBuilderString("failures");
|
||||
static final XContentBuilderString SHARD = new XContentBuilderString("shard");
|
||||
static final XContentBuilderString ROUTING = new XContentBuilderString("routing");
|
||||
static final XContentBuilderString REASON = new XContentBuilderString("reason");
|
||||
static final String _SHARDS = "_shards";
|
||||
static final String TOTAL = "total";
|
||||
static final String SUCCESSFUL = "successful";
|
||||
static final String FAILED = "failed";
|
||||
static final String FAILURES = "failures";
|
||||
static final String SHARD = "shard";
|
||||
static final String ROUTING = "routing";
|
||||
static final String REASON = "reason";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.engine.Segment;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -181,31 +180,31 @@ public class IndicesSegmentResponse extends BroadcastResponse implements ToXCont
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString ROUTING = new XContentBuilderString("routing");
|
||||
static final XContentBuilderString STATE = new XContentBuilderString("state");
|
||||
static final XContentBuilderString PRIMARY = new XContentBuilderString("primary");
|
||||
static final XContentBuilderString NODE = new XContentBuilderString("node");
|
||||
static final XContentBuilderString RELOCATING_NODE = new XContentBuilderString("relocating_node");
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
static final String ROUTING = "routing";
|
||||
static final String STATE = "state";
|
||||
static final String PRIMARY = "primary";
|
||||
static final String NODE = "node";
|
||||
static final String RELOCATING_NODE = "relocating_node";
|
||||
|
||||
static final XContentBuilderString SEGMENTS = new XContentBuilderString("segments");
|
||||
static final XContentBuilderString GENERATION = new XContentBuilderString("generation");
|
||||
static final XContentBuilderString NUM_COMMITTED_SEGMENTS = new XContentBuilderString("num_committed_segments");
|
||||
static final XContentBuilderString NUM_SEARCH_SEGMENTS = new XContentBuilderString("num_search_segments");
|
||||
static final XContentBuilderString NUM_DOCS = new XContentBuilderString("num_docs");
|
||||
static final XContentBuilderString DELETED_DOCS = new XContentBuilderString("deleted_docs");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SIZE_IN_BYTES = new XContentBuilderString("size_in_bytes");
|
||||
static final XContentBuilderString COMMITTED = new XContentBuilderString("committed");
|
||||
static final XContentBuilderString SEARCH = new XContentBuilderString("search");
|
||||
static final XContentBuilderString VERSION = new XContentBuilderString("version");
|
||||
static final XContentBuilderString COMPOUND = new XContentBuilderString("compound");
|
||||
static final XContentBuilderString MERGE_ID = new XContentBuilderString("merge_id");
|
||||
static final XContentBuilderString MEMORY = new XContentBuilderString("memory");
|
||||
static final XContentBuilderString MEMORY_IN_BYTES = new XContentBuilderString("memory_in_bytes");
|
||||
static final XContentBuilderString RAM_TREE = new XContentBuilderString("ram_tree");
|
||||
static final XContentBuilderString DESCRIPTION = new XContentBuilderString("description");
|
||||
static final XContentBuilderString CHILDREN = new XContentBuilderString("children");
|
||||
static final String SEGMENTS = "segments";
|
||||
static final String GENERATION = "generation";
|
||||
static final String NUM_COMMITTED_SEGMENTS = "num_committed_segments";
|
||||
static final String NUM_SEARCH_SEGMENTS = "num_search_segments";
|
||||
static final String NUM_DOCS = "num_docs";
|
||||
static final String DELETED_DOCS = "deleted_docs";
|
||||
static final String SIZE = "size";
|
||||
static final String SIZE_IN_BYTES = "size_in_bytes";
|
||||
static final String COMMITTED = "committed";
|
||||
static final String SEARCH = "search";
|
||||
static final String VERSION = "version";
|
||||
static final String COMPOUND = "compound";
|
||||
static final String MERGE_ID = "merge_id";
|
||||
static final String MEMORY = "memory";
|
||||
static final String MEMORY_IN_BYTES = "memory_in_bytes";
|
||||
static final String RAM_TREE = "ram_tree";
|
||||
static final String DESCRIPTION = "description";
|
||||
static final String CHILDREN = "children";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardStateMetaData;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -401,14 +400,14 @@ public class IndicesShardStoresResponse extends ActionResponse implements ToXCon
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString FAILURES = new XContentBuilderString("failures");
|
||||
static final XContentBuilderString STORES = new XContentBuilderString("stores");
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
static final String FAILURES = "failures";
|
||||
static final String STORES = "stores";
|
||||
// StoreStatus fields
|
||||
static final XContentBuilderString LEGACY_VERSION = new XContentBuilderString("legacy_version");
|
||||
static final XContentBuilderString ALLOCATION_ID = new XContentBuilderString("allocation_id");
|
||||
static final XContentBuilderString STORE_EXCEPTION = new XContentBuilderString("store_exception");
|
||||
static final XContentBuilderString ALLOCATED = new XContentBuilderString("allocation");
|
||||
static final String LEGACY_VERSION = "legacy_version";
|
||||
static final String ALLOCATION_ID = "allocation_id";
|
||||
static final String STORE_EXCEPTION = "store_exception";
|
||||
static final String ALLOCATED = "allocation";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -208,8 +207,8 @@ public class IndicesStatsResponse extends BroadcastResponse implements ToXConten
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.engine.CommitStats;
|
||||
import org.elasticsearch.index.shard.ShardPath;
|
||||
|
||||
|
@ -132,14 +131,14 @@ public class ShardStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString ROUTING = new XContentBuilderString("routing");
|
||||
static final XContentBuilderString STATE = new XContentBuilderString("state");
|
||||
static final XContentBuilderString STATE_PATH = new XContentBuilderString("state_path");
|
||||
static final XContentBuilderString DATA_PATH = new XContentBuilderString("data_path");
|
||||
static final XContentBuilderString IS_CUSTOM_DATA_PATH = new XContentBuilderString("is_custom_data_path");
|
||||
static final XContentBuilderString SHARD_PATH = new XContentBuilderString("shard_path");
|
||||
static final XContentBuilderString PRIMARY = new XContentBuilderString("primary");
|
||||
static final XContentBuilderString NODE = new XContentBuilderString("node");
|
||||
static final XContentBuilderString RELOCATING_NODE = new XContentBuilderString("relocating_node");
|
||||
static final String ROUTING = "routing";
|
||||
static final String STATE = "state";
|
||||
static final String STATE_PATH = "state_path";
|
||||
static final String DATA_PATH = "data_path";
|
||||
static final String IS_CUSTOM_DATA_PATH = "is_custom_data_path";
|
||||
static final String SHARD_PATH = "shard_path";
|
||||
static final String PRIMARY = "primary";
|
||||
static final String NODE = "node";
|
||||
static final String RELOCATING_NODE = "relocating_node";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -165,18 +164,18 @@ public class UpgradeStatusResponse extends BroadcastResponse implements ToXConte
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString ROUTING = new XContentBuilderString("routing");
|
||||
static final XContentBuilderString STATE = new XContentBuilderString("state");
|
||||
static final XContentBuilderString PRIMARY = new XContentBuilderString("primary");
|
||||
static final XContentBuilderString NODE = new XContentBuilderString("node");
|
||||
static final XContentBuilderString RELOCATING_NODE = new XContentBuilderString("relocating_node");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SIZE_IN_BYTES = new XContentBuilderString("size_in_bytes");
|
||||
static final XContentBuilderString SIZE_TO_UPGRADE = new XContentBuilderString("size_to_upgrade");
|
||||
static final XContentBuilderString SIZE_TO_UPGRADE_ANCIENT = new XContentBuilderString("size_to_upgrade_ancient");
|
||||
static final XContentBuilderString SIZE_TO_UPGRADE_IN_BYTES = new XContentBuilderString("size_to_upgrade_in_bytes");
|
||||
static final XContentBuilderString SIZE_TO_UPGRADE_ANCIENT_IN_BYTES = new XContentBuilderString("size_to_upgrade_ancient_in_bytes");
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
static final String ROUTING = "routing";
|
||||
static final String STATE = "state";
|
||||
static final String PRIMARY = "primary";
|
||||
static final String NODE = "node";
|
||||
static final String RELOCATING_NODE = "relocating_node";
|
||||
static final String SIZE = "size";
|
||||
static final String SIZE_IN_BYTES = "size_in_bytes";
|
||||
static final String SIZE_TO_UPGRADE = "size_to_upgrade";
|
||||
static final String SIZE_TO_UPGRADE_ANCIENT = "size_to_upgrade_ancient";
|
||||
static final String SIZE_TO_UPGRADE_IN_BYTES = "size_to_upgrade_in_bytes";
|
||||
static final String SIZE_TO_UPGRADE_ANCIENT_IN_BYTES = "size_to_upgrade_ancient_in_bytes";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import org.elasticsearch.common.io.stream.Writeable;
|
|||
import org.elasticsearch.common.xcontent.StatusToXContent;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -68,11 +67,11 @@ public class BulkItemResponse implements Streamable, StatusToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString STATUS = new XContentBuilderString("status");
|
||||
static final XContentBuilderString ERROR = new XContentBuilderString("error");
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String STATUS = "status";
|
||||
static final String ERROR = "error";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.action.DocWriteResponse;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
|
@ -77,7 +76,7 @@ public class DeleteResponse extends DocWriteResponse {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FOUND = new XContentBuilderString("found");
|
||||
static final String FOUND = "found";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.joda.Joda;
|
|||
import org.elasticsearch.common.network.NetworkAddress;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
|
@ -561,15 +560,15 @@ public abstract class FieldStats<T> implements Streamable, ToXContent {
|
|||
|
||||
private final static class Fields {
|
||||
|
||||
final static XContentBuilderString MAX_DOC = new XContentBuilderString("max_doc");
|
||||
final static XContentBuilderString DOC_COUNT = new XContentBuilderString("doc_count");
|
||||
final static XContentBuilderString DENSITY = new XContentBuilderString("density");
|
||||
final static XContentBuilderString SUM_DOC_FREQ = new XContentBuilderString("sum_doc_freq");
|
||||
final static XContentBuilderString SUM_TOTAL_TERM_FREQ = new XContentBuilderString("sum_total_term_freq");
|
||||
final static XContentBuilderString MIN_VALUE = new XContentBuilderString("min_value");
|
||||
final static XContentBuilderString MIN_VALUE_AS_STRING = new XContentBuilderString("min_value_as_string");
|
||||
final static XContentBuilderString MAX_VALUE = new XContentBuilderString("max_value");
|
||||
final static XContentBuilderString MAX_VALUE_AS_STRING = new XContentBuilderString("max_value_as_string");
|
||||
final static String MAX_DOC = new String("max_doc");
|
||||
final static String DOC_COUNT = new String("doc_count");
|
||||
final static String DENSITY = new String("density");
|
||||
final static String SUM_DOC_FREQ = new String("sum_doc_freq");
|
||||
final static String SUM_TOTAL_TERM_FREQ = new String("sum_total_term_freq");
|
||||
final static String MIN_VALUE = new String("min_value");
|
||||
final static String MIN_VALUE_AS_STRING = new String("min_value_as_string");
|
||||
final static String MAX_VALUE = new String("max_value");
|
||||
final static String MAX_VALUE_AS_STRING = new String("max_value_as_string");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -151,12 +150,12 @@ public class MultiGetResponse extends ActionResponse implements Iterable<MultiGe
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString DOCS = new XContentBuilderString("docs");
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString ERROR = new XContentBuilderString("error");
|
||||
static final XContentBuilderString ROOT_CAUSE = new XContentBuilderString("root_cause");
|
||||
static final String DOCS = "docs";
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String ERROR = "error";
|
||||
static final String ROOT_CAUSE = "root_cause";
|
||||
|
||||
}
|
||||
|
||||
|
@ -177,4 +176,4 @@ public class MultiGetResponse extends ActionResponse implements Iterable<MultiGe
|
|||
response.writeTo(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.action.DocWriteResponse;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
|
@ -89,7 +88,7 @@ public class IndexResponse extends DocWriteResponse {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString CREATED = new XContentBuilderString("created");
|
||||
static final String CREATED = "created";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -98,6 +97,6 @@ public class SimulatePipelineResponse extends ActionResponse implements ToXConte
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString DOCUMENTS = new XContentBuilderString("docs");
|
||||
static final String DOCUMENTS = "docs";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -176,8 +175,8 @@ public class MultiPercolateResponse extends ActionResponse implements Iterable<M
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString RESPONSES = new XContentBuilderString("responses");
|
||||
static final XContentBuilderString ERROR = new XContentBuilderString("error");
|
||||
static final String RESPONSES = "responses";
|
||||
static final String ERROR = "error";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.text.Text;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.action.support.RestActions;
|
||||
import org.elasticsearch.search.aggregations.InternalAggregations;
|
||||
import org.elasticsearch.search.highlight.HighlightField;
|
||||
|
@ -285,13 +284,13 @@ public class PercolateResponse extends BroadcastResponse implements Iterable<Per
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString TOOK = new XContentBuilderString("took");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString MATCHES = new XContentBuilderString("matches");
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString _SCORE = new XContentBuilderString("_score");
|
||||
static final XContentBuilderString HIGHLIGHT = new XContentBuilderString("highlight");
|
||||
static final String TOOK = "took";
|
||||
static final String TOTAL = "total";
|
||||
static final String MATCHES = "matches";
|
||||
static final String _INDEX = "_index";
|
||||
static final String _ID = "_id";
|
||||
static final String _SCORE = "_score";
|
||||
static final String HIGHLIGHT = "highlight";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.StatusToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -89,8 +88,8 @@ public class ClearScrollResponse extends ActionResponse implements StatusToXCont
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SUCCEEDED = new XContentBuilderString("succeeded");
|
||||
static final XContentBuilderString NUMFREED = new XContentBuilderString("num_freed");
|
||||
static final String SUCCEEDED = "succeeded";
|
||||
static final String NUMFREED = "num_freed";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -166,11 +165,11 @@ public class MultiSearchResponse extends ActionResponse implements Iterable<Mult
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString RESPONSES = new XContentBuilderString("responses");
|
||||
static final XContentBuilderString ERROR = new XContentBuilderString("error");
|
||||
static final XContentBuilderString ROOT_CAUSE = new XContentBuilderString("root_cause");
|
||||
static final String RESPONSES = "responses";
|
||||
static final String ERROR = "error";
|
||||
static final String ROOT_CAUSE = "root_cause";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
try {
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.StatusToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
import org.elasticsearch.rest.action.support.RestActions;
|
||||
|
@ -175,10 +174,10 @@ public class SearchResponse extends ActionResponse implements StatusToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _SCROLL_ID = new XContentBuilderString("_scroll_id");
|
||||
static final XContentBuilderString TOOK = new XContentBuilderString("took");
|
||||
static final XContentBuilderString TIMED_OUT = new XContentBuilderString("timed_out");
|
||||
static final XContentBuilderString TERMINATED_EARLY = new XContentBuilderString("terminated_early");
|
||||
static final String _SCROLL_ID = "_scroll_id";
|
||||
static final String TOOK = "took";
|
||||
static final String TIMED_OUT = "timed_out";
|
||||
static final String TERMINATED_EARLY = "terminated_early";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -147,10 +146,10 @@ public class MultiTermVectorsResponse extends ActionResponse implements Iterable
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString DOCS = new XContentBuilderString("docs");
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final String DOCS = "docs";
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -170,4 +169,4 @@ public class MultiTermVectorsResponse extends ActionResponse implements Iterable
|
|||
response.writeTo(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.search.dfs.AggregatedDfs;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -51,30 +50,30 @@ public class TermVectorsResponse extends ActionResponse implements ToXContent {
|
|||
|
||||
private static class FieldStrings {
|
||||
// term statistics strings
|
||||
public static final XContentBuilderString TTF = new XContentBuilderString("ttf");
|
||||
public static final XContentBuilderString DOC_FREQ = new XContentBuilderString("doc_freq");
|
||||
public static final XContentBuilderString TERM_FREQ = new XContentBuilderString("term_freq");
|
||||
public static final XContentBuilderString SCORE = new XContentBuilderString("score");
|
||||
public static final String TTF = "ttf";
|
||||
public static final String DOC_FREQ = "doc_freq";
|
||||
public static final String TERM_FREQ = "term_freq";
|
||||
public static final String SCORE = "score";
|
||||
|
||||
// field statistics strings
|
||||
public static final XContentBuilderString FIELD_STATISTICS = new XContentBuilderString("field_statistics");
|
||||
public static final XContentBuilderString DOC_COUNT = new XContentBuilderString("doc_count");
|
||||
public static final XContentBuilderString SUM_DOC_FREQ = new XContentBuilderString("sum_doc_freq");
|
||||
public static final XContentBuilderString SUM_TTF = new XContentBuilderString("sum_ttf");
|
||||
public static final String FIELD_STATISTICS = "field_statistics";
|
||||
public static final String DOC_COUNT = "doc_count";
|
||||
public static final String SUM_DOC_FREQ = "sum_doc_freq";
|
||||
public static final String SUM_TTF = "sum_ttf";
|
||||
|
||||
public static final XContentBuilderString TOKENS = new XContentBuilderString("tokens");
|
||||
public static final XContentBuilderString POS = new XContentBuilderString("position");
|
||||
public static final XContentBuilderString START_OFFSET = new XContentBuilderString("start_offset");
|
||||
public static final XContentBuilderString END_OFFSET = new XContentBuilderString("end_offset");
|
||||
public static final XContentBuilderString PAYLOAD = new XContentBuilderString("payload");
|
||||
public static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
public static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
public static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
public static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
public static final XContentBuilderString FOUND = new XContentBuilderString("found");
|
||||
public static final XContentBuilderString TOOK = new XContentBuilderString("took");
|
||||
public static final XContentBuilderString TERMS = new XContentBuilderString("terms");
|
||||
public static final XContentBuilderString TERM_VECTORS = new XContentBuilderString("term_vectors");
|
||||
public static final String TOKENS = "tokens";
|
||||
public static final String POS = "position";
|
||||
public static final String START_OFFSET = "start_offset";
|
||||
public static final String END_OFFSET = "end_offset";
|
||||
public static final String PAYLOAD = "payload";
|
||||
public static final String _INDEX = "_index";
|
||||
public static final String _TYPE = "_type";
|
||||
public static final String _ID = "_id";
|
||||
public static final String _VERSION = "_version";
|
||||
public static final String FOUND = "found";
|
||||
public static final String TOOK = "took";
|
||||
public static final String TERMS = "terms";
|
||||
public static final String TERM_VECTORS = "term_vectors";
|
||||
}
|
||||
|
||||
private BytesReference termVectors;
|
||||
|
@ -337,7 +336,7 @@ public class TermVectorsResponse extends ActionResponse implements ToXContent {
|
|||
public long getTookInMillis() {
|
||||
return tookInMillis;
|
||||
}
|
||||
|
||||
|
||||
private void buildScore(XContentBuilder builder, BoostAttribute boostAtt) throws IOException {
|
||||
if (hasScores) {
|
||||
builder.field(FieldStrings.SCORE, boostAtt.getBoost());
|
||||
|
@ -347,7 +346,7 @@ public class TermVectorsResponse extends ActionResponse implements ToXContent {
|
|||
public boolean isExists() {
|
||||
return exists;
|
||||
}
|
||||
|
||||
|
||||
public void setExists(boolean exists) {
|
||||
this.exists = exists;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.action.DocWriteResponse;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.get.GetResult;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
@ -101,7 +100,7 @@ public class UpdateResponse extends DocWriteResponse {
|
|||
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString GET = new XContentBuilderString("get");
|
||||
static final String GET = "get";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -412,19 +411,19 @@ public class SnapshotsInProgress extends AbstractDiffable<Custom> implements Cus
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString REPOSITORY = new XContentBuilderString("repository");
|
||||
static final XContentBuilderString SNAPSHOTS = new XContentBuilderString("snapshots");
|
||||
static final XContentBuilderString SNAPSHOT = new XContentBuilderString("snapshot");
|
||||
static final XContentBuilderString INCLUDE_GLOBAL_STATE = new XContentBuilderString("include_global_state");
|
||||
static final XContentBuilderString PARTIAL = new XContentBuilderString("partial");
|
||||
static final XContentBuilderString STATE = new XContentBuilderString("state");
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final XContentBuilderString START_TIME_MILLIS = new XContentBuilderString("start_time_millis");
|
||||
static final XContentBuilderString START_TIME = new XContentBuilderString("start_time");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString INDEX = new XContentBuilderString("index");
|
||||
static final XContentBuilderString SHARD = new XContentBuilderString("shard");
|
||||
static final XContentBuilderString NODE = new XContentBuilderString("node");
|
||||
static final String REPOSITORY = "repository";
|
||||
static final String SNAPSHOTS = "snapshots";
|
||||
static final String SNAPSHOT = "snapshot";
|
||||
static final String INCLUDE_GLOBAL_STATE = "include_global_state";
|
||||
static final String PARTIAL = "partial";
|
||||
static final String STATE = "state";
|
||||
static final String INDICES = "indices";
|
||||
static final String START_TIME_MILLIS = "start_time_millis";
|
||||
static final String START_TIME = "start_time";
|
||||
static final String SHARDS = "shards";
|
||||
static final String INDEX = "index";
|
||||
static final String SHARD = "shard";
|
||||
static final String NODE = "node";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -202,17 +201,17 @@ public final class ClusterIndexHealth implements Iterable<ClusterShardHealth>, S
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString STATUS = new XContentBuilderString("status");
|
||||
static final XContentBuilderString NUMBER_OF_SHARDS = new XContentBuilderString("number_of_shards");
|
||||
static final XContentBuilderString NUMBER_OF_REPLICAS = new XContentBuilderString("number_of_replicas");
|
||||
static final XContentBuilderString ACTIVE_PRIMARY_SHARDS = new XContentBuilderString("active_primary_shards");
|
||||
static final XContentBuilderString ACTIVE_SHARDS = new XContentBuilderString("active_shards");
|
||||
static final XContentBuilderString RELOCATING_SHARDS = new XContentBuilderString("relocating_shards");
|
||||
static final XContentBuilderString INITIALIZING_SHARDS = new XContentBuilderString("initializing_shards");
|
||||
static final XContentBuilderString UNASSIGNED_SHARDS = new XContentBuilderString("unassigned_shards");
|
||||
static final XContentBuilderString VALIDATION_FAILURES = new XContentBuilderString("validation_failures");
|
||||
static final XContentBuilderString SHARDS = new XContentBuilderString("shards");
|
||||
static final XContentBuilderString PRIMARY_ACTIVE = new XContentBuilderString("primary_active");
|
||||
static final String STATUS = "status";
|
||||
static final String NUMBER_OF_SHARDS = "number_of_shards";
|
||||
static final String NUMBER_OF_REPLICAS = "number_of_replicas";
|
||||
static final String ACTIVE_PRIMARY_SHARDS = "active_primary_shards";
|
||||
static final String ACTIVE_SHARDS = "active_shards";
|
||||
static final String RELOCATING_SHARDS = "relocating_shards";
|
||||
static final String INITIALIZING_SHARDS = "initializing_shards";
|
||||
static final String UNASSIGNED_SHARDS = "unassigned_shards";
|
||||
static final String VALIDATION_FAILURES = "validation_failures";
|
||||
static final String SHARDS = "shards";
|
||||
static final String PRIMARY_ACTIVE = "primary_active";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -38,12 +37,12 @@ import java.util.Objects;
|
|||
*/
|
||||
public final class Fuzziness implements ToXContent, Writeable<Fuzziness> {
|
||||
|
||||
public static final XContentBuilderString X_FIELD_NAME = new XContentBuilderString("fuzziness");
|
||||
public static final String X_FIELD_NAME = "fuzziness";
|
||||
public static final Fuzziness ZERO = new Fuzziness(0);
|
||||
public static final Fuzziness ONE = new Fuzziness(1);
|
||||
public static final Fuzziness TWO = new Fuzziness(2);
|
||||
public static final Fuzziness AUTO = new Fuzziness("AUTO");
|
||||
public static final ParseField FIELD = new ParseField(X_FIELD_NAME.value());
|
||||
public static final ParseField FIELD = new ParseField(X_FIELD_NAME);
|
||||
|
||||
private final String fuzziness;
|
||||
|
||||
|
|
|
@ -19,22 +19,6 @@
|
|||
|
||||
package org.elasticsearch.common.xcontent;
|
||||
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.geo.GeoPoint;
|
||||
import org.elasticsearch.common.io.BytesStream;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamOutput;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.text.Text;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.ReadableInstant;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
import org.joda.time.format.ISODateTimeFormat;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -50,6 +34,21 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.geo.GeoPoint;
|
||||
import org.elasticsearch.common.io.BytesStream;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamOutput;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.text.Text;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.ReadableInstant;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
import org.joda.time.format.ISODateTimeFormat;
|
||||
|
||||
/**
|
||||
* A utility to build XContent (ie json).
|
||||
*/
|
||||
|
@ -146,12 +145,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startObject(XContentBuilderString name) throws IOException {
|
||||
field(name);
|
||||
startObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startObject() throws IOException {
|
||||
generator.writeStartObject();
|
||||
return this;
|
||||
|
@ -171,15 +164,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder array(XContentBuilderString name, String... values) throws IOException {
|
||||
startArray(name);
|
||||
for (String value : values) {
|
||||
value(value);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder array(String name, Object... values) throws IOException {
|
||||
startArray(name);
|
||||
for (Object value : values) {
|
||||
|
@ -189,27 +173,12 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder array(XContentBuilderString name, Object... values) throws IOException {
|
||||
startArray(name);
|
||||
for (Object value : values) {
|
||||
value(value);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startArray(String name) throws IOException {
|
||||
field(name);
|
||||
startArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startArray(XContentBuilderString name) throws IOException {
|
||||
field(name);
|
||||
startArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startArray() throws IOException {
|
||||
generator.writeStartArray();
|
||||
return this;
|
||||
|
@ -220,10 +189,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name) throws IOException {
|
||||
return field(name.value());
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name) throws IOException {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("field name cannot be null");
|
||||
|
@ -242,16 +207,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, char[] value, int offset, int length) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeString(value, offset, length);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, String value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -262,16 +217,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, String value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeString(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Integer value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -282,28 +227,12 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Integer value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeNumber(value.intValue());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, int value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, int value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Long value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -314,28 +243,12 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Long value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeNumber(value.longValue());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, long value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, long value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Float value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -346,28 +259,12 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Float value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeNumber(value.floatValue());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, float value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, float value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Double value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -378,36 +275,16 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Double value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
generator.writeNumber(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, double value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, double value) throws IOException {
|
||||
field(name);
|
||||
generator.writeNumber(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, BigDecimal value) throws IOException {
|
||||
return field(name, value, value.scale(), RoundingMode.HALF_UP, true);
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, BigDecimal value) throws IOException {
|
||||
return field(name, value, value.scale(), RoundingMode.HALF_UP, true);
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, BigDecimal value, int scale, RoundingMode rounding, boolean toDouble) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -426,24 +303,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, BigDecimal value, int scale, RoundingMode rounding, boolean toDouble) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
generator.writeNull();
|
||||
} else {
|
||||
if (toDouble) {
|
||||
try {
|
||||
generator.writeNumber(value.setScale(scale, rounding).doubleValue());
|
||||
} catch (ArithmeticException e) {
|
||||
generator.writeString(value.toEngineeringString());
|
||||
}
|
||||
} else {
|
||||
generator.writeString(value.toEngineeringString());
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesRef
|
||||
* Use {@link org.elasticsearch.common.xcontent.XContentParser#binaryValue()} to read the value back
|
||||
|
@ -454,16 +313,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesRef
|
||||
* Use {@link org.elasticsearch.common.xcontent.XContentParser#binaryValue()} to read the value back
|
||||
*/
|
||||
public XContentBuilder field(XContentBuilderString name, BytesRef value) throws IOException {
|
||||
field(name);
|
||||
generator.writeBinary(value.bytes, value.offset, value.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesReference
|
||||
* Use {@link org.elasticsearch.common.xcontent.XContentParser#binaryValue()} to read the value back
|
||||
|
@ -477,29 +326,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesReference
|
||||
* Use {@link org.elasticsearch.common.xcontent.XContentParser#binaryValue()} to read the value back
|
||||
*/
|
||||
public XContentBuilder field(XContentBuilderString name, BytesReference value) throws IOException {
|
||||
field(name);
|
||||
if (!value.hasArray()) {
|
||||
value = value.toBytesArray();
|
||||
}
|
||||
generator.writeBinary(value.array(), value.arrayOffset(), value.length());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesRef as UTF-8 bytes
|
||||
* Use {@link XContentParser#utf8Bytes()} to read the value back
|
||||
*/
|
||||
public XContentBuilder utf8Field(XContentBuilderString name, BytesRef value) throws IOException {
|
||||
field(name);
|
||||
generator.writeUTF8String(value.bytes, value.offset, value.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the binary content of the given BytesRef as UTF-8 bytes
|
||||
* Use {@link XContentParser#utf8Bytes()} to read the value back
|
||||
|
@ -526,22 +352,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Text value) throws IOException {
|
||||
field(name);
|
||||
if (value.hasBytes() && value.bytes().hasArray()) {
|
||||
generator.writeUTF8String(value.bytes().array(), value.bytes().arrayOffset(), value.bytes().length());
|
||||
return this;
|
||||
}
|
||||
if (value.hasString()) {
|
||||
generator.writeString(value.string());
|
||||
return this;
|
||||
}
|
||||
// TODO: TextBytesOptimization we can use a buffer here to convert it? maybe add a request to jackson to support InputStream as well?
|
||||
BytesArray bytesArray = value.bytes().toBytesArray();
|
||||
generator.writeUTF8String(bytesArray.array(), bytesArray.arrayOffset(), bytesArray.length());
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, byte[] value, int offset, int length) throws IOException {
|
||||
field(name);
|
||||
generator.writeBinary(value, offset, length);
|
||||
|
@ -554,12 +364,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Map<String, Object> value) throws IOException {
|
||||
field(name);
|
||||
value(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Iterable<?> value) throws IOException {
|
||||
if (value instanceof Path) {
|
||||
//treat Paths as single value
|
||||
|
@ -575,21 +379,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Iterable<?> value) throws IOException {
|
||||
if (value instanceof Path) {
|
||||
//treat Paths as single value
|
||||
field(name);
|
||||
value(value);
|
||||
} else {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, boolean... value) throws IOException {
|
||||
startArray(name);
|
||||
for (boolean o : value) {
|
||||
|
@ -599,16 +388,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, boolean... value) throws IOException {
|
||||
startArray(name);
|
||||
for (boolean o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, String... value) throws IOException {
|
||||
startArray(name);
|
||||
for (String o : value) {
|
||||
|
@ -618,16 +397,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, String... value) throws IOException {
|
||||
startArray(name);
|
||||
for (String o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Object... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
|
@ -637,15 +406,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Object... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, int... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
|
@ -655,25 +415,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, int offset, int length, int... value) throws IOException {
|
||||
assert ((offset >= 0) && (value.length > length));
|
||||
startArray(name);
|
||||
for (int i = offset; i < length; i++) {
|
||||
value(value[i]);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, int... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, long... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
|
@ -683,15 +424,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, long... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, float... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
|
@ -701,15 +433,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, float... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, double... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
|
@ -719,27 +442,12 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, double... value) throws IOException {
|
||||
startArray(name);
|
||||
for (Object o : value) {
|
||||
value(o);
|
||||
}
|
||||
endArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Object value) throws IOException {
|
||||
field(name);
|
||||
writeValue(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Object value) throws IOException {
|
||||
field(name);
|
||||
writeValue(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder value(Object value) throws IOException {
|
||||
writeValue(value);
|
||||
return this;
|
||||
|
@ -751,12 +459,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, boolean value) throws IOException {
|
||||
field(name);
|
||||
generator.writeBoolean(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, byte[] value) throws IOException {
|
||||
field(name);
|
||||
if (value == null) {
|
||||
|
@ -767,62 +469,31 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, byte[] value) throws IOException {
|
||||
field(name);
|
||||
return value(value);
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, ReadableInstant date) throws IOException {
|
||||
field(name);
|
||||
return value(date);
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, ReadableInstant date) throws IOException {
|
||||
field(name);
|
||||
return value(date);
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, ReadableInstant date, DateTimeFormatter formatter) throws IOException {
|
||||
field(name);
|
||||
return value(date, formatter);
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, ReadableInstant date, DateTimeFormatter formatter) throws IOException {
|
||||
field(name);
|
||||
return value(date, formatter);
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Date date) throws IOException {
|
||||
field(name);
|
||||
return value(date);
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Date date) throws IOException {
|
||||
field(name);
|
||||
return value(date);
|
||||
}
|
||||
|
||||
public XContentBuilder field(String name, Date date, DateTimeFormatter formatter) throws IOException {
|
||||
field(name);
|
||||
return value(date, formatter);
|
||||
}
|
||||
|
||||
public XContentBuilder field(XContentBuilderString name, Date date, DateTimeFormatter formatter) throws IOException {
|
||||
field(name);
|
||||
return value(date, formatter);
|
||||
}
|
||||
|
||||
public XContentBuilder nullField(String name) throws IOException {
|
||||
generator.writeNullField(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder nullField(XContentBuilderString name) throws IOException {
|
||||
field(name);
|
||||
generator.writeNull();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder nullValue() throws IOException {
|
||||
generator.writeNull();
|
||||
return this;
|
||||
|
@ -843,7 +514,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder timeValueField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, TimeValue timeValue) throws IOException {
|
||||
public XContentBuilder timeValueField(String rawFieldName, String readableFieldName, TimeValue timeValue) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, timeValue.toString());
|
||||
}
|
||||
|
@ -851,7 +522,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder timeValueField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, long rawTime) throws IOException {
|
||||
public XContentBuilder timeValueField(String rawFieldName, String readableFieldName, long rawTime) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, new TimeValue(rawTime).toString());
|
||||
}
|
||||
|
@ -859,18 +530,6 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder dateValueField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, long rawTimestamp) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, defaultDatePrinter.print(rawTimestamp));
|
||||
}
|
||||
field(rawFieldName, rawTimestamp);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder timeValueField(String rawFieldName, String readableFieldName, TimeValue timeValue) throws IOException {
|
||||
return timeValueField(rawFieldName, readableFieldName, timeValue.millis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
public XContentBuilder timeValueField(String rawFieldName, String readableFieldName, long rawTime, TimeUnit timeUnit) throws
|
||||
IOException {
|
||||
if (humanReadable) {
|
||||
|
@ -888,7 +547,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder byteSizeField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, ByteSizeValue byteSizeValue) throws IOException {
|
||||
public XContentBuilder byteSizeField(String rawFieldName, String readableFieldName, ByteSizeValue byteSizeValue) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, byteSizeValue.toString());
|
||||
}
|
||||
|
@ -896,7 +555,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder byteSizeField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, long rawSize) throws IOException {
|
||||
public XContentBuilder byteSizeField(String rawFieldName, String readableFieldName, long rawSize) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, new ByteSizeValue(rawSize).toString());
|
||||
}
|
||||
|
@ -904,7 +563,7 @@ public final class XContentBuilder implements BytesStream, Releasable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder percentageField(XContentBuilderString rawFieldName, XContentBuilderString readableFieldName, double percentage) throws IOException {
|
||||
public XContentBuilder percentageField(String rawFieldName, String readableFieldName, double percentage) throws IOException {
|
||||
if (humanReadable) {
|
||||
field(readableFieldName, String.format(Locale.ROOT, "%1.1f%%", percentage));
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.common.xcontent;
|
||||
|
||||
/**
|
||||
* TODO: remove this, it is just a wrapper that is no longer needed
|
||||
*/
|
||||
public class XContentBuilderString {
|
||||
|
||||
private final String value;
|
||||
|
||||
public XContentBuilderString(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
}
|
|
@ -46,8 +46,6 @@ public interface XContentGenerator extends Closeable {
|
|||
|
||||
void writeFieldName(String name) throws IOException;
|
||||
|
||||
void writeFieldName(XContentString name) throws IOException;
|
||||
|
||||
void writeString(String text) throws IOException;
|
||||
|
||||
void writeString(char[] text, int offset, int len) throws IOException;
|
||||
|
@ -70,47 +68,26 @@ public interface XContentGenerator extends Closeable {
|
|||
|
||||
void writeNull() throws IOException;
|
||||
|
||||
|
||||
void writeStringField(String fieldName, String value) throws IOException;
|
||||
|
||||
void writeStringField(XContentString fieldName, String value) throws IOException;
|
||||
|
||||
void writeBooleanField(String fieldName, boolean value) throws IOException;
|
||||
|
||||
void writeBooleanField(XContentString fieldName, boolean value) throws IOException;
|
||||
|
||||
void writeNullField(String fieldName) throws IOException;
|
||||
|
||||
void writeNullField(XContentString fieldName) throws IOException;
|
||||
|
||||
void writeNumberField(String fieldName, int value) throws IOException;
|
||||
|
||||
void writeNumberField(XContentString fieldName, int value) throws IOException;
|
||||
|
||||
void writeNumberField(String fieldName, long value) throws IOException;
|
||||
|
||||
void writeNumberField(XContentString fieldName, long value) throws IOException;
|
||||
|
||||
void writeNumberField(String fieldName, double value) throws IOException;
|
||||
|
||||
void writeNumberField(XContentString fieldName, double value) throws IOException;
|
||||
|
||||
void writeNumberField(String fieldName, float value) throws IOException;
|
||||
|
||||
void writeNumberField(XContentString fieldName, float value) throws IOException;
|
||||
|
||||
void writeBinaryField(String fieldName, byte[] data) throws IOException;
|
||||
|
||||
void writeBinaryField(XContentString fieldName, byte[] data) throws IOException;
|
||||
|
||||
void writeArrayFieldStart(String fieldName) throws IOException;
|
||||
|
||||
void writeArrayFieldStart(XContentString fieldName) throws IOException;
|
||||
|
||||
void writeObjectFieldStart(String fieldName) throws IOException;
|
||||
|
||||
void writeObjectFieldStart(XContentString fieldName) throws IOException;
|
||||
|
||||
void writeRawField(String fieldName, InputStream content) throws IOException;
|
||||
|
||||
void writeRawField(String fieldName, BytesReference content) throws IOException;
|
||||
|
|
|
@ -218,10 +218,10 @@ public interface XContentParser extends Releasable {
|
|||
* <li>{@link XContentBuilder#field(String, byte[])}}</li>
|
||||
* </ul>
|
||||
*
|
||||
* as well as via their <code>XContentBuilderString</code> variants of the separated value methods.
|
||||
* as well as via their <code>String</code> variants of the separated value methods.
|
||||
* Note: Do not use this method to read values written with:
|
||||
* <ul>
|
||||
* <li>{@link XContentBuilder#utf8Field(XContentBuilderString, org.apache.lucene.util.BytesRef)}</li>
|
||||
* <li>{@link XContentBuilder#utf8Field(String, org.apache.lucene.util.BytesRef)}</li>
|
||||
* <li>{@link XContentBuilder#utf8Field(String, org.apache.lucene.util.BytesRef)}</li>
|
||||
* </ul>
|
||||
*
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.common.xcontent;
|
||||
|
||||
import com.fasterxml.jackson.core.io.SerializedString;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class XContentString extends SerializedString {
|
||||
|
||||
public XContentString(String v) {
|
||||
super(v);
|
||||
}
|
||||
}
|
|
@ -34,7 +34,6 @@ import org.elasticsearch.common.xcontent.XContentFactory;
|
|||
import org.elasticsearch.common.xcontent.XContentGenerator;
|
||||
import org.elasticsearch.common.xcontent.XContentHelper;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.common.xcontent.XContentString;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.common.xcontent.support.filtering.FilterPathBasedFilter;
|
||||
|
||||
|
@ -157,11 +156,6 @@ public class JsonXContentGenerator implements XContentGenerator {
|
|||
generator.writeFieldName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeFieldName(XContentString name) throws IOException {
|
||||
generator.writeFieldName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeString(String text) throws IOException {
|
||||
generator.writeString(text);
|
||||
|
@ -222,111 +216,51 @@ public class JsonXContentGenerator implements XContentGenerator {
|
|||
generator.writeStringField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeStringField(XContentString fieldName, String value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBooleanField(String fieldName, boolean value) throws IOException {
|
||||
generator.writeBooleanField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBooleanField(XContentString fieldName, boolean value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeBoolean(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNullField(String fieldName) throws IOException {
|
||||
generator.writeNullField(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNullField(XContentString fieldName) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(String fieldName, int value) throws IOException {
|
||||
generator.writeNumberField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(XContentString fieldName, int value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeNumber(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(String fieldName, long value) throws IOException {
|
||||
generator.writeNumberField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(XContentString fieldName, long value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeNumber(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(String fieldName, double value) throws IOException {
|
||||
generator.writeNumberField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(XContentString fieldName, double value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeNumber(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(String fieldName, float value) throws IOException {
|
||||
generator.writeNumberField(fieldName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNumberField(XContentString fieldName, float value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeNumber(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBinaryField(String fieldName, byte[] data) throws IOException {
|
||||
generator.writeBinaryField(fieldName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBinaryField(XContentString fieldName, byte[] value) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeBinary(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeArrayFieldStart(String fieldName) throws IOException {
|
||||
generator.writeArrayFieldStart(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeArrayFieldStart(XContentString fieldName) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeStartArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeObjectFieldStart(String fieldName) throws IOException {
|
||||
generator.writeObjectFieldStart(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeObjectFieldStart(XContentString fieldName) throws IOException {
|
||||
generator.writeFieldName(fieldName);
|
||||
generator.writeStartObject();
|
||||
}
|
||||
|
||||
private void writeStartRaw(String fieldName) throws IOException {
|
||||
writeFieldName(fieldName);
|
||||
generator.writeRaw(':');
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.discovery.zen.publish.PendingClusterStateStats;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -69,7 +68,7 @@ public class DiscoveryStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString DISCOVERY = new XContentBuilderString("discovery");
|
||||
static final String DISCOVERY = "discovery";
|
||||
}
|
||||
|
||||
public PendingClusterStateStats getQueueStats() {
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -84,10 +83,10 @@ public class PendingClusterStateStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString QUEUE = new XContentBuilderString("cluster_state_queue");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString PENDING = new XContentBuilderString("pending");
|
||||
static final XContentBuilderString COMMITTED = new XContentBuilderString("committed");
|
||||
static final String QUEUE = "cluster_state_queue";
|
||||
static final String TOTAL = "total";
|
||||
static final String PENDING = "pending";
|
||||
static final String COMMITTED = "committed";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.transport.BoundTransportAddress;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -47,11 +46,11 @@ public class HttpInfo implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString HTTP = new XContentBuilderString("http");
|
||||
static final XContentBuilderString BOUND_ADDRESS = new XContentBuilderString("bound_address");
|
||||
static final XContentBuilderString PUBLISH_ADDRESS = new XContentBuilderString("publish_address");
|
||||
static final XContentBuilderString MAX_CONTENT_LENGTH = new XContentBuilderString("max_content_length");
|
||||
static final XContentBuilderString MAX_CONTENT_LENGTH_IN_BYTES = new XContentBuilderString("max_content_length_in_bytes");
|
||||
static final String HTTP = "http";
|
||||
static final String BOUND_ADDRESS = "bound_address";
|
||||
static final String PUBLISH_ADDRESS = "publish_address";
|
||||
static final String MAX_CONTENT_LENGTH = "max_content_length";
|
||||
static final String MAX_CONTENT_LENGTH_IN_BYTES = "max_content_length_in_bytes";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -69,9 +68,9 @@ public class HttpStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString HTTP = new XContentBuilderString("http");
|
||||
static final XContentBuilderString CURRENT_OPEN = new XContentBuilderString("current_open");
|
||||
static final XContentBuilderString TOTAL_OPENED = new XContentBuilderString("total_opened");
|
||||
static final String HTTP = "http";
|
||||
static final String CURRENT_OPEN = "current_open";
|
||||
static final String TOTAL_OPENED = "total_opened";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,4 +81,4 @@ public class HttpStats implements Streamable, ToXContent {
|
|||
builder.endObject();
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -149,15 +148,15 @@ public class QueryCacheStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString QUERY_CACHE = new XContentBuilderString("query_cache");
|
||||
static final XContentBuilderString MEMORY_SIZE = new XContentBuilderString("memory_size");
|
||||
static final XContentBuilderString MEMORY_SIZE_IN_BYTES = new XContentBuilderString("memory_size_in_bytes");
|
||||
static final XContentBuilderString TOTAL_COUNT = new XContentBuilderString("total_count");
|
||||
static final XContentBuilderString HIT_COUNT = new XContentBuilderString("hit_count");
|
||||
static final XContentBuilderString MISS_COUNT = new XContentBuilderString("miss_count");
|
||||
static final XContentBuilderString CACHE_SIZE = new XContentBuilderString("cache_size");
|
||||
static final XContentBuilderString CACHE_COUNT = new XContentBuilderString("cache_count");
|
||||
static final XContentBuilderString EVICTIONS = new XContentBuilderString("evictions");
|
||||
static final String QUERY_CACHE = "query_cache";
|
||||
static final String MEMORY_SIZE = "memory_size";
|
||||
static final String MEMORY_SIZE_IN_BYTES = "memory_size_in_bytes";
|
||||
static final String TOTAL_COUNT = "total_count";
|
||||
static final String HIT_COUNT = "hit_count";
|
||||
static final String MISS_COUNT = "miss_count";
|
||||
static final String CACHE_SIZE = "cache_size";
|
||||
static final String CACHE_COUNT = "cache_count";
|
||||
static final String EVICTIONS = "evictions";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -103,11 +102,11 @@ public class RequestCacheStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString REQUEST_CACHE_STATS = new XContentBuilderString("request_cache");
|
||||
static final XContentBuilderString MEMORY_SIZE = new XContentBuilderString("memory_size");
|
||||
static final XContentBuilderString MEMORY_SIZE_IN_BYTES = new XContentBuilderString("memory_size_in_bytes");
|
||||
static final XContentBuilderString EVICTIONS = new XContentBuilderString("evictions");
|
||||
static final XContentBuilderString HIT_COUNT = new XContentBuilderString("hit_count");
|
||||
static final XContentBuilderString MISS_COUNT = new XContentBuilderString("miss_count");
|
||||
static final String REQUEST_CACHE_STATS = "request_cache";
|
||||
static final String MEMORY_SIZE = "memory_size";
|
||||
static final String MEMORY_SIZE_IN_BYTES = "memory_size_in_bytes";
|
||||
static final String EVICTIONS = "evictions";
|
||||
static final String HIT_COUNT = "hit_count";
|
||||
static final String MISS_COUNT = "miss_count";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.lucene.Lucene;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
@ -111,11 +110,11 @@ public final class CommitStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString GENERATION = new XContentBuilderString("generation");
|
||||
static final XContentBuilderString USER_DATA = new XContentBuilderString("user_data");
|
||||
static final XContentBuilderString ID = new XContentBuilderString("id");
|
||||
static final XContentBuilderString COMMIT = new XContentBuilderString("commit");
|
||||
static final XContentBuilderString NUM_DOCS = new XContentBuilderString("num_docs");
|
||||
static final String GENERATION = "generation";
|
||||
static final String USER_DATA = "user_data";
|
||||
static final String ID = "id";
|
||||
static final String COMMIT = "commit";
|
||||
static final String NUM_DOCS = "num_docs";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
|
@ -325,34 +324,34 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SEGMENTS = new XContentBuilderString("segments");
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final XContentBuilderString MEMORY = new XContentBuilderString("memory");
|
||||
static final XContentBuilderString MEMORY_IN_BYTES = new XContentBuilderString("memory_in_bytes");
|
||||
static final XContentBuilderString TERMS_MEMORY = new XContentBuilderString("terms_memory");
|
||||
static final XContentBuilderString TERMS_MEMORY_IN_BYTES = new XContentBuilderString("terms_memory_in_bytes");
|
||||
static final XContentBuilderString STORED_FIELDS_MEMORY = new XContentBuilderString("stored_fields_memory");
|
||||
static final XContentBuilderString STORED_FIELDS_MEMORY_IN_BYTES = new XContentBuilderString("stored_fields_memory_in_bytes");
|
||||
static final XContentBuilderString TERM_VECTORS_MEMORY = new XContentBuilderString("term_vectors_memory");
|
||||
static final XContentBuilderString TERM_VECTORS_MEMORY_IN_BYTES = new XContentBuilderString("term_vectors_memory_in_bytes");
|
||||
static final XContentBuilderString NORMS_MEMORY = new XContentBuilderString("norms_memory");
|
||||
static final XContentBuilderString NORMS_MEMORY_IN_BYTES = new XContentBuilderString("norms_memory_in_bytes");
|
||||
static final XContentBuilderString POINTS_MEMORY = new XContentBuilderString("points_memory");
|
||||
static final XContentBuilderString POINTS_MEMORY_IN_BYTES = new XContentBuilderString("points_memory_in_bytes");
|
||||
static final XContentBuilderString DOC_VALUES_MEMORY = new XContentBuilderString("doc_values_memory");
|
||||
static final XContentBuilderString DOC_VALUES_MEMORY_IN_BYTES = new XContentBuilderString("doc_values_memory_in_bytes");
|
||||
static final XContentBuilderString INDEX_WRITER_MEMORY = new XContentBuilderString("index_writer_memory");
|
||||
static final XContentBuilderString INDEX_WRITER_MEMORY_IN_BYTES = new XContentBuilderString("index_writer_memory_in_bytes");
|
||||
static final XContentBuilderString INDEX_WRITER_MAX_MEMORY = new XContentBuilderString("index_writer_max_memory");
|
||||
static final XContentBuilderString INDEX_WRITER_MAX_MEMORY_IN_BYTES = new XContentBuilderString("index_writer_max_memory_in_bytes");
|
||||
static final XContentBuilderString VERSION_MAP_MEMORY = new XContentBuilderString("version_map_memory");
|
||||
static final XContentBuilderString VERSION_MAP_MEMORY_IN_BYTES = new XContentBuilderString("version_map_memory_in_bytes");
|
||||
static final XContentBuilderString FIXED_BIT_SET = new XContentBuilderString("fixed_bit_set");
|
||||
static final XContentBuilderString FIXED_BIT_SET_MEMORY_IN_BYTES = new XContentBuilderString("fixed_bit_set_memory_in_bytes");
|
||||
static final XContentBuilderString FILE_SIZES = new XContentBuilderString("file_sizes");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SIZE_IN_BYTES = new XContentBuilderString("size_in_bytes");
|
||||
static final XContentBuilderString DESCRIPTION = new XContentBuilderString("description");
|
||||
static final String SEGMENTS = "segments";
|
||||
static final String COUNT = "count";
|
||||
static final String MEMORY = "memory";
|
||||
static final String MEMORY_IN_BYTES = "memory_in_bytes";
|
||||
static final String TERMS_MEMORY = "terms_memory";
|
||||
static final String TERMS_MEMORY_IN_BYTES = "terms_memory_in_bytes";
|
||||
static final String STORED_FIELDS_MEMORY = "stored_fields_memory";
|
||||
static final String STORED_FIELDS_MEMORY_IN_BYTES = "stored_fields_memory_in_bytes";
|
||||
static final String TERM_VECTORS_MEMORY = "term_vectors_memory";
|
||||
static final String TERM_VECTORS_MEMORY_IN_BYTES = "term_vectors_memory_in_bytes";
|
||||
static final String NORMS_MEMORY = "norms_memory";
|
||||
static final String NORMS_MEMORY_IN_BYTES = "norms_memory_in_bytes";
|
||||
static final String POINTS_MEMORY = "points_memory";
|
||||
static final String POINTS_MEMORY_IN_BYTES = "points_memory_in_bytes";
|
||||
static final String DOC_VALUES_MEMORY = "doc_values_memory";
|
||||
static final String DOC_VALUES_MEMORY_IN_BYTES = "doc_values_memory_in_bytes";
|
||||
static final String INDEX_WRITER_MEMORY = "index_writer_memory";
|
||||
static final String INDEX_WRITER_MEMORY_IN_BYTES = "index_writer_memory_in_bytes";
|
||||
static final String INDEX_WRITER_MAX_MEMORY = "index_writer_max_memory";
|
||||
static final String INDEX_WRITER_MAX_MEMORY_IN_BYTES = "index_writer_max_memory_in_bytes";
|
||||
static final String VERSION_MAP_MEMORY = "version_map_memory";
|
||||
static final String VERSION_MAP_MEMORY_IN_BYTES = "version_map_memory_in_bytes";
|
||||
static final String FIXED_BIT_SET = "fixed_bit_set";
|
||||
static final String FIXED_BIT_SET_MEMORY_IN_BYTES = "fixed_bit_set_memory_in_bytes";
|
||||
static final String FILE_SIZES = "file_sizes";
|
||||
static final String SIZE = "size";
|
||||
static final String SIZE_IN_BYTES = "size_in_bytes";
|
||||
static final String DESCRIPTION = "description";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -150,10 +149,10 @@ public class FieldDataStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FIELDDATA = new XContentBuilderString("fielddata");
|
||||
static final XContentBuilderString MEMORY_SIZE = new XContentBuilderString("memory_size");
|
||||
static final XContentBuilderString MEMORY_SIZE_IN_BYTES = new XContentBuilderString("memory_size_in_bytes");
|
||||
static final XContentBuilderString EVICTIONS = new XContentBuilderString("evictions");
|
||||
static final XContentBuilderString FIELDS = new XContentBuilderString("fields");
|
||||
static final String FIELDDATA = "fielddata";
|
||||
static final String MEMORY_SIZE = "memory_size";
|
||||
static final String MEMORY_SIZE_IN_BYTES = "memory_size_in_bytes";
|
||||
static final String EVICTIONS = "evictions";
|
||||
static final String FIELDS = "fields";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -98,10 +97,10 @@ public class FlushStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FLUSH = new XContentBuilderString("flush");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_TIME = new XContentBuilderString("total_time");
|
||||
static final XContentBuilderString TOTAL_TIME_IN_MILLIS = new XContentBuilderString("total_time_in_millis");
|
||||
static final String FLUSH = "flush";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_TIME = "total_time";
|
||||
static final String TOTAL_TIME_IN_MILLIS = "total_time_in_millis";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -115,4 +114,4 @@ public class FlushStats implements Streamable, ToXContent {
|
|||
out.writeVLong(total);
|
||||
out.writeVLong(totalTimeInMillis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentHelper;
|
||||
import org.elasticsearch.search.lookup.SourceLookup;
|
||||
|
||||
|
@ -199,12 +198,12 @@ public class GetResult implements Streamable, Iterable<GetField>, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
static final XContentBuilderString FOUND = new XContentBuilderString("found");
|
||||
static final XContentBuilderString FIELDS = new XContentBuilderString("fields");
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String _VERSION = "_version";
|
||||
static final String FOUND = "found";
|
||||
static final String FIELDS = "fields";
|
||||
}
|
||||
|
||||
public XContentBuilder toXContentEmbedded(XContentBuilder builder, Params params) throws IOException {
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -124,17 +123,17 @@ public class GetStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString GET = new XContentBuilderString("get");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TIME = new XContentBuilderString("getTime");
|
||||
static final XContentBuilderString TIME_IN_MILLIS = new XContentBuilderString("time_in_millis");
|
||||
static final XContentBuilderString EXISTS_TOTAL = new XContentBuilderString("exists_total");
|
||||
static final XContentBuilderString EXISTS_TIME = new XContentBuilderString("exists_time");
|
||||
static final XContentBuilderString EXISTS_TIME_IN_MILLIS = new XContentBuilderString("exists_time_in_millis");
|
||||
static final XContentBuilderString MISSING_TOTAL = new XContentBuilderString("missing_total");
|
||||
static final XContentBuilderString MISSING_TIME = new XContentBuilderString("missing_time");
|
||||
static final XContentBuilderString MISSING_TIME_IN_MILLIS = new XContentBuilderString("missing_time_in_millis");
|
||||
static final XContentBuilderString CURRENT = new XContentBuilderString("current");
|
||||
static final String GET = "get";
|
||||
static final String TOTAL = "total";
|
||||
static final String TIME = "getTime";
|
||||
static final String TIME_IN_MILLIS = "time_in_millis";
|
||||
static final String EXISTS_TOTAL = "exists_total";
|
||||
static final String EXISTS_TIME = "exists_time";
|
||||
static final String EXISTS_TIME_IN_MILLIS = "exists_time_in_millis";
|
||||
static final String MISSING_TOTAL = "missing_total";
|
||||
static final String MISSING_TIME = "missing_time";
|
||||
static final String MISSING_TIME_IN_MILLIS = "missing_time_in_millis";
|
||||
static final String CURRENT = "current";
|
||||
}
|
||||
|
||||
public static GetStats readGetStats(StreamInput in) throws IOException {
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -210,23 +209,23 @@ public class MergeStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString MERGES = new XContentBuilderString("merges");
|
||||
static final XContentBuilderString CURRENT = new XContentBuilderString("current");
|
||||
static final XContentBuilderString CURRENT_DOCS = new XContentBuilderString("current_docs");
|
||||
static final XContentBuilderString CURRENT_SIZE = new XContentBuilderString("current_size");
|
||||
static final XContentBuilderString CURRENT_SIZE_IN_BYTES = new XContentBuilderString("current_size_in_bytes");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_TIME = new XContentBuilderString("total_time");
|
||||
static final XContentBuilderString TOTAL_TIME_IN_MILLIS = new XContentBuilderString("total_time_in_millis");
|
||||
static final XContentBuilderString TOTAL_STOPPED_TIME = new XContentBuilderString("total_stopped_time");
|
||||
static final XContentBuilderString TOTAL_STOPPED_TIME_IN_MILLIS = new XContentBuilderString("total_stopped_time_in_millis");
|
||||
static final XContentBuilderString TOTAL_THROTTLED_TIME = new XContentBuilderString("total_throttled_time");
|
||||
static final XContentBuilderString TOTAL_THROTTLED_TIME_IN_MILLIS = new XContentBuilderString("total_throttled_time_in_millis");
|
||||
static final XContentBuilderString TOTAL_DOCS = new XContentBuilderString("total_docs");
|
||||
static final XContentBuilderString TOTAL_SIZE = new XContentBuilderString("total_size");
|
||||
static final XContentBuilderString TOTAL_SIZE_IN_BYTES = new XContentBuilderString("total_size_in_bytes");
|
||||
static final XContentBuilderString TOTAL_THROTTLE_BYTES_PER_SEC_IN_BYTES = new XContentBuilderString("total_auto_throttle_in_bytes");
|
||||
static final XContentBuilderString TOTAL_THROTTLE_BYTES_PER_SEC = new XContentBuilderString("total_auto_throttle");
|
||||
static final String MERGES = "merges";
|
||||
static final String CURRENT = "current";
|
||||
static final String CURRENT_DOCS = "current_docs";
|
||||
static final String CURRENT_SIZE = "current_size";
|
||||
static final String CURRENT_SIZE_IN_BYTES = "current_size_in_bytes";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_TIME = "total_time";
|
||||
static final String TOTAL_TIME_IN_MILLIS = "total_time_in_millis";
|
||||
static final String TOTAL_STOPPED_TIME = "total_stopped_time";
|
||||
static final String TOTAL_STOPPED_TIME_IN_MILLIS = "total_stopped_time_in_millis";
|
||||
static final String TOTAL_THROTTLED_TIME = "total_throttled_time";
|
||||
static final String TOTAL_THROTTLED_TIME_IN_MILLIS = "total_throttled_time_in_millis";
|
||||
static final String TOTAL_DOCS = "total_docs";
|
||||
static final String TOTAL_SIZE = "total_size";
|
||||
static final String TOTAL_SIZE_IN_BYTES = "total_size_in_bytes";
|
||||
static final String TOTAL_THROTTLE_BYTES_PER_SEC_IN_BYTES = "total_auto_throttle_in_bytes";
|
||||
static final String TOTAL_THROTTLE_BYTES_PER_SEC = "total_auto_throttle";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -68,8 +67,8 @@ public class PercolatorQueryCacheStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString PERCOLATOR = new XContentBuilderString("percolator");
|
||||
static final XContentBuilderString QUERIES = new XContentBuilderString("num_queries");
|
||||
static final String PERCOLATOR = "percolator";
|
||||
static final String QUERIES = "num_queries";
|
||||
}
|
||||
|
||||
public static PercolatorQueryCacheStats readPercolateStats(StreamInput in) throws IOException {
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
@ -115,11 +114,11 @@ public class RecoveryStats implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString RECOVERY = new XContentBuilderString("recovery");
|
||||
static final XContentBuilderString CURRENT_AS_SOURCE = new XContentBuilderString("current_as_source");
|
||||
static final XContentBuilderString CURRENT_AS_TARGET = new XContentBuilderString("current_as_target");
|
||||
static final XContentBuilderString THROTTLE_TIME = new XContentBuilderString("throttle_time");
|
||||
static final XContentBuilderString THROTTLE_TIME_IN_MILLIS = new XContentBuilderString("throttle_time_in_millis");
|
||||
static final String RECOVERY = "recovery";
|
||||
static final String CURRENT_AS_SOURCE = "current_as_source";
|
||||
static final String CURRENT_AS_TARGET = "current_as_target";
|
||||
static final String THROTTLE_TIME = "throttle_time";
|
||||
static final String THROTTLE_TIME_IN_MILLIS = "throttle_time_in_millis";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -98,10 +97,10 @@ public class RefreshStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString REFRESH = new XContentBuilderString("refresh");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_TIME = new XContentBuilderString("total_time");
|
||||
static final XContentBuilderString TOTAL_TIME_IN_MILLIS = new XContentBuilderString("total_time_in_millis");
|
||||
static final String REFRESH = "refresh";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_TIME = "total_time";
|
||||
static final String TOTAL_TIME_IN_MILLIS = "total_time_in_millis";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -115,4 +114,4 @@ public class RefreshStats implements Streamable, ToXContent {
|
|||
out.writeVLong(total);
|
||||
out.writeVLong(totalTimeInMillis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -320,25 +319,25 @@ public class SearchStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SEARCH = new XContentBuilderString("search");
|
||||
static final XContentBuilderString OPEN_CONTEXTS = new XContentBuilderString("open_contexts");
|
||||
static final XContentBuilderString GROUPS = new XContentBuilderString("groups");
|
||||
static final XContentBuilderString QUERY_TOTAL = new XContentBuilderString("query_total");
|
||||
static final XContentBuilderString QUERY_TIME = new XContentBuilderString("query_time");
|
||||
static final XContentBuilderString QUERY_TIME_IN_MILLIS = new XContentBuilderString("query_time_in_millis");
|
||||
static final XContentBuilderString QUERY_CURRENT = new XContentBuilderString("query_current");
|
||||
static final XContentBuilderString FETCH_TOTAL = new XContentBuilderString("fetch_total");
|
||||
static final XContentBuilderString FETCH_TIME = new XContentBuilderString("fetch_time");
|
||||
static final XContentBuilderString FETCH_TIME_IN_MILLIS = new XContentBuilderString("fetch_time_in_millis");
|
||||
static final XContentBuilderString FETCH_CURRENT = new XContentBuilderString("fetch_current");
|
||||
static final XContentBuilderString SCROLL_TOTAL = new XContentBuilderString("scroll_total");
|
||||
static final XContentBuilderString SCROLL_TIME = new XContentBuilderString("scroll_time");
|
||||
static final XContentBuilderString SCROLL_TIME_IN_MILLIS = new XContentBuilderString("scroll_time_in_millis");
|
||||
static final XContentBuilderString SCROLL_CURRENT = new XContentBuilderString("scroll_current");
|
||||
static final XContentBuilderString SUGGEST_TOTAL = new XContentBuilderString("suggest_total");
|
||||
static final XContentBuilderString SUGGEST_TIME = new XContentBuilderString("suggest_time");
|
||||
static final XContentBuilderString SUGGEST_TIME_IN_MILLIS = new XContentBuilderString("suggest_time_in_millis");
|
||||
static final XContentBuilderString SUGGEST_CURRENT = new XContentBuilderString("suggest_current");
|
||||
static final String SEARCH = "search";
|
||||
static final String OPEN_CONTEXTS = "open_contexts";
|
||||
static final String GROUPS = "groups";
|
||||
static final String QUERY_TOTAL = "query_total";
|
||||
static final String QUERY_TIME = "query_time";
|
||||
static final String QUERY_TIME_IN_MILLIS = "query_time_in_millis";
|
||||
static final String QUERY_CURRENT = "query_current";
|
||||
static final String FETCH_TOTAL = "fetch_total";
|
||||
static final String FETCH_TIME = "fetch_time";
|
||||
static final String FETCH_TIME_IN_MILLIS = "fetch_time_in_millis";
|
||||
static final String FETCH_CURRENT = "fetch_current";
|
||||
static final String SCROLL_TOTAL = "scroll_total";
|
||||
static final String SCROLL_TIME = "scroll_time";
|
||||
static final String SCROLL_TIME_IN_MILLIS = "scroll_time_in_millis";
|
||||
static final String SCROLL_CURRENT = "scroll_current";
|
||||
static final String SUGGEST_TOTAL = "suggest_total";
|
||||
static final String SUGGEST_TIME = "suggest_time";
|
||||
static final String SUGGEST_TIME_IN_MILLIS = "suggest_time_in_millis";
|
||||
static final String SUGGEST_CURRENT = "suggest_current";
|
||||
}
|
||||
|
||||
public static SearchStats readSearchStats(StreamInput in) throws IOException {
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -88,8 +87,8 @@ public class DocsStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString DOCS = new XContentBuilderString("docs");
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final XContentBuilderString DELETED = new XContentBuilderString("deleted");
|
||||
static final String DOCS = "docs";
|
||||
static final String COUNT = "count";
|
||||
static final String DELETED = "deleted";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
@ -269,21 +268,21 @@ public class IndexingStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDEXING = new XContentBuilderString("indexing");
|
||||
static final XContentBuilderString TYPES = new XContentBuilderString("types");
|
||||
static final XContentBuilderString INDEX_TOTAL = new XContentBuilderString("index_total");
|
||||
static final XContentBuilderString INDEX_TIME = new XContentBuilderString("index_time");
|
||||
static final XContentBuilderString INDEX_TIME_IN_MILLIS = new XContentBuilderString("index_time_in_millis");
|
||||
static final XContentBuilderString INDEX_CURRENT = new XContentBuilderString("index_current");
|
||||
static final XContentBuilderString INDEX_FAILED = new XContentBuilderString("index_failed");
|
||||
static final XContentBuilderString DELETE_TOTAL = new XContentBuilderString("delete_total");
|
||||
static final XContentBuilderString DELETE_TIME = new XContentBuilderString("delete_time");
|
||||
static final XContentBuilderString DELETE_TIME_IN_MILLIS = new XContentBuilderString("delete_time_in_millis");
|
||||
static final XContentBuilderString DELETE_CURRENT = new XContentBuilderString("delete_current");
|
||||
static final XContentBuilderString NOOP_UPDATE_TOTAL = new XContentBuilderString("noop_update_total");
|
||||
static final XContentBuilderString IS_THROTTLED = new XContentBuilderString("is_throttled");
|
||||
static final XContentBuilderString THROTTLED_TIME_IN_MILLIS = new XContentBuilderString("throttle_time_in_millis");
|
||||
static final XContentBuilderString THROTTLED_TIME = new XContentBuilderString("throttle_time");
|
||||
static final String INDEXING = "indexing";
|
||||
static final String TYPES = "types";
|
||||
static final String INDEX_TOTAL = "index_total";
|
||||
static final String INDEX_TIME = "index_time";
|
||||
static final String INDEX_TIME_IN_MILLIS = "index_time_in_millis";
|
||||
static final String INDEX_CURRENT = "index_current";
|
||||
static final String INDEX_FAILED = "index_failed";
|
||||
static final String DELETE_TOTAL = "delete_total";
|
||||
static final String DELETE_TIME = "delete_time";
|
||||
static final String DELETE_TIME_IN_MILLIS = "delete_time_in_millis";
|
||||
static final String DELETE_CURRENT = "delete_current";
|
||||
static final String NOOP_UPDATE_TOTAL = "noop_update_total";
|
||||
static final String IS_THROTTLED = "is_throttled";
|
||||
static final String THROTTLED_TIME_IN_MILLIS = "throttle_time_in_millis";
|
||||
static final String THROTTLED_TIME = "throttle_time";
|
||||
}
|
||||
|
||||
public static IndexingStats readIndexingStats(StreamInput in) throws IOException {
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.xcontent.FromXContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.index.store.StoreFileMetaData;
|
||||
|
||||
|
@ -220,13 +219,13 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString PHYSICAL_NAME = new XContentBuilderString("physical_name");
|
||||
static final XContentBuilderString LENGTH = new XContentBuilderString("length");
|
||||
static final XContentBuilderString CHECKSUM = new XContentBuilderString("checksum");
|
||||
static final XContentBuilderString PART_SIZE = new XContentBuilderString("part_size");
|
||||
static final XContentBuilderString WRITTEN_BY = new XContentBuilderString("written_by");
|
||||
static final XContentBuilderString META_HASH = new XContentBuilderString("meta_hash");
|
||||
static final String NAME = "name";
|
||||
static final String PHYSICAL_NAME = "physical_name";
|
||||
static final String LENGTH = "length";
|
||||
static final String CHECKSUM = "checksum";
|
||||
static final String PART_SIZE = "part_size";
|
||||
static final String WRITTEN_BY = "written_by";
|
||||
static final String META_HASH = "meta_hash";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -426,13 +425,13 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString INDEX_VERSION = new XContentBuilderString("index_version");
|
||||
static final XContentBuilderString START_TIME = new XContentBuilderString("start_time");
|
||||
static final XContentBuilderString TIME = new XContentBuilderString("time");
|
||||
static final XContentBuilderString NUMBER_OF_FILES = new XContentBuilderString("number_of_files");
|
||||
static final XContentBuilderString TOTAL_SIZE = new XContentBuilderString("total_size");
|
||||
static final XContentBuilderString FILES = new XContentBuilderString("files");
|
||||
static final String NAME = "name";
|
||||
static final String INDEX_VERSION = "index_version";
|
||||
static final String START_TIME = "start_time";
|
||||
static final String TIME = "time";
|
||||
static final String NUMBER_OF_FILES = "number_of_files";
|
||||
static final String TOTAL_SIZE = "total_size";
|
||||
static final String FILES = "files";
|
||||
}
|
||||
|
||||
static final class ParseFields {
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.ParseFieldMatcher;
|
|||
import org.elasticsearch.common.xcontent.FromXContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo;
|
||||
|
||||
|
@ -149,8 +148,8 @@ public class BlobStoreIndexShardSnapshots implements Iterable<SnapshotFiles>, To
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FILES = new XContentBuilderString("files");
|
||||
static final XContentBuilderString SNAPSHOTS = new XContentBuilderString("snapshots");
|
||||
static final String FILES = "files";
|
||||
static final String SNAPSHOTS = "snapshots";
|
||||
}
|
||||
|
||||
static final class ParseFields {
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -108,10 +107,10 @@ public class StoreStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString STORE = new XContentBuilderString("store");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SIZE_IN_BYTES = new XContentBuilderString("size_in_bytes");
|
||||
static final XContentBuilderString THROTTLE_TIME = new XContentBuilderString("throttle_time");
|
||||
static final XContentBuilderString THROTTLE_TIME_IN_MILLIS = new XContentBuilderString("throttle_time_in_millis");
|
||||
static final String STORE = "store";
|
||||
static final String SIZE = "size";
|
||||
static final String SIZE_IN_BYTES = "size_in_bytes";
|
||||
static final String THROTTLE_TIME = "throttle_time";
|
||||
static final String THROTTLE_TIME_IN_MILLIS = "throttle_time_in_millis";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -77,10 +76,10 @@ public class TranslogStats extends ToXContentToBytes implements Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString TRANSLOG = new XContentBuilderString("translog");
|
||||
static final XContentBuilderString OPERATIONS = new XContentBuilderString("operations");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SIZE_IN_BYTES = new XContentBuilderString("size_in_bytes");
|
||||
static final String TRANSLOG = "translog";
|
||||
static final String OPERATIONS = "operations";
|
||||
static final String SIZE = "size";
|
||||
static final String SIZE_IN_BYTES = "size_in_bytes";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -104,11 +103,11 @@ public class WarmerStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString WARMER = new XContentBuilderString("warmer");
|
||||
static final XContentBuilderString CURRENT = new XContentBuilderString("current");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_TIME = new XContentBuilderString("total_time");
|
||||
static final XContentBuilderString TOTAL_TIME_IN_MILLIS = new XContentBuilderString("total_time_in_millis");
|
||||
static final String WARMER = "warmer";
|
||||
static final String CURRENT = "current";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_TIME = "total_time";
|
||||
static final String TOTAL_TIME_IN_MILLIS = "total_time_in_millis";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,4 +123,4 @@ public class WarmerStats implements Streamable, ToXContent {
|
|||
out.writeVLong(total);
|
||||
out.writeVLong(totalTimeInMillis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.cache.query.QueryCacheStats;
|
||||
import org.elasticsearch.index.cache.request.RequestCacheStats;
|
||||
|
@ -252,6 +251,6 @@ public class NodeIndicesStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString INDICES = new XContentBuilderString("indices");
|
||||
static final String INDICES = "indices";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -96,6 +95,6 @@ public class AllCircuitBreakerStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString BREAKERS = new XContentBuilderString("breakers");
|
||||
static final String BREAKERS = "breakers";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
@ -119,11 +118,11 @@ public class CircuitBreakerStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString LIMIT = new XContentBuilderString("limit_size_in_bytes");
|
||||
static final XContentBuilderString LIMIT_HUMAN = new XContentBuilderString("limit_size");
|
||||
static final XContentBuilderString ESTIMATED = new XContentBuilderString("estimated_size_in_bytes");
|
||||
static final XContentBuilderString ESTIMATED_HUMAN = new XContentBuilderString("estimated_size");
|
||||
static final XContentBuilderString OVERHEAD = new XContentBuilderString("overhead");
|
||||
static final XContentBuilderString TRIPPED_COUNT = new XContentBuilderString("tripped");
|
||||
static final String LIMIT = "limit_size_in_bytes";
|
||||
static final String LIMIT_HUMAN = "limit_size";
|
||||
static final String ESTIMATED = "estimated_size_in_bytes";
|
||||
static final String ESTIMATED_HUMAN = "estimated_size";
|
||||
static final String OVERHEAD = "overhead";
|
||||
static final String TRIPPED_COUNT = "tripped";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
|
||||
|
@ -348,44 +347,44 @@ public class RecoveryState implements ToXContent, Streamable {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString ID = new XContentBuilderString("id");
|
||||
static final XContentBuilderString TYPE = new XContentBuilderString("type");
|
||||
static final XContentBuilderString STAGE = new XContentBuilderString("stage");
|
||||
static final XContentBuilderString PRIMARY = new XContentBuilderString("primary");
|
||||
static final XContentBuilderString START_TIME = new XContentBuilderString("start_time");
|
||||
static final XContentBuilderString START_TIME_IN_MILLIS = new XContentBuilderString("start_time_in_millis");
|
||||
static final XContentBuilderString STOP_TIME = new XContentBuilderString("stop_time");
|
||||
static final XContentBuilderString STOP_TIME_IN_MILLIS = new XContentBuilderString("stop_time_in_millis");
|
||||
static final XContentBuilderString TOTAL_TIME = new XContentBuilderString("total_time");
|
||||
static final XContentBuilderString TOTAL_TIME_IN_MILLIS = new XContentBuilderString("total_time_in_millis");
|
||||
static final XContentBuilderString SOURCE = new XContentBuilderString("source");
|
||||
static final XContentBuilderString HOST = new XContentBuilderString("host");
|
||||
static final XContentBuilderString TRANSPORT_ADDRESS = new XContentBuilderString("transport_address");
|
||||
static final XContentBuilderString IP = new XContentBuilderString("ip");
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString TARGET = new XContentBuilderString("target");
|
||||
static final XContentBuilderString INDEX = new XContentBuilderString("index");
|
||||
static final XContentBuilderString TRANSLOG = new XContentBuilderString("translog");
|
||||
static final XContentBuilderString TOTAL_ON_START = new XContentBuilderString("total_on_start");
|
||||
static final XContentBuilderString VERIFY_INDEX = new XContentBuilderString("verify_index");
|
||||
static final XContentBuilderString RECOVERED = new XContentBuilderString("recovered");
|
||||
static final XContentBuilderString RECOVERED_IN_BYTES = new XContentBuilderString("recovered_in_bytes");
|
||||
static final XContentBuilderString CHECK_INDEX_TIME = new XContentBuilderString("check_index_time");
|
||||
static final XContentBuilderString CHECK_INDEX_TIME_IN_MILLIS = new XContentBuilderString("check_index_time_in_millis");
|
||||
static final XContentBuilderString LENGTH = new XContentBuilderString("length");
|
||||
static final XContentBuilderString LENGTH_IN_BYTES = new XContentBuilderString("length_in_bytes");
|
||||
static final XContentBuilderString FILES = new XContentBuilderString("files");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_IN_BYTES = new XContentBuilderString("total_in_bytes");
|
||||
static final XContentBuilderString REUSED = new XContentBuilderString("reused");
|
||||
static final XContentBuilderString REUSED_IN_BYTES = new XContentBuilderString("reused_in_bytes");
|
||||
static final XContentBuilderString PERCENT = new XContentBuilderString("percent");
|
||||
static final XContentBuilderString DETAILS = new XContentBuilderString("details");
|
||||
static final XContentBuilderString SIZE = new XContentBuilderString("size");
|
||||
static final XContentBuilderString SOURCE_THROTTLE_TIME = new XContentBuilderString("source_throttle_time");
|
||||
static final XContentBuilderString SOURCE_THROTTLE_TIME_IN_MILLIS = new XContentBuilderString("source_throttle_time_in_millis");
|
||||
static final XContentBuilderString TARGET_THROTTLE_TIME = new XContentBuilderString("target_throttle_time");
|
||||
static final XContentBuilderString TARGET_THROTTLE_TIME_IN_MILLIS = new XContentBuilderString("target_throttle_time_in_millis");
|
||||
static final String ID = "id";
|
||||
static final String TYPE = "type";
|
||||
static final String STAGE = "stage";
|
||||
static final String PRIMARY = "primary";
|
||||
static final String START_TIME = "start_time";
|
||||
static final String START_TIME_IN_MILLIS = "start_time_in_millis";
|
||||
static final String STOP_TIME = "stop_time";
|
||||
static final String STOP_TIME_IN_MILLIS = "stop_time_in_millis";
|
||||
static final String TOTAL_TIME = "total_time";
|
||||
static final String TOTAL_TIME_IN_MILLIS = "total_time_in_millis";
|
||||
static final String SOURCE = "source";
|
||||
static final String HOST = "host";
|
||||
static final String TRANSPORT_ADDRESS = "transport_address";
|
||||
static final String IP = "ip";
|
||||
static final String NAME = "name";
|
||||
static final String TARGET = "target";
|
||||
static final String INDEX = "index";
|
||||
static final String TRANSLOG = "translog";
|
||||
static final String TOTAL_ON_START = "total_on_start";
|
||||
static final String VERIFY_INDEX = "verify_index";
|
||||
static final String RECOVERED = "recovered";
|
||||
static final String RECOVERED_IN_BYTES = "recovered_in_bytes";
|
||||
static final String CHECK_INDEX_TIME = "check_index_time";
|
||||
static final String CHECK_INDEX_TIME_IN_MILLIS = "check_index_time_in_millis";
|
||||
static final String LENGTH = "length";
|
||||
static final String LENGTH_IN_BYTES = "length_in_bytes";
|
||||
static final String FILES = "files";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_IN_BYTES = "total_in_bytes";
|
||||
static final String REUSED = "reused";
|
||||
static final String REUSED_IN_BYTES = "reused_in_bytes";
|
||||
static final String PERCENT = "percent";
|
||||
static final String DETAILS = "details";
|
||||
static final String SIZE = "size";
|
||||
static final String SOURCE_THROTTLE_TIME = "source_throttle_time";
|
||||
static final String SOURCE_THROTTLE_TIME_IN_MILLIS = "source_throttle_time_in_millis";
|
||||
static final String TARGET_THROTTLE_TIME = "target_throttle_time";
|
||||
static final String TARGET_THROTTLE_TIME_IN_MILLIS = "target_throttle_time_in_millis";
|
||||
}
|
||||
|
||||
public static class Timer implements Streamable {
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -150,16 +149,16 @@ public class FsInfo implements Iterable<FsInfo.Path>, Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString PATH = new XContentBuilderString("path");
|
||||
static final XContentBuilderString MOUNT = new XContentBuilderString("mount");
|
||||
static final XContentBuilderString TYPE = new XContentBuilderString("type");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_IN_BYTES = new XContentBuilderString("total_in_bytes");
|
||||
static final XContentBuilderString FREE = new XContentBuilderString("free");
|
||||
static final XContentBuilderString FREE_IN_BYTES = new XContentBuilderString("free_in_bytes");
|
||||
static final XContentBuilderString AVAILABLE = new XContentBuilderString("available");
|
||||
static final XContentBuilderString AVAILABLE_IN_BYTES = new XContentBuilderString("available_in_bytes");
|
||||
static final XContentBuilderString SPINS = new XContentBuilderString("spins");
|
||||
static final String PATH = "path";
|
||||
static final String MOUNT = "mount";
|
||||
static final String TYPE = "type";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_IN_BYTES = "total_in_bytes";
|
||||
static final String FREE = "free";
|
||||
static final String FREE_IN_BYTES = "free_in_bytes";
|
||||
static final String AVAILABLE = "available";
|
||||
static final String AVAILABLE_IN_BYTES = "available_in_bytes";
|
||||
static final String SPINS = "spins";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -263,10 +262,10 @@ public class FsInfo implements Iterable<FsInfo.Path>, Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FS = new XContentBuilderString("fs");
|
||||
static final XContentBuilderString TIMESTAMP = new XContentBuilderString("timestamp");
|
||||
static final XContentBuilderString DATA = new XContentBuilderString("data");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final String FS = "fs";
|
||||
static final String TIMESTAMP = "timestamp";
|
||||
static final String DATA = "data";
|
||||
static final String TOTAL = "total";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.management.GarbageCollectorMXBean;
|
||||
|
@ -359,29 +358,29 @@ public class JvmInfo implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString JVM = new XContentBuilderString("jvm");
|
||||
static final XContentBuilderString PID = new XContentBuilderString("pid");
|
||||
static final XContentBuilderString VERSION = new XContentBuilderString("version");
|
||||
static final XContentBuilderString VM_NAME = new XContentBuilderString("vm_name");
|
||||
static final XContentBuilderString VM_VERSION = new XContentBuilderString("vm_version");
|
||||
static final XContentBuilderString VM_VENDOR = new XContentBuilderString("vm_vendor");
|
||||
static final XContentBuilderString START_TIME = new XContentBuilderString("start_time");
|
||||
static final XContentBuilderString START_TIME_IN_MILLIS = new XContentBuilderString("start_time_in_millis");
|
||||
static final String JVM = "jvm";
|
||||
static final String PID = "pid";
|
||||
static final String VERSION = "version";
|
||||
static final String VM_NAME = "vm_name";
|
||||
static final String VM_VERSION = "vm_version";
|
||||
static final String VM_VENDOR = "vm_vendor";
|
||||
static final String START_TIME = "start_time";
|
||||
static final String START_TIME_IN_MILLIS = "start_time_in_millis";
|
||||
|
||||
static final XContentBuilderString MEM = new XContentBuilderString("mem");
|
||||
static final XContentBuilderString HEAP_INIT = new XContentBuilderString("heap_init");
|
||||
static final XContentBuilderString HEAP_INIT_IN_BYTES = new XContentBuilderString("heap_init_in_bytes");
|
||||
static final XContentBuilderString HEAP_MAX = new XContentBuilderString("heap_max");
|
||||
static final XContentBuilderString HEAP_MAX_IN_BYTES = new XContentBuilderString("heap_max_in_bytes");
|
||||
static final XContentBuilderString NON_HEAP_INIT = new XContentBuilderString("non_heap_init");
|
||||
static final XContentBuilderString NON_HEAP_INIT_IN_BYTES = new XContentBuilderString("non_heap_init_in_bytes");
|
||||
static final XContentBuilderString NON_HEAP_MAX = new XContentBuilderString("non_heap_max");
|
||||
static final XContentBuilderString NON_HEAP_MAX_IN_BYTES = new XContentBuilderString("non_heap_max_in_bytes");
|
||||
static final XContentBuilderString DIRECT_MAX = new XContentBuilderString("direct_max");
|
||||
static final XContentBuilderString DIRECT_MAX_IN_BYTES = new XContentBuilderString("direct_max_in_bytes");
|
||||
static final XContentBuilderString GC_COLLECTORS = new XContentBuilderString("gc_collectors");
|
||||
static final XContentBuilderString MEMORY_POOLS = new XContentBuilderString("memory_pools");
|
||||
static final XContentBuilderString USING_COMPRESSED_OOPS = new XContentBuilderString("using_compressed_ordinary_object_pointers");
|
||||
static final String MEM = "mem";
|
||||
static final String HEAP_INIT = "heap_init";
|
||||
static final String HEAP_INIT_IN_BYTES = "heap_init_in_bytes";
|
||||
static final String HEAP_MAX = "heap_max";
|
||||
static final String HEAP_MAX_IN_BYTES = "heap_max_in_bytes";
|
||||
static final String NON_HEAP_INIT = "non_heap_init";
|
||||
static final String NON_HEAP_INIT_IN_BYTES = "non_heap_init_in_bytes";
|
||||
static final String NON_HEAP_MAX = "non_heap_max";
|
||||
static final String NON_HEAP_MAX_IN_BYTES = "non_heap_max_in_bytes";
|
||||
static final String DIRECT_MAX = "direct_max";
|
||||
static final String DIRECT_MAX_IN_BYTES = "direct_max_in_bytes";
|
||||
static final String GC_COLLECTORS = "gc_collectors";
|
||||
static final String MEMORY_POOLS = "memory_pools";
|
||||
static final String USING_COMPRESSED_OOPS = "using_compressed_ordinary_object_pointers";
|
||||
}
|
||||
|
||||
public static JvmInfo readJvmInfo(StreamInput in) throws IOException {
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.management.BufferPoolMXBean;
|
||||
|
@ -254,54 +253,54 @@ public class JvmStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString JVM = new XContentBuilderString("jvm");
|
||||
static final XContentBuilderString TIMESTAMP = new XContentBuilderString("timestamp");
|
||||
static final XContentBuilderString UPTIME = new XContentBuilderString("uptime");
|
||||
static final XContentBuilderString UPTIME_IN_MILLIS = new XContentBuilderString("uptime_in_millis");
|
||||
static final String JVM = "jvm";
|
||||
static final String TIMESTAMP = "timestamp";
|
||||
static final String UPTIME = "uptime";
|
||||
static final String UPTIME_IN_MILLIS = "uptime_in_millis";
|
||||
|
||||
static final XContentBuilderString MEM = new XContentBuilderString("mem");
|
||||
static final XContentBuilderString HEAP_USED = new XContentBuilderString("heap_used");
|
||||
static final XContentBuilderString HEAP_USED_IN_BYTES = new XContentBuilderString("heap_used_in_bytes");
|
||||
static final XContentBuilderString HEAP_USED_PERCENT = new XContentBuilderString("heap_used_percent");
|
||||
static final XContentBuilderString HEAP_MAX = new XContentBuilderString("heap_max");
|
||||
static final XContentBuilderString HEAP_MAX_IN_BYTES = new XContentBuilderString("heap_max_in_bytes");
|
||||
static final XContentBuilderString HEAP_COMMITTED = new XContentBuilderString("heap_committed");
|
||||
static final XContentBuilderString HEAP_COMMITTED_IN_BYTES = new XContentBuilderString("heap_committed_in_bytes");
|
||||
static final String MEM = "mem";
|
||||
static final String HEAP_USED = "heap_used";
|
||||
static final String HEAP_USED_IN_BYTES = "heap_used_in_bytes";
|
||||
static final String HEAP_USED_PERCENT = "heap_used_percent";
|
||||
static final String HEAP_MAX = "heap_max";
|
||||
static final String HEAP_MAX_IN_BYTES = "heap_max_in_bytes";
|
||||
static final String HEAP_COMMITTED = "heap_committed";
|
||||
static final String HEAP_COMMITTED_IN_BYTES = "heap_committed_in_bytes";
|
||||
|
||||
static final XContentBuilderString NON_HEAP_USED = new XContentBuilderString("non_heap_used");
|
||||
static final XContentBuilderString NON_HEAP_USED_IN_BYTES = new XContentBuilderString("non_heap_used_in_bytes");
|
||||
static final XContentBuilderString NON_HEAP_COMMITTED = new XContentBuilderString("non_heap_committed");
|
||||
static final XContentBuilderString NON_HEAP_COMMITTED_IN_BYTES = new XContentBuilderString("non_heap_committed_in_bytes");
|
||||
static final String NON_HEAP_USED = "non_heap_used";
|
||||
static final String NON_HEAP_USED_IN_BYTES = "non_heap_used_in_bytes";
|
||||
static final String NON_HEAP_COMMITTED = "non_heap_committed";
|
||||
static final String NON_HEAP_COMMITTED_IN_BYTES = "non_heap_committed_in_bytes";
|
||||
|
||||
static final XContentBuilderString POOLS = new XContentBuilderString("pools");
|
||||
static final XContentBuilderString USED = new XContentBuilderString("used");
|
||||
static final XContentBuilderString USED_IN_BYTES = new XContentBuilderString("used_in_bytes");
|
||||
static final XContentBuilderString MAX = new XContentBuilderString("max");
|
||||
static final XContentBuilderString MAX_IN_BYTES = new XContentBuilderString("max_in_bytes");
|
||||
static final XContentBuilderString PEAK_USED = new XContentBuilderString("peak_used");
|
||||
static final XContentBuilderString PEAK_USED_IN_BYTES = new XContentBuilderString("peak_used_in_bytes");
|
||||
static final XContentBuilderString PEAK_MAX = new XContentBuilderString("peak_max");
|
||||
static final XContentBuilderString PEAK_MAX_IN_BYTES = new XContentBuilderString("peak_max_in_bytes");
|
||||
static final String POOLS = "pools";
|
||||
static final String USED = "used";
|
||||
static final String USED_IN_BYTES = "used_in_bytes";
|
||||
static final String MAX = "max";
|
||||
static final String MAX_IN_BYTES = "max_in_bytes";
|
||||
static final String PEAK_USED = "peak_used";
|
||||
static final String PEAK_USED_IN_BYTES = "peak_used_in_bytes";
|
||||
static final String PEAK_MAX = "peak_max";
|
||||
static final String PEAK_MAX_IN_BYTES = "peak_max_in_bytes";
|
||||
|
||||
static final XContentBuilderString THREADS = new XContentBuilderString("threads");
|
||||
static final XContentBuilderString COUNT = new XContentBuilderString("count");
|
||||
static final XContentBuilderString PEAK_COUNT = new XContentBuilderString("peak_count");
|
||||
static final String THREADS = "threads";
|
||||
static final String COUNT = "count";
|
||||
static final String PEAK_COUNT = "peak_count";
|
||||
|
||||
static final XContentBuilderString GC = new XContentBuilderString("gc");
|
||||
static final XContentBuilderString COLLECTORS = new XContentBuilderString("collectors");
|
||||
static final XContentBuilderString COLLECTION_COUNT = new XContentBuilderString("collection_count");
|
||||
static final XContentBuilderString COLLECTION_TIME = new XContentBuilderString("collection_time");
|
||||
static final XContentBuilderString COLLECTION_TIME_IN_MILLIS = new XContentBuilderString("collection_time_in_millis");
|
||||
static final String GC = "gc";
|
||||
static final String COLLECTORS = "collectors";
|
||||
static final String COLLECTION_COUNT = "collection_count";
|
||||
static final String COLLECTION_TIME = "collection_time";
|
||||
static final String COLLECTION_TIME_IN_MILLIS = "collection_time_in_millis";
|
||||
|
||||
static final XContentBuilderString BUFFER_POOLS = new XContentBuilderString("buffer_pools");
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString TOTAL_CAPACITY = new XContentBuilderString("total_capacity");
|
||||
static final XContentBuilderString TOTAL_CAPACITY_IN_BYTES = new XContentBuilderString("total_capacity_in_bytes");
|
||||
static final String BUFFER_POOLS = "buffer_pools";
|
||||
static final String NAME = "name";
|
||||
static final String TOTAL_CAPACITY = "total_capacity";
|
||||
static final String TOTAL_CAPACITY_IN_BYTES = "total_capacity_in_bytes";
|
||||
|
||||
static final XContentBuilderString CLASSES = new XContentBuilderString("classes");
|
||||
static final XContentBuilderString CURRENT_LOADED_COUNT = new XContentBuilderString("current_loaded_count");
|
||||
static final XContentBuilderString TOTAL_LOADED_COUNT = new XContentBuilderString("total_loaded_count");
|
||||
static final XContentBuilderString TOTAL_UNLOADED_COUNT = new XContentBuilderString("total_unloaded_count");
|
||||
static final String CLASSES = "classes";
|
||||
static final String CURRENT_LOADED_COUNT = "current_loaded_count";
|
||||
static final String TOTAL_LOADED_COUNT = "total_loaded_count";
|
||||
static final String TOTAL_UNLOADED_COUNT = "total_unloaded_count";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -68,14 +67,14 @@ public class OsInfo implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString OS = new XContentBuilderString("os");
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString ARCH = new XContentBuilderString("arch");
|
||||
static final XContentBuilderString VERSION = new XContentBuilderString("version");
|
||||
static final XContentBuilderString REFRESH_INTERVAL = new XContentBuilderString("refresh_interval");
|
||||
static final XContentBuilderString REFRESH_INTERVAL_IN_MILLIS = new XContentBuilderString("refresh_interval_in_millis");
|
||||
static final XContentBuilderString AVAILABLE_PROCESSORS = new XContentBuilderString("available_processors");
|
||||
static final XContentBuilderString ALLOCATED_PROCESSORS = new XContentBuilderString("allocated_processors");
|
||||
static final String OS = "os";
|
||||
static final String NAME = "name";
|
||||
static final String ARCH = "arch";
|
||||
static final String VERSION = "version";
|
||||
static final String REFRESH_INTERVAL = "refresh_interval";
|
||||
static final String REFRESH_INTERVAL_IN_MILLIS = "refresh_interval_in_millis";
|
||||
static final String AVAILABLE_PROCESSORS = "available_processors";
|
||||
static final String ALLOCATED_PROCESSORS = "allocated_processors";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -61,26 +60,26 @@ public class OsStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString OS = new XContentBuilderString("os");
|
||||
static final XContentBuilderString TIMESTAMP = new XContentBuilderString("timestamp");
|
||||
static final XContentBuilderString CPU = new XContentBuilderString("cpu");
|
||||
static final XContentBuilderString PERCENT = new XContentBuilderString("percent");
|
||||
static final XContentBuilderString LOAD_AVERAGE = new XContentBuilderString("load_average");
|
||||
static final XContentBuilderString LOAD_AVERAGE_1M = new XContentBuilderString("1m");
|
||||
static final XContentBuilderString LOAD_AVERAGE_5M = new XContentBuilderString("5m");
|
||||
static final XContentBuilderString LOAD_AVERAGE_15M = new XContentBuilderString("15m");
|
||||
static final String OS = "os";
|
||||
static final String TIMESTAMP = "timestamp";
|
||||
static final String CPU = "cpu";
|
||||
static final String PERCENT = "percent";
|
||||
static final String LOAD_AVERAGE = "load_average";
|
||||
static final String LOAD_AVERAGE_1M = new String("1m");
|
||||
static final String LOAD_AVERAGE_5M = new String("5m");
|
||||
static final String LOAD_AVERAGE_15M = new String("15m");
|
||||
|
||||
static final XContentBuilderString MEM = new XContentBuilderString("mem");
|
||||
static final XContentBuilderString SWAP = new XContentBuilderString("swap");
|
||||
static final XContentBuilderString FREE = new XContentBuilderString("free");
|
||||
static final XContentBuilderString FREE_IN_BYTES = new XContentBuilderString("free_in_bytes");
|
||||
static final XContentBuilderString USED = new XContentBuilderString("used");
|
||||
static final XContentBuilderString USED_IN_BYTES = new XContentBuilderString("used_in_bytes");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_IN_BYTES = new XContentBuilderString("total_in_bytes");
|
||||
static final String MEM = "mem";
|
||||
static final String SWAP = "swap";
|
||||
static final String FREE = "free";
|
||||
static final String FREE_IN_BYTES = "free_in_bytes";
|
||||
static final String USED = "used";
|
||||
static final String USED_IN_BYTES = "used_in_bytes";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_IN_BYTES = "total_in_bytes";
|
||||
|
||||
static final XContentBuilderString FREE_PERCENT = new XContentBuilderString("free_percent");
|
||||
static final XContentBuilderString USED_PERCENT = new XContentBuilderString("used_percent");
|
||||
static final String FREE_PERCENT = "free_percent";
|
||||
static final String USED_PERCENT = "used_percent";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -64,11 +63,11 @@ public class ProcessInfo implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString PROCESS = new XContentBuilderString("process");
|
||||
static final XContentBuilderString REFRESH_INTERVAL = new XContentBuilderString("refresh_interval");
|
||||
static final XContentBuilderString REFRESH_INTERVAL_IN_MILLIS = new XContentBuilderString("refresh_interval_in_millis");
|
||||
static final XContentBuilderString ID = new XContentBuilderString("id");
|
||||
static final XContentBuilderString MLOCKALL = new XContentBuilderString("mlockall");
|
||||
static final String PROCESS = "process";
|
||||
static final String REFRESH_INTERVAL = "refresh_interval";
|
||||
static final String REFRESH_INTERVAL_IN_MILLIS = "refresh_interval_in_millis";
|
||||
static final String ID = "id";
|
||||
static final String MLOCKALL = "mlockall";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.unit.ByteSizeValue;
|
|||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -65,19 +64,19 @@ public class ProcessStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString PROCESS = new XContentBuilderString("process");
|
||||
static final XContentBuilderString TIMESTAMP = new XContentBuilderString("timestamp");
|
||||
static final XContentBuilderString OPEN_FILE_DESCRIPTORS = new XContentBuilderString("open_file_descriptors");
|
||||
static final XContentBuilderString MAX_FILE_DESCRIPTORS = new XContentBuilderString("max_file_descriptors");
|
||||
static final String PROCESS = "process";
|
||||
static final String TIMESTAMP = "timestamp";
|
||||
static final String OPEN_FILE_DESCRIPTORS = "open_file_descriptors";
|
||||
static final String MAX_FILE_DESCRIPTORS = "max_file_descriptors";
|
||||
|
||||
static final XContentBuilderString CPU = new XContentBuilderString("cpu");
|
||||
static final XContentBuilderString PERCENT = new XContentBuilderString("percent");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString TOTAL_IN_MILLIS = new XContentBuilderString("total_in_millis");
|
||||
static final String CPU = "cpu";
|
||||
static final String PERCENT = "percent";
|
||||
static final String TOTAL = "total";
|
||||
static final String TOTAL_IN_MILLIS = "total_in_millis";
|
||||
|
||||
static final XContentBuilderString MEM = new XContentBuilderString("mem");
|
||||
static final XContentBuilderString TOTAL_VIRTUAL = new XContentBuilderString("total_virtual");
|
||||
static final XContentBuilderString TOTAL_VIRTUAL_IN_BYTES = new XContentBuilderString("total_virtual_in_bytes");
|
||||
static final String MEM = "mem";
|
||||
static final String TOTAL_VIRTUAL = "total_virtual";
|
||||
static final String TOTAL_VIRTUAL_IN_BYTES = "total_virtual_in_bytes";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -39,11 +38,11 @@ public class PluginInfo implements Streamable, ToXContent {
|
|||
public static final String ES_PLUGIN_POLICY = "plugin-security.policy";
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString NAME = new XContentBuilderString("name");
|
||||
static final XContentBuilderString DESCRIPTION = new XContentBuilderString("description");
|
||||
static final XContentBuilderString URL = new XContentBuilderString("url");
|
||||
static final XContentBuilderString VERSION = new XContentBuilderString("version");
|
||||
static final XContentBuilderString CLASSNAME = new XContentBuilderString("classname");
|
||||
static final String NAME = "name";
|
||||
static final String DESCRIPTION = "description";
|
||||
static final String URL = "url";
|
||||
static final String VERSION = "version";
|
||||
static final String CLASSNAME = "classname";
|
||||
}
|
||||
|
||||
private String name;
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.SettingsFilter;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
import org.elasticsearch.rest.RestChannel;
|
||||
|
@ -98,6 +97,6 @@ public class RestClusterStateAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString CLUSTER_NAME = new XContentBuilderString("cluster_name");
|
||||
static final String CLUSTER_NAME = "cluster_name";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
import org.elasticsearch.rest.RestChannel;
|
||||
|
@ -113,7 +112,7 @@ public class RestGetAliasesAction extends BaseRestHandler {
|
|||
|
||||
static class Fields {
|
||||
|
||||
static final XContentBuilderString ALIASES = new XContentBuilderString("aliases");
|
||||
static final String ALIASES = "aliases";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.settings.SettingsFilter;
|
||||
import org.elasticsearch.common.xcontent.ToXContent.Params;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
import org.elasticsearch.rest.RestChannel;
|
||||
|
@ -155,9 +154,9 @@ public class RestGetIndicesAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static class Fields {
|
||||
static final XContentBuilderString ALIASES = new XContentBuilderString("aliases");
|
||||
static final XContentBuilderString MAPPINGS = new XContentBuilderString("mappings");
|
||||
static final XContentBuilderString SETTINGS = new XContentBuilderString("settings");
|
||||
static final String ALIASES = "aliases";
|
||||
static final String MAPPINGS = "mappings";
|
||||
static final String SETTINGS = "settings";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.collect.ImmutableOpenMap;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.indices.TypeMissingException;
|
||||
|
@ -105,6 +104,6 @@ public class RestGetMappingAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static class Fields {
|
||||
static final XContentBuilderString MAPPINGS = new XContentBuilderString("mappings");
|
||||
static final String MAPPINGS = "mappings";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.elasticsearch.common.Strings;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.indices.query.IndicesQueriesRegistry;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
|
@ -131,9 +130,9 @@ public class RestValidateQueryAction extends BaseRestHandler {
|
|||
return new BytesRestResponse(OK, builder);
|
||||
}
|
||||
|
||||
private static final XContentBuilderString INDEX_FIELD = new XContentBuilderString("index");
|
||||
private static final XContentBuilderString VALID_FIELD = new XContentBuilderString("valid");
|
||||
private static final XContentBuilderString EXPLANATIONS_FIELD = new XContentBuilderString("explanations");
|
||||
private static final XContentBuilderString ERROR_FIELD = new XContentBuilderString("error");
|
||||
private static final XContentBuilderString EXPLANATION_FIELD = new XContentBuilderString("explanation");
|
||||
private static final String INDEX_FIELD = "index";
|
||||
private static final String VALID_FIELD = "valid";
|
||||
private static final String EXPLANATIONS_FIELD = "explanations";
|
||||
private static final String ERROR_FIELD = "error";
|
||||
private static final String EXPLANATION_FIELD = "explanation";
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.common.Strings;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
import org.elasticsearch.rest.RestChannel;
|
||||
|
@ -112,10 +111,10 @@ public class RestBulkAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString ITEMS = new XContentBuilderString("items");
|
||||
static final XContentBuilderString ERRORS = new XContentBuilderString("errors");
|
||||
static final XContentBuilderString TOOK = new XContentBuilderString("took");
|
||||
static final XContentBuilderString INGEST_TOOK = new XContentBuilderString("ingest_took");
|
||||
static final String ITEMS = "items";
|
||||
static final String ERRORS = "errors";
|
||||
static final String TOOK = "took";
|
||||
static final String INGEST_TOOK = "ingest_took";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.common.bytes.BytesReference;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.get.GetResult;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.indices.query.IndicesQueriesRegistry;
|
||||
|
@ -131,15 +130,15 @@ public class RestExplainAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static class Fields {
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString MATCHED = new XContentBuilderString("matched");
|
||||
static final XContentBuilderString EXPLANATION = new XContentBuilderString("explanation");
|
||||
static final XContentBuilderString VALUE = new XContentBuilderString("value");
|
||||
static final XContentBuilderString DESCRIPTION = new XContentBuilderString("description");
|
||||
static final XContentBuilderString DETAILS = new XContentBuilderString("details");
|
||||
static final XContentBuilderString GET = new XContentBuilderString("get");
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String MATCHED = "matched";
|
||||
static final String EXPLANATION = "explanation";
|
||||
static final String VALUE = "value";
|
||||
static final String DESCRIPTION = "description";
|
||||
static final String DETAILS = "details";
|
||||
static final String GET = "get";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.client.Client;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.VersionType;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
|
@ -82,10 +81,10 @@ public class RestDeleteIndexedScriptAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString FOUND = new XContentBuilderString("found");
|
||||
static final XContentBuilderString _INDEX = new XContentBuilderString("_index");
|
||||
static final XContentBuilderString _TYPE = new XContentBuilderString("_type");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
static final String FOUND = "found";
|
||||
static final String _INDEX = "_index";
|
||||
static final String _TYPE = "_type";
|
||||
static final String _ID = "_id";
|
||||
static final String _VERSION = "_version";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.client.Client;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.VersionType;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
|
@ -54,7 +53,7 @@ public class RestGetIndexedScriptAction extends BaseRestHandler {
|
|||
}
|
||||
}
|
||||
|
||||
protected XContentBuilderString getScriptFieldName() {
|
||||
protected String getScriptFieldName() {
|
||||
return Fields.SCRIPT;
|
||||
}
|
||||
|
||||
|
@ -87,10 +86,10 @@ public class RestGetIndexedScriptAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
private static final class Fields {
|
||||
private static final XContentBuilderString SCRIPT = new XContentBuilderString("script");
|
||||
private static final XContentBuilderString LANG = new XContentBuilderString("lang");
|
||||
private static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
private static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
private static final XContentBuilderString FOUND = new XContentBuilderString("found");
|
||||
private static final String SCRIPT = "script";
|
||||
private static final String LANG = "lang";
|
||||
private static final String _ID = "_id";
|
||||
private static final String _VERSION = "_version";
|
||||
private static final String FOUND = "found";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.elasticsearch.client.Client;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.index.VersionType;
|
||||
import org.elasticsearch.rest.BaseRestHandler;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
|
@ -121,8 +120,8 @@ public class RestPutIndexedScriptAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _VERSION = new XContentBuilderString("_version");
|
||||
static final XContentBuilderString _ID = new XContentBuilderString("_id");
|
||||
static final XContentBuilderString CREATED = new XContentBuilderString("created");
|
||||
static final String _VERSION = "_version";
|
||||
static final String _ID = "_id";
|
||||
static final String CREATED = "created";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.elasticsearch.rest.action.support;
|
|||
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.BytesRestResponse;
|
||||
import org.elasticsearch.rest.RestChannel;
|
||||
import org.elasticsearch.rest.RestResponse;
|
||||
|
@ -55,6 +54,6 @@ public class AcknowledgedRestListener<T extends AcknowledgedResponse> extends Re
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString ACKNOWLEDGED = new XContentBuilderString("acknowledged");
|
||||
static final String ACKNOWLEDGED = "acknowledged";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.elasticsearch.common.bytes.BytesReference;
|
|||
import org.elasticsearch.common.lucene.uid.Versions;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
|
@ -65,11 +64,11 @@ public class RestActions {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString _SHARDS = new XContentBuilderString("_shards");
|
||||
static final XContentBuilderString TOTAL = new XContentBuilderString("total");
|
||||
static final XContentBuilderString SUCCESSFUL = new XContentBuilderString("successful");
|
||||
static final XContentBuilderString FAILED = new XContentBuilderString("failed");
|
||||
static final XContentBuilderString FAILURES = new XContentBuilderString("failures");
|
||||
static final String _SHARDS = "_shards";
|
||||
static final String TOTAL = "total";
|
||||
static final String SUCCESSFUL = "successful";
|
||||
static final String FAILED = "failed";
|
||||
static final String FAILURES = "failures";
|
||||
}
|
||||
|
||||
public static void buildBroadcastShardsHeader(XContentBuilder builder, ToXContent.Params params, BroadcastResponse response) throws IOException {
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.elasticsearch.rest.action.template;
|
|||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.rest.RestController;
|
||||
import org.elasticsearch.rest.RestRequest;
|
||||
import org.elasticsearch.rest.action.script.RestGetIndexedScriptAction;
|
||||
|
@ -46,9 +45,9 @@ public class RestGetSearchTemplateAction extends RestGetIndexedScriptAction {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected XContentBuilderString getScriptFieldName() {
|
||||
protected String getScriptFieldName() {
|
||||
return TEMPLATE;
|
||||
}
|
||||
|
||||
private static final XContentBuilderString TEMPLATE = new XContentBuilderString("template");
|
||||
private static final String TEMPLATE = "template";
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -75,8 +74,8 @@ public class ScriptStats implements Streamable, ToXContent {
|
|||
}
|
||||
|
||||
static final class Fields {
|
||||
static final XContentBuilderString SCRIPT_STATS = new XContentBuilderString("script");
|
||||
static final XContentBuilderString COMPILATIONS = new XContentBuilderString("compilations");
|
||||
static final XContentBuilderString CACHE_EVICTIONS = new XContentBuilderString("cache_evictions");
|
||||
static final String SCRIPT_STATS = "script";
|
||||
static final String COMPILATIONS = "compilations";
|
||||
static final String CACHE_EVICTIONS = "cache_evictions";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.Streamable;
|
|||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
|
||||
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorStreams;
|
||||
|
@ -243,18 +242,18 @@ public abstract class InternalAggregation implements Aggregation, ToXContent, St
|
|||
* Common xcontent fields that are shared among addAggregation
|
||||
*/
|
||||
public static final class CommonFields {
|
||||
public static final XContentBuilderString META = new XContentBuilderString("meta");
|
||||
public static final XContentBuilderString BUCKETS = new XContentBuilderString("buckets");
|
||||
public static final XContentBuilderString VALUE = new XContentBuilderString("value");
|
||||
public static final XContentBuilderString VALUES = new XContentBuilderString("values");
|
||||
public static final XContentBuilderString VALUE_AS_STRING = new XContentBuilderString("value_as_string");
|
||||
public static final XContentBuilderString DOC_COUNT = new XContentBuilderString("doc_count");
|
||||
public static final XContentBuilderString KEY = new XContentBuilderString("key");
|
||||
public static final XContentBuilderString KEY_AS_STRING = new XContentBuilderString("key_as_string");
|
||||
public static final XContentBuilderString FROM = new XContentBuilderString("from");
|
||||
public static final XContentBuilderString FROM_AS_STRING = new XContentBuilderString("from_as_string");
|
||||
public static final XContentBuilderString TO = new XContentBuilderString("to");
|
||||
public static final XContentBuilderString TO_AS_STRING = new XContentBuilderString("to_as_string");
|
||||
public static final String META = "meta";
|
||||
public static final String BUCKETS = "buckets";
|
||||
public static final String VALUE = "value";
|
||||
public static final String VALUES = "values";
|
||||
public static final String VALUE_AS_STRING = "value_as_string";
|
||||
public static final String DOC_COUNT = "doc_count";
|
||||
public static final String KEY = "key";
|
||||
public static final String KEY_AS_STRING = "key_as_string";
|
||||
public static final String FROM = "from";
|
||||
public static final String FROM_AS_STRING = "from_as_string";
|
||||
public static final String TO = "to";
|
||||
public static final String TO_AS_STRING = "to_as_string";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilderString;
|
||||
import org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext;
|
||||
import org.elasticsearch.search.aggregations.support.AggregationPath;
|
||||
|
||||
|
@ -164,7 +163,7 @@ public class InternalAggregations implements Aggregations, ToXContent, Streamabl
|
|||
|
||||
/** The fields required to write this addAggregation to xcontent */
|
||||
static class Fields {
|
||||
public static final XContentBuilderString AGGREGATIONS = new XContentBuilderString("aggregations");
|
||||
public static final String AGGREGATIONS = "aggregations";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue