public class ExecutionGraphCache extends Object implements Closeable
AccessExecutionGraph
which are obtained from the Flink cluster. Every cache entry
has an associated time to live after which a new request will trigger the reloading of the
AccessExecutionGraph
from the cluster.Constructor and Description |
---|
ExecutionGraphCache(Time timeout,
Time timeToLive) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Perform the cleanup of out dated
ExecutionGraphEntry . |
void |
close() |
CompletableFuture<AccessExecutionGraph> |
getExecutionGraph(JobID jobId,
RestfulGateway restfulGateway)
Gets the
AccessExecutionGraph for the given JobID and caches it. |
int |
size()
Gets the number of cache entries.
|
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public int size()
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway)
AccessExecutionGraph
for the given JobID
and caches it. The
AccessExecutionGraph
will be requested again after the refresh interval has passed
or if the graph could not be retrieved from the given gateway.jobId
- identifying the AccessExecutionGraph
to getrestfulGateway
- to request the AccessExecutionGraph
fromAccessExecutionGraph
public void cleanup()
ExecutionGraphEntry
.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.