Package org.elasticsearch.action.admin.indices.stats

Examples of org.elasticsearch.action.admin.indices.stats.ShardStats$Fields


    public Field$Reflection() {
        super(new ArrayList());
        List list = (List)target();
        for(int i = 0; i < 100; ++i) {
            Object o = new A100$Fields();
            fill(o);
            list.add(o);
        }
    }
View Full Code Here


    private List<Map<String, Object>> getShardInformation(IndexStats stats) {
        List<Map<String, Object>> shards = Lists.newArrayList();
        for(Map.Entry<Integer, IndexShardStats> s : stats.getIndexShards().entrySet()) {
            Iterator<ShardStats> iter = s.getValue().iterator();
            while (iter.hasNext()) {
                ShardStats ss = iter.next();

                Map<String, Object> shard = Maps.newHashMap();

                shard.put("node_hostname", cluster.nodeIdToHostName(ss.getShardRouting().currentNodeId()));
                shard.put("node_name", cluster.nodeIdToName(ss.getShardRouting().currentNodeId()));
                shard.put("id", ss.getShardId());
                shard.put("node_id", ss.getShardRouting().currentNodeId());
                shard.put("primary", ss.getShardRouting().primary());
                shard.put("is_initializing", ss.getShardRouting().initializing());
                shard.put("is_started", ss.getShardRouting().started());
                shard.put("is_unassigned", ss.getShardRouting().unassigned());
                shard.put("is_relocating", ss.getShardRouting().relocating());
                shard.put("relocating_to", cluster.nodeIdToName(ss.getShardRouting().relocatingNodeId()));

                shards.add(shard);
            }
        }
       
View Full Code Here

            for (IndexShard indexShard : indexService) {
                try {
                    if (indexShard.routingEntry() == null) {
                        continue;
                    }
                    IndexShardStats indexShardStats = new IndexShardStats(indexShard.shardId(), new ShardStats[] { new ShardStats(indexShard, indexShard.routingEntry(), flags) });
                    if (!statsByShard.containsKey(indexService.index())) {
                        statsByShard.put(indexService.index(), Lists.<IndexShardStats>newArrayList(indexShardStats));
                    } else {
                        statsByShard.get(indexService.index()).add(indexShardStats);
                    }
View Full Code Here

        List<ShardStats> shardsStats = new ArrayList<>();
        for (IndexService indexService : indicesService.indices().values()) {
            for (IndexShard indexShard : indexService) {
                if (indexShard.routingEntry() != null && indexShard.routingEntry().active()) {
                    // only report on fully started shards
                    shardsStats.add(new ShardStats(indexShard, indexShard.routingEntry(), SHARD_STATS_FLAGS));
                }
            }
        }

        ClusterHealthStatus clusterStatus = null;
View Full Code Here

    @Override
    protected List<ColumnDefinition> getElements0() throws SQLException {
        List<ColumnDefinition> result = new ArrayList<ColumnDefinition>();

        Rdb$relationFields r = RDB$RELATION_FIELDS.as("r");
        Rdb$fields f = RDB$FIELDS.as("f");

        // Inspiration for the below query was taken from jaybird's
        // DatabaseMetaData implementation
        for (Record record : create().select(
                r.RDB$FIELD_NAME.trim(),
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.stats.ShardStats$Fields

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.