Codota Logo
ThriftServerRunner$HBaseHandler.getRow
Code IndexAdd Codota 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)

  • 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

/**
 * 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: 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);
 }
}
origin: org.apache.hbase/hbase-thrift

assertEquals(0, handler.getRow(tableAname, rowBname, null).size());
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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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