org.elasticsearch.cluster.metadata.MetaData.getTotalNumberOfShards()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.elasticsearch.cluster.metadata.MetaData.getTotalNumberOfShards()方法的一些代码示例,展示了MetaData.getTotalNumberOfShards()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaData.getTotalNumberOfShards()方法的具体详情如下:
包路径:org.elasticsearch.cluster.metadata.MetaData
类名称:MetaData
方法名:getTotalNumberOfShards

MetaData.getTotalNumberOfShards介绍

[英]Gets the total number of shards from all indices, including replicas and closed indices.
[中]获取所有索引(包括副本和闭合索引)中的碎片总数。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

public Balancer(Logger logger, RoutingAllocation allocation, WeightFunction weight, float threshold) {
  this.logger = logger;
  this.allocation = allocation;
  this.weight = weight;
  this.threshold = threshold;
  this.routingNodes = allocation.routingNodes();
  this.metaData = allocation.metaData();
  avgShardsPerNode = ((float) metaData.getTotalNumberOfShards()) / routingNodes.size();
  nodes = Collections.unmodifiableMap(buildModelFromAssigned());
  sorter = newNodeSorter();
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

public Balancer(Logger logger, RoutingAllocation allocation, WeightFunction weight, float threshold) {
  this.logger = logger;
  this.allocation = allocation;
  this.weight = weight;
  this.threshold = threshold;
  this.routingNodes = allocation.routingNodes();
  this.metaData = allocation.metaData();
  avgShardsPerNode = ((float) metaData.getTotalNumberOfShards()) / routingNodes.size();
  nodes = Collections.unmodifiableMap(buildModelFromAssigned());
  sorter = newNodeSorter();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public Balancer(Logger logger, RoutingAllocation allocation, WeightFunction weight, float threshold) {
  this.logger = logger;
  this.allocation = allocation;
  this.weight = weight;
  this.threshold = threshold;
  this.routingNodes = allocation.routingNodes();
  this.metaData = allocation.metaData();
  avgShardsPerNode = ((float) metaData.getTotalNumberOfShards()) / routingNodes.size();
  nodes = Collections.unmodifiableMap(buildModelFromAssigned());
  sorter = newNodeSorter();
}

代码示例来源:origin: apache/servicemix-bundles

public Balancer(Logger logger, RoutingAllocation allocation, WeightFunction weight, float threshold) {
  this.logger = logger;
  this.allocation = allocation;
  this.weight = weight;
  this.threshold = threshold;
  this.routingNodes = allocation.routingNodes();
  this.metaData = allocation.metaData();
  avgShardsPerNode = ((float) metaData.getTotalNumberOfShards()) / routingNodes.size();
  nodes = Collections.unmodifiableMap(buildModelFromAssigned());
  sorter = newNodeSorter();
}

相关文章

微信公众号

最新文章

更多