Search in sources :

Example 1 with UnknownMasterException

use of com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.UnknownMasterException in project vespa by vespa-engine.

the class Request method doRemoteFleetControllerTask.

@Override
public final void doRemoteFleetControllerTask(Context context) {
    try {
        if (masterState == MasterState.MUST_BE_MASTER && !context.masterInfo.isMaster()) {
            Integer masterIndex = context.masterInfo.getMaster();
            if (masterIndex == null)
                throw new UnknownMasterException();
            throw new OtherMasterIndexException(masterIndex);
        }
        result = calculateResult(context);
        resultSet = true;
    } catch (OtherMasterIndexException | StateRestApiException e) {
        failure = e;
    } catch (Exception e) {
        failure = new InternalFailure("Caught unexpected exception");
        failure.initCause(e);
    }
}
Also used : UnknownMasterException(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.UnknownMasterException) StateRestApiException(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.StateRestApiException) InternalFailure(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.InternalFailure) StateRestApiException(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.StateRestApiException) DeadlineExceededException(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.DeadlineExceededException) UnknownMasterException(com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.UnknownMasterException)

Aggregations

DeadlineExceededException (com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.DeadlineExceededException)1 InternalFailure (com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.InternalFailure)1 StateRestApiException (com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.StateRestApiException)1 UnknownMasterException (com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.UnknownMasterException)1