@Override protected Address masterAddress() { return container().getMasterAddress(); }
@Override protected InvocationBuilder getInvocationBuilder(Operation operation) { return nodeEngine.getOperationService().createInvocationBuilder(JetService.SERVICE_NAME, operation, nodeEngine.getMasterAddress()); }
public ExecutionContext assertExecutionContext(Address coordinator, long jobId, long executionId, String callerOpName) { Address masterAddress = nodeEngine.getMasterAddress(); if (!coordinator.equals(masterAddress)) { failIfNotRunning(); throw new IllegalStateException(String.format( "Coordinator %s cannot do '%s' for %s: it is not the master, the master is %s", coordinator, callerOpName, jobIdAndExecutionId(jobId, executionId), masterAddress)); } failIfNotRunning(); ExecutionContext executionContext = executionContexts.get(executionId); if (executionContext == null) { throw new TopologyChangedException(String.format( "%s not found for coordinator %s for '%s'", jobIdAndExecutionId(jobId, executionId), coordinator, callerOpName)); } else if (!(executionContext.coordinator().equals(coordinator) && executionContext.jobId() == jobId)) { throw new IllegalStateException(String.format( "%s, originally from coordinator %s, cannot do '%s' by coordinator %s and execution %s", executionContext.jobNameAndExecutionId(), executionContext.coordinator(), callerOpName, coordinator, idToString(executionId))); } return executionContext; }
try { do { Address masterAddress = nodeEngine.getMasterAddress(); if (masterAddress == null) { logger.warning("Safe shutdown failed, master member is not known!");
try { do { Address masterAddress = nodeEngine.getMasterAddress(); if (masterAddress == null) { logger.warning("Safe shutdown failed, master member is not known!");
void beforeClusterStateChange(ClusterState requestedState) { if (requestedState != PASSIVE) { return; } logger.info("Jet is preparing to enter the PASSIVE cluster state"); NodeEngineImpl ne = node.nodeEngine; try { ne.getOperationService().createInvocationBuilder(JetService.SERVICE_NAME, new PrepareForPassiveClusterOperation(), ne.getMasterAddress()) .invoke().get(); } catch (InterruptedException | ExecutionException e) { throw rethrow(e); } }
private void verifyClusterInformation(long jobId, long executionId, Address coordinator, int coordinatorMemberListVersion, Set<MemberInfo> participants) { Address masterAddress = nodeEngine.getMasterAddress(); if (!coordinator.equals(masterAddress)) { failIfNotRunning();