dont case node names and index names
This commit is contained in:
parent
5c760d1e8c
commit
1eee7f381a
|
@ -161,6 +161,12 @@ public final class XContentBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startArray(String name, FieldCaseConversion conversion) throws IOException {
|
||||
field(name, conversion);
|
||||
startArray();
|
||||
return this;
|
||||
}
|
||||
|
||||
public XContentBuilder startArray(String name) throws IOException {
|
||||
field(name);
|
||||
startArray();
|
||||
|
|
|
@ -65,7 +65,7 @@ public class RestNodesInfoAction extends BaseRestHandler {
|
|||
|
||||
builder.startObject("nodes");
|
||||
for (NodeInfo nodeInfo : result) {
|
||||
builder.startObject(nodeInfo.node().id());
|
||||
builder.startObject(nodeInfo.node().id(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
|
||||
builder.field("name", nodeInfo.node().name());
|
||||
builder.field("transport_address", nodeInfo.node().address().toString());
|
||||
|
|
|
@ -57,7 +57,7 @@ public class RestNodesStatsAction extends BaseRestHandler {
|
|||
|
||||
builder.startObject("nodes");
|
||||
for (NodeStats nodeStats : result) {
|
||||
builder.startObject(nodeStats.node().id());
|
||||
builder.startObject(nodeStats.node().id(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
|
||||
builder.field("name", nodeStats.node().name());
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class RestClusterStateAction extends BaseRestHandler {
|
|||
if (!clusterStateRequest.filterNodes()) {
|
||||
builder.startObject("nodes");
|
||||
for (DiscoveryNode node : state.nodes()) {
|
||||
builder.startObject(node.id());
|
||||
builder.startObject(node.id(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
builder.field("name", node.name());
|
||||
builder.field("transport_address", node.address().toString());
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class RestClusterStateAction extends BaseRestHandler {
|
|||
|
||||
builder.startObject("indices");
|
||||
for (IndexMetaData indexMetaData : state.metaData()) {
|
||||
builder.startObject(indexMetaData.index());
|
||||
builder.startObject(indexMetaData.index(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
|
||||
builder.startObject("settings");
|
||||
Settings settings = settingsFilter.filterSettings(indexMetaData.settings());
|
||||
|
@ -179,7 +179,7 @@ public class RestClusterStateAction extends BaseRestHandler {
|
|||
builder.startObject("routing_table");
|
||||
builder.startObject("indices");
|
||||
for (IndexRoutingTable indexRoutingTable : state.routingTable()) {
|
||||
builder.startObject(indexRoutingTable.index());
|
||||
builder.startObject(indexRoutingTable.index(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
builder.startObject("shards");
|
||||
for (IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable) {
|
||||
builder.startArray(Integer.toString(indexShardRoutingTable.shardId().id()));
|
||||
|
@ -206,7 +206,7 @@ public class RestClusterStateAction extends BaseRestHandler {
|
|||
|
||||
builder.startObject("nodes");
|
||||
for (RoutingNode routingNode : state.readOnlyRoutingNodes()) {
|
||||
builder.startArray(routingNode.nodeId());
|
||||
builder.startArray(routingNode.nodeId(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
for (ShardRouting shardRouting : routingNode) {
|
||||
jsonShardRouting(builder, shardRouting);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class RestIndicesStatusAction extends BaseRestHandler {
|
|||
|
||||
builder.startObject("indices");
|
||||
for (IndexStatus indexStatus : response.indices().values()) {
|
||||
builder.startObject(indexStatus.index());
|
||||
builder.startObject(indexStatus.index(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
|
||||
builder.array("aliases", indexStatus.settings().getAsArray("index.aliases"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue