Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentBuilder.startObject()


        nodesShutdownRequest.exit(request.paramAsBoolean("exit", nodesShutdownRequest.exit()));
        client.admin().cluster().nodesShutdown(nodesShutdownRequest, new ActionListener<NodesShutdownResponse>() {
            @Override public void onResponse(NodesShutdownResponse response) {
                try {
                    XContentBuilder builder = restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", response.clusterName().value());

                    builder.startObject("nodes");
                    for (DiscoveryNode node : response.nodes()) {
                        builder.startObject(node.id());
View Full Code Here


                try {
                    XContentBuilder builder = restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", response.clusterName().value());

                    builder.startObject("nodes");
                    for (DiscoveryNode node : response.nodes()) {
                        builder.startObject(node.id());
                        builder.field("name", node.name());
                        builder.endObject();
                    }
View Full Code Here

                    builder.startObject();
                    builder.field("cluster_name", response.clusterName().value());

                    builder.startObject("nodes");
                    for (DiscoveryNode node : response.nodes()) {
                        builder.startObject(node.id());
                        builder.field("name", node.name());
                        builder.endObject();
                    }
                    builder.endObject();
View Full Code Here

        nodesInfoRequest.listenerThreaded(false);
        client.admin().cluster().nodesInfo(nodesInfoRequest, new ActionListener<NodesInfoResponse>() {
            @Override public void onResponse(NodesInfoResponse result) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", result.clusterName().value());

                    builder.startObject("nodes");
                    for (NodeInfo nodeInfo : result) {
                        builder.startObject(nodeInfo.node().id(), XContentBuilder.FieldCaseConversion.NONE);
View Full Code Here

                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", result.clusterName().value());

                    builder.startObject("nodes");
                    for (NodeInfo nodeInfo : result) {
                        builder.startObject(nodeInfo.node().id(), XContentBuilder.FieldCaseConversion.NONE);

                        builder.field("name", nodeInfo.node().name());
                        builder.field("transport_address", nodeInfo.node().address().toString());
View Full Code Here

                    builder.startObject();
                    builder.field("cluster_name", result.clusterName().value());

                    builder.startObject("nodes");
                    for (NodeInfo nodeInfo : result) {
                        builder.startObject(nodeInfo.node().id(), XContentBuilder.FieldCaseConversion.NONE);

                        builder.field("name", nodeInfo.node().name());
                        builder.field("transport_address", nodeInfo.node().address().toString());

                        builder.startObject("attributes");
View Full Code Here

                        builder.startObject(nodeInfo.node().id(), XContentBuilder.FieldCaseConversion.NONE);

                        builder.field("name", nodeInfo.node().name());
                        builder.field("transport_address", nodeInfo.node().address().toString());

                        builder.startObject("attributes");
                        for (Map.Entry<String, String> attr : nodeInfo.node().attributes().entrySet()) {
                            builder.field(attr.getKey(), attr.getValue());
                        }
                        builder.endObject();
View Full Code Here

                        for (Map.Entry<String, String> nodeAttribute : nodeInfo.attributes().entrySet()) {
                            builder.field(nodeAttribute.getKey(), nodeAttribute.getValue());
                        }

                        if (includeSettings) {
                            builder.startObject("settings");
                            Settings settings = settingsFilter.filterSettings(nodeInfo.settings());
                            for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
                                builder.field(entry.getKey(), entry.getValue());
                            }
                            builder.endObject();
View Full Code Here

        nodesStatsRequest.listenerThreaded(false);
        client.admin().cluster().nodesStats(nodesStatsRequest, new ActionListener<NodesStatsResponse>() {
            @Override public void onResponse(NodesStatsResponse result) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", result.clusterName().value());

                    builder.startObject("nodes");
                    for (NodeStats nodeStats : result) {
                        builder.startObject(nodeStats.node().id(), XContentBuilder.FieldCaseConversion.NONE);
View Full Code Here

                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
                    builder.field("cluster_name", result.clusterName().value());

                    builder.startObject("nodes");
                    for (NodeStats nodeStats : result) {
                        builder.startObject(nodeStats.node().id(), XContentBuilder.FieldCaseConversion.NONE);

                        builder.field("name", nodeStats.node().name());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.