示例#1
0
 public FlushStats flushStats() {
   FlushStats flushStats = new FlushStats();
   for (IndexShardStatus shard : this) {
     flushStats.add(shard.flushStats());
   }
   return flushStats;
 }
示例#2
0
 public RefreshStats refreshStats() {
   RefreshStats refreshStats = new RefreshStats();
   for (IndexShardStatus shard : this) {
     refreshStats.add(shard.refreshStats());
   }
   return refreshStats;
 }
示例#3
0
 /** Total merges of this index. */
 public MergeStats mergeStats() {
   MergeStats mergeStats = new MergeStats();
   for (IndexShardStatus shard : this) {
     mergeStats.add(shard.mergeStats());
   }
   return mergeStats;
 }
示例#4
0
 public long translogOperations() {
   long translogOperations = -1;
   for (IndexShardStatus shard : this) {
     if (shard.translogOperations() != -1) {
       if (translogOperations == -1) {
         translogOperations = 0;
       }
       translogOperations += shard.translogOperations();
     }
   }
   return translogOperations;
 }
示例#5
0
 /** 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);
 }
示例#6
0
 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;
 }