Search in sources :

Example 1 with NodeMessageResponse

use of com.yahoo.vespa.hosted.node.admin.configserver.noderepository.bindings.NodeMessageResponse in project vespa by vespa-engine.

the class RealNodeRepository method markNodeToState.

private void markNodeToState(String hostName, String state) {
    NodeMessageResponse response = configServerApi.put("/nodes/v2/state/" + state + "/" + hostName, Optional.empty(), /* body */
    NodeMessageResponse.class);
    NODE_ADMIN_LOGGER.info(response.message);
    if (response.errorCode == null || response.errorCode.isEmpty()) {
        return;
    }
    throw new RuntimeException("Unexpected message " + response.message + " " + response.errorCode);
}
Also used : NodeMessageResponse(com.yahoo.vespa.hosted.node.admin.configserver.noderepository.bindings.NodeMessageResponse)

Aggregations

NodeMessageResponse (com.yahoo.vespa.hosted.node.admin.configserver.noderepository.bindings.NodeMessageResponse)1