org.elasticsearch.index.merge.MergeStats Java Examples

The following examples show how to use org.elasticsearch.index.merge.MergeStats. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ElasticsearchConcurrentMergeScheduler.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
MergeStats stats() {
    final MergeStats mergeStats = new MergeStats();
    mergeStats.add(totalMerges.count(), totalMerges.sum(), totalMergesNumDocs.count(), totalMergesSizeInBytes.count(),
            currentMerges.count(), currentMergesNumDocs.count(), currentMergesSizeInBytes.count(),
            totalMergeStoppedTime.count(),
            totalMergeThrottledTime.count(),
            config.isAutoThrottle() ? getIORateLimitMBPerSec() : Double.POSITIVE_INFINITY);
    return mergeStats;
}
 
Example #2
Source File: IndexShard.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public MergeStats mergeStats() {
    final Engine engine = engineUnsafe();
    if (engine == null) {
        return new MergeStats();
    }
    return engine.getMergeStats();
}
 
Example #3
Source File: GraphiteReporter.java    From elasticsearch-graphite-plugin with Do What The F*ck You Want To Public License 5 votes vote down vote up
private void sendMergeStats(String type, MergeStats mergeStats) {
    sendInt(type, "total", mergeStats.getTotal());
    sendInt(type, "totalTimeInMillis", mergeStats.getTotalTimeInMillis());
    sendInt(type, "totalNumDocs", mergeStats.getTotalNumDocs());
    sendInt(type, "current", mergeStats.getCurrent());
    sendInt(type, "currentNumDocs", mergeStats.getCurrentNumDocs());
    sendInt(type, "currentSizeInBytes", mergeStats.getCurrentSizeInBytes());
}
 
Example #4
Source File: test.java    From vscode-extension with MIT License 4 votes vote down vote up
public MergeStats getMergeStats() {
    return mergeScheduler.stats();
}
 
Example #5
Source File: DLBasedEngine.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public MergeStats getMergeStats() {
    return mergeScheduler.stats();
}
 
Example #6
Source File: NodeIndicesStats.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Nullable
public MergeStats getMerge() {
    return stats.getMerge();
}
 
Example #7
Source File: Engine.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public MergeStats getMergeStats() {
    return new MergeStats();
}
 
Example #8
Source File: InternalEngine.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public MergeStats getMergeStats() {
    return mergeScheduler.stats();
}
 
Example #9
Source File: ShadowIndexShard.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public MergeStats mergeStats() {
    return new MergeStats();
}
 
Example #10
Source File: CommonStats.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public CommonStats(CommonStatsFlags flags) {
    CommonStatsFlags.Flag[] setFlags = flags.getFlags();

    for (CommonStatsFlags.Flag flag : setFlags) {
        switch (flag) {
            case Docs:
                docs = new DocsStats();
                break;
            case Store:
                store = new StoreStats();
                break;
            case Indexing:
                indexing = new IndexingStats();
                break;
            case Get:
                get = new GetStats();
                break;
            case Search:
                search = new SearchStats();
                break;
            case Merge:
                merge = new MergeStats();
                break;
            case Refresh:
                refresh = new RefreshStats();
                break;
            case Flush:
                flush = new FlushStats();
                break;
            case Warmer:
                warmer = new WarmerStats();
                break;
            case QueryCache:
                queryCache = new QueryCacheStats();
                break;
            case FieldData:
                fieldData = new FieldDataStats();
                break;
            case Completion:
                completion = new CompletionStats();
                break;
            case Segments:
                segments = new SegmentsStats();
                break;
            case Percolate:
                percolate = new PercolateStats();
                break;
            case Translog:
                translog = new TranslogStats();
                break;
            case Suggest:
                suggest = new SuggestStats();
                break;
            case RequestCache:
                requestCache = new RequestCacheStats();
                break;
            case Recovery:
                recoveryStats = new RecoveryStats();
                break;
            case DL:
                dlStats = new DLStats();
                break;
            case Reindex:
                reindexStats = new ReindexStats();
                break;
            default:
                throw new IllegalStateException("Unknown Flag: " + flag);
        }
    }
}
 
Example #11
Source File: CommonStats.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Nullable
public MergeStats getMerge() {
    return merge;
}
 
Example #12
Source File: CommonStats.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        docs = DocsStats.readDocStats(in);
    }
    if (in.readBoolean()) {
        store = StoreStats.readStoreStats(in);
    }
    if (in.readBoolean()) {
        indexing = IndexingStats.readIndexingStats(in);
    }
    if (in.readBoolean()) {
        get = GetStats.readGetStats(in);
    }
    if (in.readBoolean()) {
        search = SearchStats.readSearchStats(in);
    }
    if (in.readBoolean()) {
        merge = MergeStats.readMergeStats(in);
    }
    if (in.readBoolean()) {
        refresh = RefreshStats.readRefreshStats(in);
    }
    if (in.readBoolean()) {
        flush = FlushStats.readFlushStats(in);
    }
    if (in.readBoolean()) {
        warmer = WarmerStats.readWarmerStats(in);
    }
    if (in.readBoolean()) {
        queryCache = QueryCacheStats.readQueryCacheStats(in);
    }
    if (in.readBoolean()) {
        fieldData = FieldDataStats.readFieldDataStats(in);
    }
    if (in.readBoolean()) {
        percolate = PercolateStats.readPercolateStats(in);
    }
    if (in.readBoolean()) {
        completion = CompletionStats.readCompletionStats(in);
    }
    if (in.readBoolean()) {
        segments = SegmentsStats.readSegmentsStats(in);
    }
    if (in.readBoolean()) {
        dlStats = DLStats.readDLStats(in);
    }
    if (in.readBoolean()) {
        reindexStats = ReindexStats.readReindexStats(in);
    }
    translog = in.readOptionalStreamable(new TranslogStats());
    suggest = in.readOptionalStreamable(new SuggestStats());
    requestCache = in.readOptionalStreamable(new RequestCacheStats());
    recoveryStats = in.readOptionalStreamable(new RecoveryStats());
}