use of org.apache.flink.runtime.dispatcher.FileExecutionGraphInfoStore in project flink by apache.
the class SessionClusterEntrypoint method createSerializableExecutionGraphStore.
@Override
protected ExecutionGraphInfoStore createSerializableExecutionGraphStore(Configuration configuration, ScheduledExecutor scheduledExecutor) throws IOException {
final JobManagerOptions.JobStoreType jobStoreType = configuration.get(JobManagerOptions.JOB_STORE_TYPE);
final Time expirationTime = Time.seconds(configuration.getLong(JobManagerOptions.JOB_STORE_EXPIRATION_TIME));
final int maximumCapacity = configuration.getInteger(JobManagerOptions.JOB_STORE_MAX_CAPACITY);
switch(jobStoreType) {
case File:
{
final File tmpDir = new File(ConfigurationUtils.parseTempDirectories(configuration)[0]);
final long maximumCacheSizeBytes = configuration.getLong(JobManagerOptions.JOB_STORE_CACHE_SIZE);
return new FileExecutionGraphInfoStore(tmpDir, expirationTime, maximumCapacity, maximumCacheSizeBytes, scheduledExecutor, Ticker.systemTicker());
}
case Memory:
{
return new MemoryExecutionGraphInfoStore(expirationTime, maximumCapacity, scheduledExecutor, Ticker.systemTicker());
}
default:
{
throw new IllegalArgumentException("Unsupported job store type " + jobStoreType);
}
}
}
Aggregations