es7.9
IndicesStatsResponse stats = client.admin().indices().prepareStats() .clear().setTypes("a") .setStore(true) .execute().actionGet(); Map<String,IndexStats> indexStatsMap = stats.getIndices(); for(String indexName : indexNames){ if(!indexName.startsWith("a") || indexName.equals(curIndiceName)) continue; long size = indexStatsMap.get(indexName).getTotal().getStore().getSize().getBytes()/1024;
1 个回复
FFFrp
赞同来自: liu_lanyu