Examples of CacheStats


Examples of org.elasticsearch.index.cache.CacheStats

    }

    @Override public NodeIndicesStats stats() {
        long storeTotalSize = 0;
        long numberOfDocs = 0;
        CacheStats cacheStats = new CacheStats();
        MergeStats mergeStats = new MergeStats();
        for (IndexService indexService : indices.values()) {
            for (IndexShard indexShard : indexService) {
                try {
                    storeTotalSize += ((InternalIndexShard) indexShard).store().estimateSize().bytes();
                } catch (IOException e) {
                    // ignore
                }

                if (indexShard.state() == IndexShardState.STARTED) {
                    Engine.Searcher searcher = indexShard.searcher();
                    try {
                        numberOfDocs += searcher.reader().numDocs();
                    } finally {
                        searcher.release();
                    }
                }
                mergeStats.add(((InternalIndexShard) indexShard).mergeScheduler().stats());
            }
            cacheStats.add(indexService.cache().stats());
        }
        return new NodeIndicesStats(new ByteSizeValue(storeTotalSize), numberOfDocs, cacheStats, mergeStats);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.