Java Code Examples for org.elasticsearch.cluster.node.DiscoveryNode#readNode()

The following examples show how to use org.elasticsearch.cluster.node.DiscoveryNode#readNode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RecoveryState.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Override
public synchronized void readFrom(StreamInput in) throws IOException {
    timer.readFrom(in);
    type = Type.fromId(in.readByte());
    stage = Stage.fromId(in.readByte());
    shardId = ShardId.readShardId(in);
    restoreSource = RestoreSource.readOptionalRestoreSource(in);
    targetNode = DiscoveryNode.readNode(in);
    if (in.readBoolean()) {
        sourceNode = DiscoveryNode.readNode(in);
    }
    index.readFrom(in);
    translog.readFrom(in);
    verifyIndex.readFrom(in);
    primary = in.readBoolean();
}
 
Example 2
Source File: AllocationExplanation.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        ShardId shardId = ShardId.readShardId(in);
        int size2 = in.readVInt();
        List<NodeExplanation> ne = new ArrayList<>(size2);
        for (int j = 0; j < size2; j++) {
            DiscoveryNode node = null;
            if (in.readBoolean()) {
                node = DiscoveryNode.readNode(in);
            }
            ne.add(new NodeExplanation(node, in.readString()));
        }
        explanations.put(shardId, ne);
    }
}
 
Example 3
Source File: NodesFailureDetectionService.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    pingNode = DiscoveryNode.readNode(in);
    isDeadNode = in.readBoolean();
    clusterName = ClusterName.readClusterName(in);
    masterNode = DiscoveryNode.readNode(in);
    clusterStateVersion = in.readLong();
}
 
Example 4
Source File: LivenessResponse.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    clusterName = ClusterName.readClusterName(in);
    if (in.readBoolean()) {
        node = DiscoveryNode.readNode(in);
    } else {
        node = null;
    }
}
 
Example 5
Source File: TaskInfo.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public TaskInfo(StreamInput in) throws IOException {
    node = DiscoveryNode.readNode(in);
    taskId = new TaskId(node.getId(), in.readLong());
    type = in.readString();
    action = in.readString();
    description = in.readOptionalString();
    if (in.readBoolean()) {
        status = in.readTaskStatus();
    } else {
        status = null;
    }
    startTime = in.readLong();
    runningTimeNanos = in.readLong();
    parentTaskId = new TaskId(in);
}
 
Example 6
Source File: ClusterSearchShardsResponse.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    groups = new ClusterSearchShardsGroup[in.readVInt()];
    for (int i = 0; i < groups.length; i++) {
        groups[i] = ClusterSearchShardsGroup.readSearchShardsGroupResponse(in);
    }
    nodes = new DiscoveryNode[in.readVInt()];
    for (int i = 0; i < nodes.length; i++) {
        nodes[i] = DiscoveryNode.readNode(in);
    }

}
 
Example 7
Source File: VerifyRepositoryResponse.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    clusterName = ClusterName.readClusterName(in);
    nodes = new DiscoveryNode[in.readVInt()];
    for (int i=0; i<nodes.length; i++){
        nodes[i] = DiscoveryNode.readNode(in);
    }
}
 
Example 8
Source File: IndicesShardStoresResponse.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    node = DiscoveryNode.readNode(in);
    version = in.readLong();
    allocation = Allocation.readFrom(in);
    if (in.readBoolean()) {
        storeException = in.readThrowable();
    }
}
 
Example 9
Source File: LocalAllocateDangledIndices.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    fromNode = DiscoveryNode.readNode(in);
    indices = new IndexMetaData[in.readVInt()];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = IndexMetaData.Builder.readFrom(in);
    }
}
 
Example 10
Source File: ConnectTransportException.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public ConnectTransportException(StreamInput in) throws IOException {
    super(in);
    if (in.readBoolean()) {
        node = DiscoveryNode.readNode(in);
    } else {
        node = null;
    }
}
 
Example 11
Source File: NodesFaultDetection.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    nodeId = in.readString();
    clusterName = ClusterName.readClusterName(in);
    masterNode = DiscoveryNode.readNode(in);
    clusterStateVersion = in.readLong();
}
 
Example 12
Source File: StartRecoveryRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    sourceNode = DiscoveryNode.readNode(in);
    targetNode = DiscoveryNode.readNode(in);
    markAsRelocated = in.readBoolean();
    metadataSnapshot = new Store.MetadataSnapshot(in);
    recoveryType = RecoveryState.Type.fromId(in.readByte());

}
 
Example 13
Source File: MembershipAction.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    node = DiscoveryNode.readNode(in);
}
 
Example 14
Source File: MembershipAction.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    node = DiscoveryNode.readNode(in);
}
 
Example 15
Source File: IndicesStore.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    shardActive = in.readBoolean();
    node = DiscoveryNode.readNode(in);
}
 
Example 16
Source File: JoinClusterAction.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    node = DiscoveryNode.readNode(in);
}
 
Example 17
Source File: PullFullClusterStateAction.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    this.clusterName = ClusterName.readClusterName(in);
    this.requestNode = DiscoveryNode.readNode(in);
}
 
Example 18
Source File: BaseNodeResponse.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    node = DiscoveryNode.readNode(in);
}