use of org.apache.flink.runtime.state.heap.HeapKeyedStateBackendBuilder in project flink by apache.
the class StateBackendBenchmarkUtils method createHeapKeyedStateBackend.
private static HeapKeyedStateBackend<Long> createHeapKeyedStateBackend(File rootDir) throws IOException {
File recoveryBaseDir = prepareDirectory(recoveryDirName, rootDir);
KeyGroupRange keyGroupRange = new KeyGroupRange(0, 1);
int numberOfKeyGroups = keyGroupRange.getNumberOfKeyGroups();
ExecutionConfig executionConfig = new ExecutionConfig();
HeapPriorityQueueSetFactory priorityQueueSetFactory = new HeapPriorityQueueSetFactory(keyGroupRange, numberOfKeyGroups, 128);
HeapKeyedStateBackendBuilder<Long> backendBuilder = new HeapKeyedStateBackendBuilder<>(null, new LongSerializer(), Thread.currentThread().getContextClassLoader(), numberOfKeyGroups, keyGroupRange, executionConfig, TtlTimeProvider.DEFAULT, LatencyTrackingStateConfig.disabled(), Collections.emptyList(), AbstractStateBackend.getCompressionDecorator(executionConfig), new LocalRecoveryConfig(null), priorityQueueSetFactory, false, new CloseableRegistry());
return backendBuilder.build();
}
Aggregations