Codota Logo
ThriftServerRunner$HBaseHandler.checkAndPut
Code IndexAdd Codota to your IDE (free)

How to use
checkAndPut
method
in
org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler

Best Java code snippets using org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler.checkAndPut (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * Check that checkAndPut fails if the cell does not exist, then put in the cell, then check that
 * the checkAndPut succeeds.
 *
 * @throws Exception
 */
public static void doTestCheckAndPut() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 handler.createTable(tableAname, getColumnDescriptors());
 try {
  List<Mutation> mutations = new ArrayList<>(1);
  mutations.add(new Mutation(false, columnAname, valueAname, true));
  Mutation putB = (new Mutation(false, columnBname, valueBname, true));
  assertFalse(handler.checkAndPut(tableAname, rowAname, columnAname, valueAname, putB, null));
  handler.mutateRow(tableAname, rowAname, mutations, null);
  assertTrue(handler.checkAndPut(tableAname, rowAname, columnAname, valueAname, putB, null));
  TRowResult rowResult = handler.getRow(tableAname, rowAname, null).get(0);
  assertEquals(rowAname, rowResult.row);
  assertEquals(valueBname, rowResult.columns.get(columnBname).value);
 } finally {
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
 }
}
origin: org.apache.hbase/hbase-thrift

/**
 * Check that checkAndPut fails if the cell does not exist, then put in the cell, then check that
 * the checkAndPut succeeds.
 *
 * @throws Exception
 */
public static void doTestCheckAndPut() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 handler.createTable(tableAname, getColumnDescriptors());
 try {
  List<Mutation> mutations = new ArrayList<>(1);
  mutations.add(new Mutation(false, columnAname, valueAname, true));
  Mutation putB = (new Mutation(false, columnBname, valueBname, true));
  assertFalse(handler.checkAndPut(tableAname, rowAname, columnAname, valueAname, putB, null));
  handler.mutateRow(tableAname, rowAname, mutations, null);
  assertTrue(handler.checkAndPut(tableAname, rowAname, columnAname, valueAname, putB, null));
  TRowResult rowResult = handler.getRow(tableAname, rowAname, null).get(0);
  assertEquals(rowAname, rowResult.row);
  assertEquals(valueBname, rowResult.columns.get(columnBname).value);
 } finally {
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
 }
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandlercheckAndPut

Popular methods of ThriftServerRunner$HBaseHandler

  • <init>
  • deleteAllRowTs
  • deleteAllTs
  • get
    Note: this internal interface is slightly different from public APIs in regard to handling of the qu
  • getRowWithColumnsTs
  • getVerTs
    Note: this internal interface is slightly different from public APIs in regard to handling of the qu
  • increment
  • mutateRowTs
  • mutateRowsTs
  • addScanner
    Assigns a unique ID to the scanner and adds the mapping to an internal hash-map.
  • atomicIncrement
  • getRowsWithColumnsTs
  • atomicIncrement,
  • getRowsWithColumnsTs,
  • getScanner,
  • getTable,
  • getVer,
  • removeScanner,
  • scannerGetList,
  • append,
  • closeTable

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • addToBackStack (FragmentTransaction)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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