Tabnine Logo
ThriftServerRunner$HBaseHandler.getRow
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.aliyun.hbase/alihbase-thrift

/**
 * Appends the value to a cell and checks that the cell value is updated properly.
 *
 * @throws Exception
 */
public static void doTestAppend() 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));
  handler.mutateRow(tableAname, rowAname, mutations, null);
  List<ByteBuffer> columnList = new ArrayList<>(1);
  columnList.add(columnAname);
  List<ByteBuffer> valueList = new ArrayList<>(1);
  valueList.add(valueBname);
  TAppend append = new TAppend(tableAname, rowAname, columnList, valueList);
  handler.append(append);
  TRowResult rowResult = handler.getRow(tableAname, rowAname, null).get(0);
  assertEquals(rowAname, rowResult.row);
  assertArrayEquals(Bytes.add(valueAname.array(), valueBname.array()),
   rowResult.columns.get(columnAname).value.array());
 } finally {
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
 }
}
origin: org.apache.hbase/hbase-thrift

/**
 * Appends the value to a cell and checks that the cell value is updated properly.
 *
 * @throws Exception
 */
public static void doTestAppend() 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));
  handler.mutateRow(tableAname, rowAname, mutations, null);
  List<ByteBuffer> columnList = new ArrayList<>(1);
  columnList.add(columnAname);
  List<ByteBuffer> valueList = new ArrayList<>(1);
  valueList.add(valueBname);
  TAppend append = new TAppend(tableAname, rowAname, columnList, valueList);
  handler.append(append);
  TRowResult rowResult = handler.getRow(tableAname, rowAname, null).get(0);
  assertEquals(rowAname, rowResult.row);
  assertArrayEquals(Bytes.add(valueAname.array(), valueBname.array()),
   rowResult.columns.get(columnAname).value.array());
 } finally {
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
 }
}
origin: com.aliyun.hbase/alihbase-thrift

assertEquals(0, handler.getRow(tableAname, rowBname, null).size());
origin: org.apache.hbase/hbase-thrift

assertEquals(0, handler.getRow(tableAname, rowBname, null).size());
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);
 }
}
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);
 }
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandlergetRow

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,
  • checkAndPut,
  • closeTable

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JList (javax.swing)
  • 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