public FlushStats flushStats() { FlushStats flushStats = new FlushStats(); for (IndexShardStatus shard : this) { flushStats.add(shard.flushStats()); } return flushStats; }
public RefreshStats refreshStats() { RefreshStats refreshStats = new RefreshStats(); for (IndexShardStatus shard : this) { refreshStats.add(shard.refreshStats()); } return refreshStats; }
/** Total merges of this index. */ public MergeStats mergeStats() { MergeStats mergeStats = new MergeStats(); for (IndexShardStatus shard : this) { mergeStats.add(shard.mergeStats()); } return mergeStats; }
public long translogOperations() { long translogOperations = -1; for (IndexShardStatus shard : this) { if (shard.translogOperations() != -1) { if (translogOperations == -1) { translogOperations = 0; } translogOperations += shard.translogOperations(); } } return translogOperations; }
/** Returns only the primary shards store size in bytes. */ public ByteSizeValue primaryStoreSize() { long bytes = -1; for (IndexShardStatus shard : this) { if (shard.primaryStoreSize() != null) { if (bytes == -1) { bytes = 0; } bytes += shard.primaryStoreSize().bytes(); } } if (bytes == -1) { return null; } return new ByteSizeValue(bytes); }
public DocsStatus docs() { if (docs != null) { return docs; } DocsStatus docs = null; for (IndexShardStatus shard : this) { if (shard.docs() == null) { continue; } if (docs == null) { docs = new DocsStatus(); } docs.numDocs += shard.docs().numDocs(); docs.maxDoc += shard.docs().maxDoc(); docs.deletedDocs += shard.docs().deletedDocs(); } this.docs = docs; return docs; }