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

The following examples show how to use org.elasticsearch.cluster.node.DiscoveryNode#readNode() . These examples are extracted from open source projects. 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 Project: Elasticsearch   File: RecoveryState.java    License: 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
@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
@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
@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 5
@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 6
public ConnectTransportException(StreamInput in) throws IOException {
    super(in);
    if (in.readBoolean()) {
        node = DiscoveryNode.readNode(in);
    } else {
        node = null;
    }
}
 
Example 7
@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 8
@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
@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 10
@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 11
Source Project: Elasticsearch   File: TaskInfo.java    License: 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 12
Source Project: Elasticsearch   File: LivenessResponse.java    License: 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 13
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    this.clusterName = ClusterName.readClusterName(in);
    this.requestNode = DiscoveryNode.readNode(in);
}
 
Example 14
Source Project: Elasticsearch   File: JoinClusterAction.java    License: 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 Project: Elasticsearch   File: IndicesStore.java    License: 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 Project: Elasticsearch   File: MembershipAction.java    License: 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 Project: Elasticsearch   File: MembershipAction.java    License: 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 18
Source Project: Elasticsearch   File: BaseNodeResponse.java    License: 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);
}