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);
}
}
Aggregations