@Override protected Object envelopeSelfMessage(Object message) { final F fencingToken = rpcEndpoint.getFencingToken(); return new LocalFencedMessage<>(fencingToken, message); } }
protected void setFencingToken(@Nullable F newFencingToken) { // this method should only be called from within the main thread validateRunsInMainThread(); this.fencingToken = newFencingToken; // setting a new fencing token entails that we need a new MainThreadExecutor // which is bound to the new fencing token MainThreadExecutable mainThreadExecutable = getRpcService().fenceRpcServer( rpcServer, newFencingToken); this.fencedMainThreadExecutor = new MainThreadExecutor(mainThreadExecutable); }
/** * Start the rpc service and begin to run the job. * * @param newJobMasterId The necessary fencing token to run the job * @param timeout for the operation * @return Future acknowledge if the job could be started. Otherwise the future contains an exception */ public CompletableFuture<Acknowledge> start(final JobMasterId newJobMasterId, final Time timeout) throws Exception { // make sure we receive RPC and async calls super.start(); return callAsyncWithoutFencing(() -> startJobExecution(newJobMasterId), timeout); }
if (message instanceof FencedMessage) { final F expectedFencingToken = rpcEndpoint.getFencingToken(); "Fencing token not set: Ignoring message %s sent to %s because the fencing token is null.", message, rpcEndpoint.getAddress()))); } else { @SuppressWarnings("unchecked")
protected FencedRpcEndpoint(RpcService rpcService, String endpointId) { super(rpcService, endpointId); Preconditions.checkArgument( rpcServer instanceof FencedMainThreadExecutable, "The rpcServer must be of type %s.", FencedMainThreadExecutable.class.getSimpleName()); // no fencing token == no leadership this.fencingToken = null; this.unfencedMainThreadExecutor = new UnfencedMainThreadExecutor((FencedMainThreadExecutable) rpcServer); this.fencedMainThreadExecutor = new MainThreadExecutor( getRpcService().fenceRpcServer( rpcServer, null)); }
if (message instanceof FencedMessage) { final F expectedFencingToken = rpcEndpoint.getFencingToken(); "Fencing token not set: Ignoring message %s sent to %s because the fencing token is null.", message, rpcEndpoint.getAddress()))); } else { @SuppressWarnings("unchecked")
protected FencedRpcEndpoint(RpcService rpcService, String endpointId) { super(rpcService, endpointId); Preconditions.checkArgument( rpcServer instanceof FencedMainThreadExecutable, "The rpcServer must be of type %s.", FencedMainThreadExecutable.class.getSimpleName()); // no fencing token == no leadership this.fencingToken = null; this.unfencedMainThreadExecutor = new UnfencedMainThreadExecutor((FencedMainThreadExecutable) rpcServer); this.fencedMainThreadExecutor = new MainThreadExecutor( getRpcService().fenceRpcServer( rpcServer, null)); }
protected void setFencingToken(@Nullable F newFencingToken) { // this method should only be called from within the main thread validateRunsInMainThread(); this.fencingToken = newFencingToken; // setting a new fencing token entails that we need a new MainThreadExecutor // which is bound to the new fencing token MainThreadExecutable mainThreadExecutable = getRpcService().fenceRpcServer( rpcServer, newFencingToken); this.fencedMainThreadExecutor = new MainThreadExecutor(mainThreadExecutable); }
if (message instanceof FencedMessage) { final F expectedFencingToken = rpcEndpoint.getFencingToken(); "Fencing token not set: Ignoring message %s sent to %s because the fencing token is null.", message, rpcEndpoint.getAddress()))); } else { @SuppressWarnings("unchecked")
/** * Start the rpc service and begin to run the job. * * @param newJobMasterId The necessary fencing token to run the job * @param timeout for the operation * @return Future acknowledge if the job could be started. Otherwise the future contains an exception */ public CompletableFuture<Acknowledge> start(final JobMasterId newJobMasterId, final Time timeout) throws Exception { // make sure we receive RPC and async calls super.start(); return callAsyncWithoutFencing(() -> startJobExecution(newJobMasterId), timeout); }
@Override protected Object envelopeSelfMessage(Object message) { final F fencingToken = rpcEndpoint.getFencingToken(); return new LocalFencedMessage<>(fencingToken, message); } }
protected FencedRpcEndpoint(RpcService rpcService, String endpointId) { super(rpcService, endpointId); Preconditions.checkArgument( rpcServer instanceof FencedMainThreadExecutable, "The rpcServer must be of type %s.", FencedMainThreadExecutable.class.getSimpleName()); // no fencing token == no leadership this.fencingToken = null; this.unfencedMainThreadExecutor = new UnfencedMainThreadExecutor((FencedMainThreadExecutable) rpcServer); this.fencedMainThreadExecutor = new MainThreadExecutor( getRpcService().fenceRpcServer( rpcServer, null)); }
protected void setFencingToken(@Nullable F newFencingToken) { // this method should only be called from within the main thread validateRunsInMainThread(); this.fencingToken = newFencingToken; // setting a new fencing token entails that we need a new MainThreadExecutor // which is bound to the new fencing token MainThreadExecutable mainThreadExecutable = getRpcService().fenceRpcServer( rpcServer, newFencingToken); this.fencedMainThreadExecutor = new MainThreadExecutor(mainThreadExecutable); }
@Override public void start() throws Exception { super.start(); submittedJobGraphStore.start(this); leaderElectionService.start(this); }
@Override protected Object envelopeSelfMessage(Object message) { final F fencingToken = rpcEndpoint.getFencingToken(); return new LocalFencedMessage<>(fencingToken, message); } }
/** * Start the rpc service and begin to run the job. * * @param newJobMasterId The necessary fencing token to run the job * @param timeout for the operation * @return Future acknowledge if the job could be started. Otherwise the future contains an exception */ public CompletableFuture<Acknowledge> start(final JobMasterId newJobMasterId, final Time timeout) throws Exception { // make sure we receive RPC and async calls super.start(); return callAsyncWithoutFencing(() -> startJobExecution(newJobMasterId), timeout); }
@Override public void start() throws Exception { super.start(); submittedJobGraphStore.start(this); leaderElectionService.start(this); registerDispatcherMetrics(jobManagerMetricGroup); }
@Override public void start() throws Exception { super.start(); submittedJobGraphStore.start(this); leaderElectionService.start(this); registerDispatcherMetrics(jobManagerMetricGroup); }
@Override public void start() throws Exception { // start a leader super.start(); leaderElectionService = highAvailabilityServices.getResourceManagerLeaderElectionService(); try { leaderElectionService.start(this); } catch (Exception e) { throw new ResourceManagerException("Could not start the leader election service.", e); } try { jobLeaderIdService.start(new JobLeaderIdActionsImpl()); } catch (Exception e) { throw new ResourceManagerException("Could not start the job leader id service.", e); } initialize(); }
@Override public void start() throws Exception { // start a leader super.start(); leaderElectionService = highAvailabilityServices.getResourceManagerLeaderElectionService(); initialize(); try { leaderElectionService.start(this); } catch (Exception e) { throw new ResourceManagerException("Could not start the leader election service.", e); } try { jobLeaderIdService.start(new JobLeaderIdActionsImpl()); } catch (Exception e) { throw new ResourceManagerException("Could not start the job leader id service.", e); } registerSlotAndTaskExecutorMetrics(); }