@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(FIELDDATA); builder.humanReadableField(MEMORY_SIZE_IN_BYTES, MEMORY_SIZE, getMemorySize()); builder.field(EVICTIONS, getEvictions()); if (fields != null) { fields.toXContent(builder, FIELDS, MEMORY_SIZE_IN_BYTES, MEMORY_SIZE); } builder.endObject(); return builder; }
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(FIELDDATA); builder.humanReadableField(MEMORY_SIZE_IN_BYTES, MEMORY_SIZE, getMemorySize()); builder.field(EVICTIONS, getEvictions()); if (fields != null) { fields.toXContent(builder, FIELDS, MEMORY_SIZE_IN_BYTES, MEMORY_SIZE); } builder.endObject(); return builder; }
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(FIELDDATA); builder.humanReadableField(MEMORY_SIZE_IN_BYTES, MEMORY_SIZE, getMemorySize()); builder.field(EVICTIONS, getEvictions()); if (fields != null) { fields.toXContent(builder, FIELDS, MEMORY_SIZE_IN_BYTES, MEMORY_SIZE); } builder.endObject(); return builder; }
table.addCell(fdStats == null ? null : fdStats.getMemorySize()); table.addCell(fdStats == null ? null : fdStats.getEvictions());
table.addCell(ns.getNode().getHostAddress()); table.addCell(ns.getNode().getName()); table.addCell(ns.getIndices().getFieldData().getMemorySize()); ObjectLongMap<String> fields = statsEntry.getValue(); for (String fieldName : fieldNames) {
table.addCell(primaryStats.getCompletion() == null ? null : primaryStats.getCompletion().getSize()); table.addCell(totalStats.getFieldData() == null ? null : totalStats.getFieldData().getMemorySize()); table.addCell(primaryStats.getFieldData() == null ? null : primaryStats.getFieldData().getMemorySize());
public void memStatus() throws IOException { NodeStats[] nodeStats = client.admin().cluster().prepareNodesStats() .setJvm(true).setIndices(true).setTransport(true) .execute().actionGet().getNodes(); log("==== MEMORY ===="); log("Committed heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapCommitted() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapCommitted()); log("Used heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapUsed() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapUsed()); log("FieldData cache size: [0]=" + nodeStats[0].getIndices().getFieldData().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getFieldData().getMemorySize()); log("Query cache size: [0]=" + nodeStats[0].getIndices().getQueryCache().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getQueryCache().getMemorySize()); log(""); log("==== NETWORK ===="); log("Transport: [0]=" + nodeStats[0].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string() + ", [1]=" + nodeStats[1].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string()); log(""); }
public void memStatus() throws IOException { NodeStats[] nodeStats = client.admin().cluster().prepareNodesStats() .setJvm(true).setIndices(true).setTransport(true) .execute().actionGet().getNodes(); log("==== MEMORY ===="); log("Committed heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapCommitted() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapCommitted()); log("Used heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapUsed() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapUsed()); log("FieldData cache size: [0]=" + nodeStats[0].getIndices().getFieldData().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getFieldData().getMemorySize()); log("Query cache size: [0]=" + nodeStats[0].getIndices().getQueryCache().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getQueryCache().getMemorySize()); log(""); log("==== NETWORK ===="); log("Transport: [0]=" + nodeStats[0].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string() + ", [1]=" + nodeStats[1].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string()); log(""); }
table.addCell(fdStats == null ? null : fdStats.getMemorySize()); table.addCell(fdStats == null ? null : fdStats.getEvictions());
table.addCell(commonStats == null ? null : commonStats.getFieldData().getMemorySize()); table.addCell(commonStats == null ? null : commonStats.getFieldData().getEvictions());
table.addCell(fdStats == null ? null : fdStats.getMemorySize()); table.addCell(fdStats == null ? null : fdStats.getEvictions());
table.addCell(fdStats == null ? null : fdStats.getMemorySize()); table.addCell(fdStats == null ? null : fdStats.getEvictions());
table.addCell(commonStats == null ? null : commonStats.getFieldData().getMemorySize()); table.addCell(commonStats == null ? null : commonStats.getFieldData().getEvictions());
table.addCell(fdStats == null ? null : fdStats.getMemorySize()); table.addCell(fdStats == null ? null : fdStats.getEvictions());
table.addCell(primaryStats.getCompletion() == null ? null : primaryStats.getCompletion().getSize()); table.addCell(totalStats.getFieldData() == null ? null : totalStats.getFieldData().getMemorySize()); table.addCell(primaryStats.getFieldData() == null ? null : primaryStats.getFieldData().getMemorySize());
table.addCell(primaryStats.getCompletion() == null ? null : primaryStats.getCompletion().getSize()); table.addCell(totalStats.getFieldData() == null ? null : totalStats.getFieldData().getMemorySize()); table.addCell(primaryStats.getFieldData() == null ? null : primaryStats.getFieldData().getMemorySize());
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getCompletion().getSize()); table.addCell(indexStats == null ? null : indexStats.getTotal().getFieldData().getMemorySize()); table.addCell(indexStats == null ? null : indexStats.getPrimaries().getFieldData().getMemorySize());
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getCompletion().getSize()); table.addCell(indexStats == null ? null : indexStats.getTotal().getFieldData().getMemorySize()); table.addCell(indexStats == null ? null : indexStats.getPrimaries().getFieldData().getMemorySize());