Exemplo n.º 1
0
 public FlushStats flushStats() {
   FlushStats flushStats = new FlushStats();
   for (IndexShardStatus shard : this) {
     flushStats.add(shard.flushStats());
   }
   return flushStats;
 }
Exemplo n.º 2
0
 public RefreshStats refreshStats() {
   RefreshStats refreshStats = new RefreshStats();
   for (IndexShardStatus shard : this) {
     refreshStats.add(shard.refreshStats());
   }
   return refreshStats;
 }
Exemplo n.º 3
0
 /** Total merges of this index. */
 public MergeStats mergeStats() {
   MergeStats mergeStats = new MergeStats();
   for (IndexShardStatus shard : this) {
     mergeStats.add(shard.mergeStats());
   }
   return mergeStats;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }