Tabnine Logo
SnapshotTestingUtils.createPut
Code IndexAdd Tabnine to your IDE (free)

How to use
createPut
method
in
org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils

Best Java code snippets using org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils.createPut (Showing top 2 results out of 315)

origin: apache/hbase

public static void loadData(final HBaseTestingUtility util, final BufferedMutator mutator, int rows,
  byte[]... families) throws IOException, InterruptedException {
 // Ensure one row per region
 assertTrue(rows >= KEYS.length);
 for (byte k0: KEYS) {
  byte[] k = new byte[] { k0 };
  byte[] value = Bytes.add(Bytes.toBytes(System.currentTimeMillis()), k);
  byte[] key = Bytes.add(k, Bytes.toBytes(MD5Hash.getMD5AsHex(value)));
  final byte[][] families1 = families;
  final byte[] key1 = key;
  final byte[] value1 = value;
  mutator.mutate(createPut(families1, key1, value1));
  rows--;
 }
 // Add other extra rows. more rows, more files
 while (rows-- > 0) {
  byte[] value = Bytes.add(Bytes.toBytes(System.currentTimeMillis()), Bytes.toBytes(rows));
  byte[] key = Bytes.toBytes(MD5Hash.getMD5AsHex(value));
  final byte[][] families1 = families;
  final byte[] key1 = key;
  final byte[] value1 = value;
  mutator.mutate(createPut(families1, key1, value1));
 }
 mutator.flush();
 waitForTableToBeOnline(util, mutator.getName());
}
origin: org.apache.hbase/hbase-server

public static void loadData(final HBaseTestingUtility util, final BufferedMutator mutator, int rows,
  byte[]... families) throws IOException, InterruptedException {
 // Ensure one row per region
 assertTrue(rows >= KEYS.length);
 for (byte k0: KEYS) {
  byte[] k = new byte[] { k0 };
  byte[] value = Bytes.add(Bytes.toBytes(System.currentTimeMillis()), k);
  byte[] key = Bytes.add(k, Bytes.toBytes(MD5Hash.getMD5AsHex(value)));
  final byte[][] families1 = families;
  final byte[] key1 = key;
  final byte[] value1 = value;
  mutator.mutate(createPut(families1, key1, value1));
  rows--;
 }
 // Add other extra rows. more rows, more files
 while (rows-- > 0) {
  byte[] value = Bytes.add(Bytes.toBytes(System.currentTimeMillis()), Bytes.toBytes(rows));
  byte[] key = Bytes.toBytes(MD5Hash.getMD5AsHex(value));
  final byte[][] families1 = families;
  final byte[] key1 = key;
  final byte[] value1 = value;
  mutator.mutate(createPut(families1, key1, value1));
 }
 mutator.flush();
 waitForTableToBeOnline(util, mutator.getName());
}
org.apache.hadoop.hbase.snapshotSnapshotTestingUtilscreatePut

Popular methods of SnapshotTestingUtils

  • deleteAllSnapshots
  • deleteArchiveDirectory
  • loadData
  • createSnapshotAndValidate
    Take a snapshot of the specified table and verify the given families. Note that this will leave the
  • createPreSplitTable
  • waitForTableToBeOnline
  • assertExistsMatchingSnapshot
    Make sure that there is only one snapshot returned from the master and its name and table match the
  • assertNoSnapshots
    Assert that we don't have any snapshots lists
  • assertOneSnapshotThatMatches
    Make sure that there is only one snapshot returned from the master and its name and table match the
  • cleanupSnapshot
  • confirmSnapshotValid
    Confirm that the snapshot contains references to all the files that should be in the snapshot.
  • corruptSnapshot
    Corrupt the specified snapshot by deleting some files.
  • confirmSnapshotValid,
  • corruptSnapshot,
  • createTable,
  • expectSnapshotDoneException,
  • getSplitKeys,
  • listHFileNames,
  • snapshot,
  • verifyReplicasCameOnline,
  • verifyRowCount

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Notification (javax.management)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
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