Search in sources :

Example 1 with RocksDbKeyValueStore

use of org.apache.samza.storage.kv.RocksDbKeyValueStore in project beam by apache.

the class SamzaTimerInternalsFactoryTest method createStore.

private KeyValueStore<ByteArray, StateValue<?>> createStore() {
    final Options options = new Options();
    options.setCreateIfMissing(true);
    RocksDbKeyValueStore rocksStore = new RocksDbKeyValueStore(temporaryFolder.getRoot(), options, new MapConfig(), false, "beamStore", new WriteOptions(), new FlushOptions(), new KeyValueStoreMetrics("beamStore", new MetricsRegistryMap()));
    return new SerializedKeyValueStore<>(rocksStore, new ByteArraySerdeFactory.ByteArraySerde(), new StateValueSerdeFactory.StateValueSerde(), new SerializedKeyValueStoreMetrics("beamStore", new MetricsRegistryMap()));
}
Also used : FlushOptions(org.rocksdb.FlushOptions) WriteOptions(org.rocksdb.WriteOptions) SamzaPipelineOptions(org.apache.beam.runners.samza.SamzaPipelineOptions) Options(org.rocksdb.Options) SerializedKeyValueStoreMetrics(org.apache.samza.storage.kv.SerializedKeyValueStoreMetrics) KeyValueStoreMetrics(org.apache.samza.storage.kv.KeyValueStoreMetrics) ByteArraySerdeFactory(org.apache.beam.runners.samza.runtime.SamzaStoreStateInternals.ByteArraySerdeFactory) FlushOptions(org.rocksdb.FlushOptions) SerializedKeyValueStoreMetrics(org.apache.samza.storage.kv.SerializedKeyValueStoreMetrics) WriteOptions(org.rocksdb.WriteOptions) SerializedKeyValueStore(org.apache.samza.storage.kv.SerializedKeyValueStore) MapConfig(org.apache.samza.config.MapConfig) StateValueSerdeFactory(org.apache.beam.runners.samza.runtime.SamzaStoreStateInternals.StateValueSerdeFactory) MetricsRegistryMap(org.apache.samza.metrics.MetricsRegistryMap) RocksDbKeyValueStore(org.apache.samza.storage.kv.RocksDbKeyValueStore)

Aggregations

SamzaPipelineOptions (org.apache.beam.runners.samza.SamzaPipelineOptions)1 ByteArraySerdeFactory (org.apache.beam.runners.samza.runtime.SamzaStoreStateInternals.ByteArraySerdeFactory)1 StateValueSerdeFactory (org.apache.beam.runners.samza.runtime.SamzaStoreStateInternals.StateValueSerdeFactory)1 MapConfig (org.apache.samza.config.MapConfig)1 MetricsRegistryMap (org.apache.samza.metrics.MetricsRegistryMap)1 KeyValueStoreMetrics (org.apache.samza.storage.kv.KeyValueStoreMetrics)1 RocksDbKeyValueStore (org.apache.samza.storage.kv.RocksDbKeyValueStore)1 SerializedKeyValueStore (org.apache.samza.storage.kv.SerializedKeyValueStore)1 SerializedKeyValueStoreMetrics (org.apache.samza.storage.kv.SerializedKeyValueStoreMetrics)1 FlushOptions (org.rocksdb.FlushOptions)1 Options (org.rocksdb.Options)1 WriteOptions (org.rocksdb.WriteOptions)1