congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RocksDbKeyValueReader.stop
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/samza

@Test
public void testReadCorrectDbValue() throws RocksDBException {
 HashMap<String, String> map = new HashMap<String, String>();
 map.put("stores." + DB_NAME + ".factory", "mockFactory");
 map.put("stores." + DB_NAME + ".key.serde", "string");
 map.put("stores." + DB_NAME + ".msg.serde", "string");
 Config config = new MapConfig(map);
 RocksDbKeyValueReader reader = new RocksDbKeyValueReader(DB_NAME, dirPath.toString(), config);
 assertEquals("this is string", reader.get("testString"));
 // should throw exception if the input is in other type
 boolean throwClassCastException = false;
 try {
  reader.get(123);
 } catch (Exception e) {
  if (e instanceof ClassCastException) {
   throwClassCastException = true;
  }
 }
 assertTrue(throwClassCastException);
 reader.stop();
 // test with customized serde
 map.put("serializers.registry.mock.class", IntegerSerdeFactory.class.getCanonicalName());
 map.put("stores." + DB_NAME + ".key.serde", "mock");
 map.put("stores." + DB_NAME + ".msg.serde", "mock");
 config = new MapConfig(map);
 reader = new RocksDbKeyValueReader(DB_NAME, dirPath.toString(), config);
 assertEquals(456, reader.get(123));
 assertNull(reader.get(789));
 reader.stop();
}
origin: org.apache.samza/samza-kv-rocksdb_2.11

 public static void main(String[] args) throws RocksDBException {
  RocksDbReadingTool tool = new RocksDbReadingTool();
  OptionSet options = tool.parser().parse(args);
  MapConfig config = tool.loadConfig(options);
  String path = tool.getDbPath();
  String dbName = tool.getDbName();
  RocksDbKeyValueReader kvReader = new RocksDbKeyValueReader(dbName, path, config);

  for (Object obj : tool.getKeys()) {
   Object result = kvReader.get(obj);
   tool.outputResult(obj, result);
  }

  kvReader.stop();
 }
}
origin: apache/samza

 public static void main(String[] args) throws RocksDBException {
  RocksDbReadingTool tool = new RocksDbReadingTool();
  OptionSet options = tool.parser().parse(args);
  MapConfig config = tool.loadConfig(options);
  String path = tool.getDbPath();
  String dbName = tool.getDbName();
  RocksDbKeyValueReader kvReader = new RocksDbKeyValueReader(dbName, path, config);

  for (Object obj : tool.getKeys()) {
   Object result = kvReader.get(obj);
   tool.outputResult(obj, result);
  }

  kvReader.stop();
 }
}
origin: org.apache.samza/samza-kv-rocksdb

 public static void main(String[] args) throws RocksDBException {
  RocksDbReadingTool tool = new RocksDbReadingTool();
  OptionSet options = tool.parser().parse(args);
  MapConfig config = tool.loadConfig(options);
  String path = tool.getDbPath();
  String dbName = tool.getDbName();
  RocksDbKeyValueReader kvReader = new RocksDbKeyValueReader(dbName, path, config);

  for (Object obj : tool.getKeys()) {
   Object result = kvReader.get(obj);
   tool.outputResult(obj, result);
  }

  kvReader.stop();
 }
}
org.apache.samza.storage.kvRocksDbKeyValueReaderstop

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.
  • getSerdeFromName
    A helper method to get the Serde from the serdeName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now