Пример #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;
 }