private void runMigrationOperation(Operation op) throws Exception { prepareOperation(op); op.beforeRun(); op.run(); op.afterRun(); }
private void runMigrationOperation(Operation op) throws Exception { prepareOperation(op); op.beforeRun(); op.run(); op.afterRun(); }
@Override public void run() throws Exception { if (operations != null && operations.length > 0) { for (Operation op : operations) { try { // not running via OperationService since we don't want any restrictions like cluster state check etc. op.beforeRun(); op.run(); op.afterRun(); } catch (Exception e) { getLogger().warning("Error while running post-join operation: " + op, e); } } } }
@Override public void run() throws Exception { if (operations != null && operations.length > 0) { for (Operation op : operations) { try { // not running via OperationService since we don't want any restrictions like cluster state check etc. op.beforeRun(); op.run(); op.afterRun(); } catch (Exception e) { getLogger().warning("Error while running post-join operation: " + op, e); } } } }
private void executeOperations() { int partitionId = getPartitionId(); int replicaIndex = getReplicaIndex(); if (operations != null && !operations.isEmpty()) { logApplyReplicaSync(partitionId, replicaIndex); for (Operation op : operations) { prepareOperation(op); try { op.beforeRun(); op.run(); op.afterRun(); } catch (Throwable e) { onOperationFailure(op, e); logException(op, e); } } } else { logEmptyTaskList(partitionId, replicaIndex); } }
private void executeOperations() { int partitionId = getPartitionId(); int replicaIndex = getReplicaIndex(); if (operations != null && !operations.isEmpty()) { logApplyReplicaSync(partitionId, replicaIndex); for (Operation op : operations) { prepareOperation(op); try { op.beforeRun(); op.run(); op.afterRun(); } catch (Throwable e) { onOperationFailure(op, e); logException(op, e); } } } else { logEmptyTaskList(partitionId, replicaIndex); } }
@Override public void run() throws Exception { for (Operation op : opList) { op.setNodeEngine(getNodeEngine()).setServiceName(getServiceName()).setPartitionId(getPartitionId()); op.beforeRun(); op.run(); op.afterRun(); } // changed to forceUnlock because replica-sync of lock causes problems, same as IMap // real solution is to make 'lock-and-get' backup-aware getOrCreateContainerWithoutAccess().forceUnlock(dataKey); }
@Override public void run() throws Exception { for (Operation op : opList) { op.setNodeEngine(getNodeEngine()).setServiceName(getServiceName()).setPartitionId(getPartitionId()); op.beforeRun(); op.run(); op.afterRun(); } // changed to forceUnlock because replica-sync of lock causes problems, same as IMap // real solution is to make 'lock-and-get' backup-aware getOrCreateContainerWithoutAccess().forceUnlock(dataKey); }
public static void before(List<Operation> operationList, Operation wrapper) throws Exception { for (Operation operation : operationList) { operation.setService(wrapper.getService()); operation.setServiceName(wrapper.getServiceName()); operation.setCallerUuid(wrapper.getCallerUuid()); operation.setNodeEngine(wrapper.getNodeEngine()); operation.setPartitionId(wrapper.getPartitionId()); operation.beforeRun(); } }
public static void before(List<Operation> operationList, Operation wrapper) throws Exception { for (Operation operation : operationList) { operation.setService(wrapper.getService()); operation.setServiceName(wrapper.getServiceName()); operation.setCallerUuid(wrapper.getCallerUuid()); operation.setNodeEngine(wrapper.getNodeEngine()); operation.setPartitionId(wrapper.getPartitionId()); operation.beforeRun(); } }
@Override public void run() throws Exception { if (validationFailure != null) { onExecutionFailure(validationFailure); return; } ensureBackupOperationInitialized(); backupOp.beforeRun(); backupOp.run(); backupOp.afterRun(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); PartitionReplicaVersionManager versionManager = nodeEngine.getPartitionService().getPartitionReplicaVersionManager(); versionManager.updatePartitionReplicaVersions(getPartitionId(), namespace, replicaVersions, getReplicaIndex()); }
@Override public void run() throws Exception { if (validationFailure != null) { onExecutionFailure(validationFailure); return; } ensureBackupOperationInitialized(); backupOp.beforeRun(); backupOp.run(); backupOp.afterRun(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); PartitionReplicaVersionManager versionManager = nodeEngine.getPartitionService().getPartitionReplicaVersionManager(); versionManager.updatePartitionReplicaVersions(getPartitionId(), namespace, replicaVersions, getReplicaIndex()); }
@Override public void run(Operation op) { executedOperationsCounter.inc(); boolean publishCurrentTask = publishCurrentTask(); if (publishCurrentTask) { currentTask = op; } try { checkNodeState(op); if (timeout(op)) { return; } ensureNoPartitionProblems(op); ensureQuorumPresent(op); op.beforeRun(); call(op); } catch (Throwable e) { handleOperationError(op, e); } finally { if (publishCurrentTask) { currentTask = null; } } }
@Override public void run(Operation op) { executedOperationsCounter.inc(); boolean publishCurrentTask = publishCurrentTask(); if (publishCurrentTask) { currentTask = op; } try { checkNodeState(op); if (timeout(op)) { return; } ensureNoPartitionProblems(op); ensureQuorumPresent(op); op.beforeRun(); call(op); } catch (Throwable e) { handleOperationError(op, e); } finally { if (publishCurrentTask) { currentTask = null; } } }
@Override public void run() throws Exception { for (Operation op : opList) { op.setNodeEngine(getNodeEngine()) .setServiceName(getServiceName()) .setPartitionId(getPartitionId()); op.beforeRun(); op.run(); op.afterRun(); } getOrCreateContainer().unlock(dataKey, getCallerUuid(), threadId, getCallId()); }
@Override public void run() throws Exception { for (Operation op : opList) { op.setNodeEngine(getNodeEngine()) .setServiceName(getServiceName()) .setPartitionId(getPartitionId()); op.beforeRun(); op.run(); op.afterRun(); } getOrCreateContainer().unlock(dataKey, getCallerUuid(), threadId, getCallId()); }