org.apache.flink.contrib.streaming.state.restore.RocksDBNoneRestoreOperation Java Examples

The following examples show how to use org.apache.flink.contrib.streaming.state.restore.RocksDBNoneRestoreOperation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RocksDBKeyedStateBackendBuilder.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private AbstractRocksDBRestoreOperation<K> getRocksDBRestoreOperation(
	int keyGroupPrefixBytes,
	CloseableRegistry cancelStreamRegistry,
	LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation,
	RocksDbTtlCompactFiltersManager ttlCompactFiltersManager) {
	if (restoreStateHandles.isEmpty()) {
		return new RocksDBNoneRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	}
	KeyedStateHandle firstStateHandle = restoreStateHandles.iterator().next();
	if (firstStateHandle instanceof IncrementalKeyedStateHandle) {
		return new RocksDBIncrementalRestoreOperation<>(
			operatorIdentifier,
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	} else {
		return new RocksDBFullRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	}
}
 
Example #2
Source File: RocksDBKeyedStateBackendBuilder.java    From flink with Apache License 2.0 4 votes vote down vote up
private AbstractRocksDBRestoreOperation<K> getRocksDBRestoreOperation(
	int keyGroupPrefixBytes,
	CloseableRegistry cancelStreamRegistry,
	LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation,
	RocksDbTtlCompactFiltersManager ttlCompactFiltersManager) {
	if (restoreStateHandles.isEmpty()) {
		return new RocksDBNoneRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	}
	KeyedStateHandle firstStateHandle = restoreStateHandles.iterator().next();
	if (firstStateHandle instanceof IncrementalKeyedStateHandle) {
		return new RocksDBIncrementalRestoreOperation<>(
			operatorIdentifier,
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	} else {
		return new RocksDBFullRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	}
}
 
Example #3
Source File: RocksDBKeyedStateBackendBuilder.java    From flink with Apache License 2.0 4 votes vote down vote up
private AbstractRocksDBRestoreOperation<K> getRocksDBRestoreOperation(
	int keyGroupPrefixBytes,
	CloseableRegistry cancelStreamRegistry,
	LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation,
	RocksDbTtlCompactFiltersManager ttlCompactFiltersManager) {
	DBOptions dbOptions = optionsContainer.getDbOptions();
	if (restoreStateHandles.isEmpty()) {
		return new RocksDBNoneRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager);
	}
	KeyedStateHandle firstStateHandle = restoreStateHandles.iterator().next();
	if (firstStateHandle instanceof IncrementalKeyedStateHandle) {
		return new RocksDBIncrementalRestoreOperation<>(
			operatorIdentifier,
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager,
			writeBatchSize);
	} else {
		return new RocksDBFullRestoreOperation<>(
			keyGroupRange,
			keyGroupPrefixBytes,
			numberOfTransferingThreads,
			cancelStreamRegistry,
			userCodeClassLoader,
			kvStateInformation,
			keySerializerProvider,
			instanceBasePath,
			instanceRocksDBPath,
			dbOptions,
			columnFamilyOptionsFactory,
			nativeMetricOptions,
			metricGroup,
			restoreStateHandles,
			ttlCompactFiltersManager,
			writeBatchSize);
	}
}