Package org.elasticsearch.index.cache.field.data

Examples of org.elasticsearch.index.cache.field.data.FieldDataCache


    @Override
    protected CacheStatsPerFieldStats nodeOperation(CacheStatsPerFieldStatsRequest nodeStatsRequest) throws ElasticSearchException {
        List<CacheStatsPerFieldStats.FieldEntry> entries = Lists.newArrayList();
        for (IndexService indexService : indicesService) {
            logger.debug("Starting to analyze index {}",indexService.settingsService().index().name());
            FieldDataCache fieldData = indexService.cache().fieldData();
            for (DocumentMapper mapper : indexService.mapperService()) {
                for (FieldMapper fieldMapper : mapper.mappers()) {
                    String field = fieldMapper.names().indexName();
                    logger.debug("Calculating size for field {}",field);
                    long size = fieldData.sizeInBytes(field);
                    if (size > 0) {
                        logger.debug("Size for field {}: {}",field,size);
                        entries.add(new CacheStatsPerFieldStats.FieldEntry(field,size));
                    }
                    else logger.debug("Field {} is has no cache. Skipping.",field);
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.cache.field.data.FieldDataCache

Copyright © 2018 www.massapicom. 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.