Codota Logo
RocksDbKeyValueReader.getSerdeFromName
Code IndexAdd Codota to your IDE (free)

How to use
getSerdeFromName
method
in
org.apache.samza.storage.kv.RocksDbKeyValueReader

Best Java code snippets using org.apache.samza.storage.kv.RocksDbKeyValueReader.getSerdeFromName (Showing top 3 results out of 315)

  • Common ways to obtain RocksDbKeyValueReader
private void myMethod () {
RocksDbKeyValueReader r =
  • Codota IconString storeName;String dbPath;Config config;new RocksDbKeyValueReader(storeName, dbPath, config)
  • Smart code suggestions by Codota
}
origin: apache/samza

/**
 * Construct the <code>RocksDbKeyValueReader</code> with store's name,
 * database's path and Samza's config
 *
 * @param storeName name of the RocksDb defined in the config file
 * @param dbPath path to the db directory
 * @param config Samza's config
 */
public RocksDbKeyValueReader(String storeName, String dbPath, Config config) {
 // get the key serde and value serde from the config
 JavaStorageConfig storageConfig = new JavaStorageConfig(config);
 JavaSerializerConfig serializerConfig = new JavaSerializerConfig(config);
 keySerde = getSerdeFromName(storageConfig.getStorageKeySerde(storeName), serializerConfig);
 valueSerde = getSerdeFromName(storageConfig.getStorageMsgSerde(storeName), serializerConfig);
 // get db options
 Options options = RocksDbOptionsHelper.options(config, 1, new File(dbPath), StorageEngineFactory.StoreMode.ReadWrite);
 // open the db
 RocksDB.loadLibrary();
 try {
  db = RocksDB.openReadOnly(options, dbPath);
 } catch (RocksDBException e) {
  throw new SamzaException("can not open the rocksDb in " + dbPath, e);
 }
}
origin: org.apache.samza/samza-kv-rocksdb

/**
 * Construct the <code>RocksDbKeyValueReader</code> with store's name,
 * database's path and Samza's config
 *
 * @param storeName name of the RocksDb defined in the config file
 * @param dbPath path to the db directory
 * @param config Samza's config
 */
public RocksDbKeyValueReader(String storeName, String dbPath, Config config) {
 // get the key serde and value serde from the config
 JavaStorageConfig storageConfig = new JavaStorageConfig(config);
 JavaSerializerConfig serializerConfig = new JavaSerializerConfig(config);
 keySerde = getSerdeFromName(storageConfig.getStorageKeySerde(storeName), serializerConfig);
 valueSerde = getSerdeFromName(storageConfig.getStorageMsgSerde(storeName), serializerConfig);
 // get db options
 Options options = RocksDbOptionsHelper.options(config, 1);
 // open the db
 RocksDB.loadLibrary();
 try {
  db = RocksDB.openReadOnly(options, dbPath);
 } catch (RocksDBException e) {
  throw new SamzaException("can not open the rocksDb in " + dbPath, e);
 }
}
origin: org.apache.samza/samza-kv-rocksdb_2.11

/**
 * Construct the <code>RocksDbKeyValueReader</code> with store's name,
 * database's path and Samza's config
 *
 * @param storeName name of the RocksDb defined in the config file
 * @param dbPath path to the db directory
 * @param config Samza's config
 */
public RocksDbKeyValueReader(String storeName, String dbPath, Config config) {
 // get the key serde and value serde from the config
 JavaStorageConfig storageConfig = new JavaStorageConfig(config);
 JavaSerializerConfig serializerConfig = new JavaSerializerConfig(config);
 keySerde = getSerdeFromName(storageConfig.getStorageKeySerde(storeName), serializerConfig);
 valueSerde = getSerdeFromName(storageConfig.getStorageMsgSerde(storeName), serializerConfig);
 // get db options
 Options options = RocksDbOptionsHelper.options(config, 1);
 // open the db
 RocksDB.loadLibrary();
 try {
  db = RocksDB.openReadOnly(options, dbPath);
 } catch (RocksDBException e) {
  throw new SamzaException("can not open the rocksDb in " + dbPath, e);
 }
}
org.apache.samza.storage.kvRocksDbKeyValueReadergetSerdeFromName

Javadoc

A helper method to get the Serde from the serdeName

Popular methods of RocksDbKeyValueReader

  • <init>
    Construct the RocksDbKeyValueReader with store's name, database's path and Samza's config
  • get
    get the value from the key. This key will be serialized to bytes using the serde defined in systems.
  • stop

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now