Remove index_writer_max_memory stat from segment stats
This commit is contained in:
parent
85bf48b4c1
commit
5c525e6606
|
@ -503,7 +503,6 @@ public abstract class Engine implements Closeable {
|
|||
// by default we don't have a writer here... subclasses can override this
|
||||
stats.addVersionMapMemoryInBytes(0);
|
||||
stats.addIndexWriterMemoryInBytes(0);
|
||||
stats.addIndexWriterMaxMemoryInBytes(0);
|
||||
}
|
||||
|
||||
/** How much heap is used that would be freed by a refresh. Note that this may throw {@link AlreadyClosedException}. */
|
||||
|
|
|
@ -851,7 +851,6 @@ public class InternalEngine extends Engine {
|
|||
protected final void writerSegmentStats(SegmentsStats stats) {
|
||||
stats.addVersionMapMemoryInBytes(versionMap.ramBytesUsed());
|
||||
stats.addIndexWriterMemoryInBytes(indexWriter.ramBytesUsed());
|
||||
stats.addIndexWriterMaxMemoryInBytes((long) (indexWriter.getConfig().getRAMBufferSizeMB() * 1024 * 1024));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
private long pointsMemoryInBytes;
|
||||
private long docValuesMemoryInBytes;
|
||||
private long indexWriterMemoryInBytes;
|
||||
private long indexWriterMaxMemoryInBytes;
|
||||
private long versionMapMemoryInBytes;
|
||||
private long bitsetMemoryInBytes;
|
||||
private ImmutableOpenMap<String, Long> fileSizes = ImmutableOpenMap.of();
|
||||
|
@ -111,10 +110,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
this.indexWriterMemoryInBytes += indexWriterMemoryInBytes;
|
||||
}
|
||||
|
||||
public void addIndexWriterMaxMemoryInBytes(long indexWriterMaxMemoryInBytes) {
|
||||
this.indexWriterMaxMemoryInBytes += indexWriterMaxMemoryInBytes;
|
||||
}
|
||||
|
||||
public void addVersionMapMemoryInBytes(long versionMapMemoryInBytes) {
|
||||
this.versionMapMemoryInBytes += versionMapMemoryInBytes;
|
||||
}
|
||||
|
@ -151,7 +146,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
addPointsMemoryInBytes(mergeStats.pointsMemoryInBytes);
|
||||
addDocValuesMemoryInBytes(mergeStats.docValuesMemoryInBytes);
|
||||
addIndexWriterMemoryInBytes(mergeStats.indexWriterMemoryInBytes);
|
||||
addIndexWriterMaxMemoryInBytes(mergeStats.indexWriterMaxMemoryInBytes);
|
||||
addVersionMapMemoryInBytes(mergeStats.versionMapMemoryInBytes);
|
||||
addBitsetMemoryInBytes(mergeStats.bitsetMemoryInBytes);
|
||||
addFileSizes(mergeStats.fileSizes);
|
||||
|
@ -252,17 +246,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
return new ByteSizeValue(indexWriterMemoryInBytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximum memory index writer may use before it must write buffered documents to a new segment.
|
||||
*/
|
||||
public long getIndexWriterMaxMemoryInBytes() {
|
||||
return this.indexWriterMaxMemoryInBytes;
|
||||
}
|
||||
|
||||
public ByteSizeValue getIndexWriterMaxMemory() {
|
||||
return new ByteSizeValue(indexWriterMaxMemoryInBytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimation of the memory usage by version map
|
||||
*/
|
||||
|
@ -307,7 +290,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
builder.byteSizeField(Fields.POINTS_MEMORY_IN_BYTES, Fields.POINTS_MEMORY, pointsMemoryInBytes);
|
||||
builder.byteSizeField(Fields.DOC_VALUES_MEMORY_IN_BYTES, Fields.DOC_VALUES_MEMORY, docValuesMemoryInBytes);
|
||||
builder.byteSizeField(Fields.INDEX_WRITER_MEMORY_IN_BYTES, Fields.INDEX_WRITER_MEMORY, indexWriterMemoryInBytes);
|
||||
builder.byteSizeField(Fields.INDEX_WRITER_MAX_MEMORY_IN_BYTES, Fields.INDEX_WRITER_MAX_MEMORY, indexWriterMaxMemoryInBytes);
|
||||
builder.byteSizeField(Fields.VERSION_MAP_MEMORY_IN_BYTES, Fields.VERSION_MAP_MEMORY, versionMapMemoryInBytes);
|
||||
builder.byteSizeField(Fields.FIXED_BIT_SET_MEMORY_IN_BYTES, Fields.FIXED_BIT_SET, bitsetMemoryInBytes);
|
||||
builder.startObject(Fields.FILE_SIZES);
|
||||
|
@ -342,8 +324,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
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";
|
||||
|
@ -366,7 +346,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
docValuesMemoryInBytes = in.readLong();
|
||||
indexWriterMemoryInBytes = in.readLong();
|
||||
versionMapMemoryInBytes = in.readLong();
|
||||
indexWriterMaxMemoryInBytes = in.readLong();
|
||||
bitsetMemoryInBytes = in.readLong();
|
||||
|
||||
int size = in.readVInt();
|
||||
|
@ -391,7 +370,6 @@ public class SegmentsStats implements Streamable, ToXContent {
|
|||
out.writeLong(docValuesMemoryInBytes);
|
||||
out.writeLong(indexWriterMemoryInBytes);
|
||||
out.writeLong(versionMapMemoryInBytes);
|
||||
out.writeLong(indexWriterMaxMemoryInBytes);
|
||||
out.writeLong(bitsetMemoryInBytes);
|
||||
|
||||
out.writeVInt(fileSizes.size());
|
||||
|
|
|
@ -281,9 +281,6 @@ public class RestIndicesAction extends AbstractCatAction {
|
|||
table.addCell("segments.index_writer_memory", "sibling:pri;alias:siwm,segmentsIndexWriterMemory;default:false;text-align:right;desc:memory used by index writer");
|
||||
table.addCell("pri.segments.index_writer_memory", "default:false;text-align:right;desc:memory used by index writer");
|
||||
|
||||
table.addCell("segments.index_writer_max_memory", "sibling:pri;alias:siwmx,segmentsIndexWriterMaxMemory;default:false;text-align:right;desc:maximum memory index writer may use before it must write buffered documents to a new segment");
|
||||
table.addCell("pri.segments.index_writer_max_memory", "default:false;text-align:right;desc:maximum memory index writer may use before it must write buffered documents to a new segment");
|
||||
|
||||
table.addCell("segments.version_map_memory", "sibling:pri;alias:svmm,segmentsVersionMapMemory;default:false;text-align:right;desc:memory used by version map");
|
||||
table.addCell("pri.segments.version_map_memory", "default:false;text-align:right;desc:memory used by version map");
|
||||
|
||||
|
@ -480,9 +477,6 @@ public class RestIndicesAction extends AbstractCatAction {
|
|||
table.addCell(indexStats == null ? null : indexStats.getTotal().getSegments().getIndexWriterMemory());
|
||||
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSegments().getIndexWriterMemory());
|
||||
|
||||
table.addCell(indexStats == null ? null : indexStats.getTotal().getSegments().getIndexWriterMaxMemory());
|
||||
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSegments().getIndexWriterMaxMemory());
|
||||
|
||||
table.addCell(indexStats == null ? null : indexStats.getTotal().getSegments().getVersionMapMemory());
|
||||
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSegments().getVersionMapMemory());
|
||||
|
||||
|
|
|
@ -204,7 +204,6 @@ public class RestNodesAction extends AbstractCatAction {
|
|||
table.addCell("segments.count", "alias:sc,segmentsCount;default:false;text-align:right;desc:number of segments");
|
||||
table.addCell("segments.memory", "alias:sm,segmentsMemory;default:false;text-align:right;desc:memory used by segments");
|
||||
table.addCell("segments.index_writer_memory", "alias:siwm,segmentsIndexWriterMemory;default:false;text-align:right;desc:memory used by index writer");
|
||||
table.addCell("segments.index_writer_max_memory", "alias:siwmx,segmentsIndexWriterMaxMemory;default:false;text-align:right;desc:maximum memory index writer may use before it must write buffered documents to a new segment");
|
||||
table.addCell("segments.version_map_memory", "alias:svmm,segmentsVersionMapMemory;default:false;text-align:right;desc:memory used by version map");
|
||||
table.addCell("segments.fixed_bitset_memory", "alias:sfbm,fixedBitsetMemory;default:false;text-align:right;desc:memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields");
|
||||
|
||||
|
@ -359,7 +358,6 @@ public class RestNodesAction extends AbstractCatAction {
|
|||
table.addCell(segmentsStats == null ? null : segmentsStats.getCount());
|
||||
table.addCell(segmentsStats == null ? null : segmentsStats.getMemory());
|
||||
table.addCell(segmentsStats == null ? null : segmentsStats.getIndexWriterMemory());
|
||||
table.addCell(segmentsStats == null ? null : segmentsStats.getIndexWriterMaxMemory());
|
||||
table.addCell(segmentsStats == null ? null : segmentsStats.getVersionMapMemory());
|
||||
table.addCell(segmentsStats == null ? null : segmentsStats.getBitsetMemory());
|
||||
|
||||
|
|
|
@ -156,7 +156,6 @@ public class RestShardsAction extends AbstractCatAction {
|
|||
table.addCell("segments.count", "alias:sc,segmentsCount;default:false;text-align:right;desc:number of segments");
|
||||
table.addCell("segments.memory", "alias:sm,segmentsMemory;default:false;text-align:right;desc:memory used by segments");
|
||||
table.addCell("segments.index_writer_memory", "alias:siwm,segmentsIndexWriterMemory;default:false;text-align:right;desc:memory used by index writer");
|
||||
table.addCell("segments.index_writer_max_memory", "alias:siwmx,segmentsIndexWriterMaxMemory;default:false;text-align:right;desc:maximum memory index writer may use before it must write buffered documents to a new segment");
|
||||
table.addCell("segments.version_map_memory", "alias:svmm,segmentsVersionMapMemory;default:false;text-align:right;desc:memory used by version map");
|
||||
table.addCell("segments.fixed_bitset_memory", "alias:sfbm,fixedBitsetMemory;default:false;text-align:right;desc:memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields");
|
||||
|
||||
|
@ -293,7 +292,6 @@ public class RestShardsAction extends AbstractCatAction {
|
|||
table.addCell(commonStats == null ? null : commonStats.getSegments().getCount());
|
||||
table.addCell(commonStats == null ? null : commonStats.getSegments().getMemory());
|
||||
table.addCell(commonStats == null ? null : commonStats.getSegments().getIndexWriterMemory());
|
||||
table.addCell(commonStats == null ? null : commonStats.getSegments().getIndexWriterMaxMemory());
|
||||
table.addCell(commonStats == null ? null : commonStats.getSegments().getVersionMapMemory());
|
||||
table.addCell(commonStats == null ? null : commonStats.getSegments().getBitsetMemory());
|
||||
|
||||
|
|
|
@ -544,7 +544,6 @@ public class IndexStatsIT extends ESIntegTestCase {
|
|||
|
||||
IndicesStatsResponse stats = client().admin().indices().prepareStats().setSegments(true).get();
|
||||
assertThat(stats.getTotal().getSegments().getIndexWriterMemoryInBytes(), greaterThan(0L));
|
||||
assertThat(stats.getTotal().getSegments().getIndexWriterMaxMemoryInBytes(), greaterThan(0L));
|
||||
assertThat(stats.getTotal().getSegments().getVersionMapMemoryInBytes(), greaterThan(0L));
|
||||
|
||||
client().admin().indices().prepareFlush().get();
|
||||
|
|
|
@ -201,8 +201,6 @@ operations |9
|
|||
segments |1.4kb
|
||||
|`segments.index_writer_memory` |`siwm`, `segmentsIndexWriterMemory` |No
|
||||
|Memory used by index writer |18mb
|
||||
|`segments.index_writer_max_memory` |`siwmx`, `segmentsIndexWriterMaxMemory` |No
|
||||
|Maximum memory index writer may use before it must write buffered documents to a new segment |32mb
|
||||
|`segments.version_map_memory` |`svmm`, `segmentsVersionMapMemory` |No
|
||||
|Memory used by version map |1.0kb
|
||||
|=======================================================================
|
||||
|
|
|
@ -87,8 +87,6 @@ Will return, for example:
|
|||
"doc_values_memory_in_bytes": 744,
|
||||
"index_writer_memory": "0b",
|
||||
"index_writer_memory_in_bytes": 0,
|
||||
"index_writer_max_memory": "2.5gb",
|
||||
"index_writer_max_memory_in_bytes": 2684354560,
|
||||
"version_map_memory": "0b",
|
||||
"version_map_memory_in_bytes": 0,
|
||||
"fixed_bit_set": "0b",
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
segments.count .+ \n
|
||||
segments.memory .+ \n
|
||||
segments.index_writer_memory .+ \n
|
||||
segments.index_writer_max_memory .+ \n
|
||||
segments.version_map_memory .+ \n
|
||||
segments.fixed_bitset_memory .+ \n
|
||||
warmer.current .+ \n
|
||||
|
|
Loading…
Reference in New Issue