while (true) {
try {
// TODO jz: poll only for a certain amount of time and then execute a
// global check operation ?
MasterOperation operation = _queue.peek();
List<OperationId> nodeOperationIds = null;
try {
List<MasterOperation> runningOperations = _registry.getRunningOperations();
ExecutionInstruction instruction = operation.getExecutionInstruction(runningOperations);
nodeOperationIds = executeOperation(operation, instruction, runningOperations);
} catch (Exception e) {
ExceptionUtil.rethrowInterruptedException(e);
LOG.error("failed to execute " + operation, e);
}