Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-8454] [flip6] Remove JobExecutionResultCache from Dispatcher #5311

Closed

Conversation

tillrohrmann
Copy link
Contributor

What is the purpose of the change

With the introduction of the SerializableExecutionGraphStore to the Dispatcher,
it is no longer necessary to store the JobResult separately. In order to
decrease complexity and state duplication, this commit removes the
JobExecutionResultCache and instead uses the SerializableExecutionGraphStore
to serve completed job information. A side effect of this change is that the
JobExecutionResult is now available as long as the completed Flink job is stored
in the SerializableExecutionGraphStore.

This PR is based on #5310.

Brief change log

  • Replace information served from JobExecutionResultCache with information from SerializableExecutionGraphStore
  • Adapt JobExecutionResultHandler

Verifying this change

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@tillrohrmann tillrohrmann force-pushed the executionResultRetrieval branch 2 times, most recently from e0085a0 to 06c2135 Compare January 19, 2018 13:33
…ableExecutionGraph

This commit changes the OnCompletionActions interface such that it accepts an
ArchivedExecutionGraph instead of a plain JobResult. This allows to
archive the completed ExecutionGraph for further usage in the container
component of the JobMasterRunner.
@@ -100,8 +97,6 @@

private final LeaderElectionService leaderElectionService;

private final JobExecutionResultCache jobExecutionResultCache = new JobExecutionResultCache();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JobExecutionResultCache and JobExecutionResultCacheTest should be also removed in this commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot about this. Will remove it.

… safe

Let JobMasterGateway#requestJob and DispatcherGateway#requestJob return a
CompletableFuture<ArchivedExecutionGraph> instead of a
CompletableFuture<AccessExecutionGraph>. In order to support the old code
and the JobManagerGateway implementation we have to keep the return type
in RestfulGateway. Once the old code has been removed, we should change
this as well.
The ArchivedExecutionGraphStore is responsible for storing completed jobs
for historic job requests (e.g. from the web ui or from the client). The store
is populated by the Dispatcher once a job has terminated.

The FileArchivedExecutionGraphStore implementation persists all
ArchivedExecutionGraphs on disk in order to avoid OOM problems. It only keeps
some of the stored graphs in memory until it reaches a configurable size. Once
coming close to this size, it will evict the elements and only reload them if
requested again. Additionally, the FileArchivedExecutionGraphStore defines
an expiration time after which the execution graphs will be removed from disk.
This prevents excessive use of disk resources.
With the introduction of the ArchivedExecutionGraphStore to the Dispatcher,
it is no longer necessary to store the JobResult separately. In order to
decrease complexity and state duplication, this commit removes the
JobExecutionResultCache and instead uses the ArchivedExecutionGraphStore
to serve completed job information. A side effect of this change is that the
JobExecutionResult is now available as long as the completed Flink job is stored
in the ArchivedExecutionGraphStore.
@tillrohrmann
Copy link
Contributor Author

Thanks for the review @GJL. I've addressed your comments in 0e72ee5 and rebased onto the latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants