flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #2565: [FLINK-4406] [cluster management] Implement job ma...
Date Thu, 29 Sep 2016 12:14:50 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2565#discussion_r81122520
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
---
    @@ -457,14 +505,88 @@ public Acknowledge updateTaskExecutionState(TaskExecutionState taskExecutionStat
     		return Acknowledge.get();
     	}
     
    -	/**
    -	 * Triggers the registration of the job master at the resource manager.
    -	 *
    -	 * @param address Address of the resource manager
    -	 */
    -	@RpcMethod
    -	public void registerAtResourceManager(final String address) {
    -		//TODO:: register at the RM
    +	//----------------------------------------------------------------------------------------------

    +	// Internal methods

    +	// ----------------------------------------------------------------------------------------------


    +
    +	private void handleFatalError(final Throwable cause) {
    +		runAsync(new Runnable() {
    +			@Override
    +			public void run() {
    +				log.error("Fatal error occurred on JobManager, cause: {}", cause.getMessage(), cause);
    +				shutDown();
    +				jobCompletionActions.onFatalError(cause);
    +			}
    +		});
    +	}
    +
    +	private void notifyOfNewResourceManagerLeader(
    +		final String resourceManagerAddress, final UUID resourceManagerLeaderId)
    +	{
    +		// IMPORTANT: executed by main thread to avoid concurrence
    +		runAsync(new Runnable() {
    +			@Override
    +			public void run() {
    +				if (resourceManagerConnection != null) {
    +					if (resourceManagerAddress != null) {
    --- End diff --
    
    What if the resource manager address and the leader id haven't changed since the last
registration?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message