當前位置: 首頁>>代碼示例>>Java>>正文


Java ClusterHealthStatus.fromValue方法代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:24,代碼來源:ClusterHealthRequest.java

示例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);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:24,代碼來源:ClusterHealthRequest.java

示例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);
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:16,代碼來源:ClusterStatsNodeResponse.java

示例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);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:ClusterHealthResponse.java

示例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);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:14,代碼來源:ClusterStatsResponse.java

示例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);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:16,代碼來源:ClusterStatsNodeResponse.java

示例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);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:43,代碼來源:ClusterHealthResponse.java


注:本文中的org.elasticsearch.cluster.health.ClusterHealthStatus.fromValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。