Tabnine Logo
ObjectStoreDataset.createSplitReader
Code IndexAdd Tabnine to your IDE (free)

How to use
createSplitReader
method
in
co.cask.cdap.data2.dataset2.lib.table.ObjectStoreDataset

Best Java code snippets using co.cask.cdap.data2.dataset2.lib.table.ObjectStoreDataset.createSplitReader (Showing top 3 results out of 315)

origin: cdapio/cdap

public RecordScanner<KeyValue<byte[], T>> createSplitRecordScanner(Split split) {
 return Scannables.splitRecordScanner(createSplitReader(split), new ObjectRecordMaker());
}
origin: co.cask.cdap/cdap-data-fabric

public RecordScanner<KeyValue<byte[], T>> createSplitRecordScanner(Split split) {
 return Scannables.splitRecordScanner(createSplitReader(split), new ObjectRecordMaker());
}
origin: caskdata/cdap

private void verifySplits(ObjectStoreDataset<String> t, List<Split> splits, SortedSet<Long> keysToVerify)
 throws InterruptedException {
 // read each split and verify the keys, remove all read keys from the set
 for (Split split : splits) {
  SplitReader<byte[], String> reader = t.createSplitReader(split);
  reader.initialize(split);
  while (reader.nextKeyValue()) {
   byte[] key = reader.getCurrentKey();
   String value = reader.getCurrentValue();
   // verify each row has the two columns written
   Assert.assertEquals(Long.toString(Bytes.toLong(key)), value);
   Assert.assertTrue(keysToVerify.remove(Bytes.toLong(key)));
  }
 }
 // verify all keys have been read
 if (!keysToVerify.isEmpty()) {
  System.out.println("Remaining [" + keysToVerify.size() + "]: " + keysToVerify);
 }
 Assert.assertTrue(keysToVerify.isEmpty());
}
co.cask.cdap.data2.dataset2.lib.tableObjectStoreDatasetcreateSplitReader

Popular methods of ObjectStoreDataset

  • <init>
  • decode
  • delete
  • encode
  • getRecordType
  • getReflectionDatumReader
  • getSplits
  • read
  • scan
  • write

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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