本文整理汇总了Java中org.elasticsearch.cluster.health.ClusterHealthStatus.fromValue方法的典型用法代码示例。如果您正苦于以下问题:Java ClusterHealthStatus.fromValue方法的具体用法?Java ClusterHealthStatus.fromValue怎么用?Java ClusterHealthStatus.fromValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.cluster.health.ClusterHealthStatus
的用法示例。
在下文中一共展示了ClusterHealthStatus.fromValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
if (size == 0) {
indices = Strings.EMPTY_ARRAY;
} else {
indices = new String[size];
for (int i = 0; i < indices.length; i++) {
indices[i] = in.readString();
}
}
timeout = new TimeValue(in);
if (in.readBoolean()) {
waitForStatus = ClusterHealthStatus.fromValue(in.readByte());
}
waitForNoRelocatingShards = in.readBoolean();
waitForActiveShards = ActiveShardCount.readFrom(in);
waitForNodes = in.readString();
if (in.readBoolean()) {
waitForEvents = Priority.readFrom(in);
}
}
示例2: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
if (size == 0) {
indices = Strings.EMPTY_ARRAY;
} else {
indices = new String[size];
for (int i = 0; i < indices.length; i++) {
indices[i] = in.readString();
}
}
timeout = readTimeValue(in);
if (in.readBoolean()) {
waitForStatus = ClusterHealthStatus.fromValue(in.readByte());
}
waitForRelocatingShards = in.readInt();
waitForActiveShards = in.readInt();
waitForNodes = in.readString();
if (in.readBoolean()) {
waitForEvents = Priority.readFrom(in);
}
}
示例3: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
clusterStatus = null;
if (in.readBoolean()) {
clusterStatus = ClusterHealthStatus.fromValue(in.readByte());
}
this.nodeInfo = NodeInfo.readNodeInfo(in);
this.nodeStats = NodeStats.readNodeStats(in);
int size = in.readVInt();
shardsStats = new ShardStats[size];
for (int i = 0; i < size; i++) {
shardsStats[i] = ShardStats.readShardStats(in);
}
}
示例4: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
clusterName = in.readString();
clusterHealthStatus = ClusterHealthStatus.fromValue(in.readByte());
clusterStateHealth = new ClusterStateHealth(in);
numberOfPendingTasks = in.readInt();
timedOut = in.readBoolean();
numberOfInFlightFetch = in.readInt();
delayedUnassignedShards= in.readInt();
taskMaxWaitingTime = new TimeValue(in);
}
示例5: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
timestamp = in.readVLong();
status = null;
if (in.readBoolean()) {
// it may be that the master switched on us while doing the operation. In this case the status may be null.
status = ClusterHealthStatus.fromValue(in.readByte());
}
clusterUUID = in.readString();
nodesStats = ClusterStatsNodes.readNodeStats(in);
indicesStats = ClusterStatsIndices.readIndicesStats(in);
}
示例6: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
clusterStatus = null;
if (in.readBoolean()) {
clusterStatus = ClusterHealthStatus.fromValue(in.readByte());
}
this.nodeInfo = NodeInfo.readNodeInfo(in);
this.nodeStats = NodeStats.readNodeStats(in);
int size = in.readVInt();
shardsStats = new ShardStats[size];
for (size--; size >= 0; size--) {
shardsStats[size] = ShardStats.readShardStats(in);
}
}
示例7: readFrom
import org.elasticsearch.cluster.health.ClusterHealthStatus; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
clusterName = in.readString();
// read in a wire-compatible format for 2.x
int activePrimaryShards = in.readVInt();
int activeShards = in.readVInt();
int relocatingShards = in.readVInt();
int initializingShards = in.readVInt();
int unassignedShards = in.readVInt();
int numberOfNodes = in.readVInt();
int numberOfDataNodes = in.readVInt();
numberOfPendingTasks = in.readInt();
ClusterHealthStatus status = ClusterHealthStatus.fromValue(in.readByte());
int size = in.readVInt();
Map<String, ClusterIndexHealth> indices = new HashMap<>();
for (int i = 0; i < size; i++) {
ClusterIndexHealth indexHealth = ClusterIndexHealth.readClusterIndexHealth(in);
indices.put(indexHealth.getIndex(), indexHealth);
}
timedOut = in.readBoolean();
size = in.readVInt();
List<String> validationFailures;
if (size == 0) {
validationFailures = Collections.emptyList();
} else {
validationFailures = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
validationFailures.add(in.readString());
}
}
numberOfInFlightFetch = in.readInt();
if (in.getVersion().onOrAfter(Version.V_1_7_0)) {
delayedUnassignedShards= in.readInt();
}
double activeShardsPercent = in.readDouble();
taskMaxWaitingTime = TimeValue.readTimeValue(in);
clusterStateHealth = new ClusterStateHealth(numberOfNodes, numberOfDataNodes, activeShards, relocatingShards, activePrimaryShards,
initializingShards, unassignedShards, activeShardsPercent, status, validationFailures, indices);
}