Tabnine Logo
ThriftServerRunner$HBaseHandler.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler
constructor

Best Java code snippets using org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler.<init> (Showing top 20 results out of 315)

origin: org.apache.hbase/hbase-thrift

this.metrics = new ThriftMetrics(conf, ThriftMetrics.ThriftServerType.ONE);
this.pauseMonitor = new JvmPauseMonitor(conf, this.metrics.getSource());
this.hbaseHandler = new HBaseHandler(conf, userProvider);
this.hbaseHandler.initMetrics(metrics);
this.handler = HbaseHandlerMetricsProxy.newInstance(hbaseHandler, metrics, conf);
origin: com.aliyun.hbase/alihbase-thrift

this.metrics = new ThriftMetrics(conf, ThriftMetrics.ThriftServerType.ONE);
this.pauseMonitor = new JvmPauseMonitor(conf, this.metrics.getSource());
this.hbaseHandler = new HBaseHandler(conf, userProvider);
this.hbaseHandler.initMetrics(metrics);
this.handler = HbaseHandlerMetricsProxy.newInstance(
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: com.aliyun.hbase/alihbase-thrift

 new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
  UserProvider.instantiate(UTIL.getConfiguration()));
handler.createTable(tableAname, getColumnDescriptors());
origin: org.apache.hbase/hbase-thrift

ThriftMetrics metrics = getMetrics(conf);
ThriftServerRunner.HBaseHandler hbaseHandler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
    UserProvider.instantiate(UTIL.getConfiguration()));
Hbase.Iface handler = HbaseHandlerMetricsProxy.newInstance(hbaseHandler, metrics, conf);
origin: com.aliyun.hbase/alihbase-thrift

ThriftMetrics metrics = getMetrics(conf);
ThriftServerRunner.HBaseHandler hbaseHandler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
    UserProvider.instantiate(UTIL.getConfiguration()));
Hbase.Iface handler = HbaseHandlerMetricsProxy.newInstance(hbaseHandler, metrics, conf);
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: 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);
 }
}
origin: org.apache.hbase/hbase-thrift

/**
 * Tests adding a series of Mutations and BatchMutations, including a
 * delete mutation.  Also tests data retrieval, and getting back multiple
 * versions.
 *
 * @throws Exception
 */
public void doTestTableMutations() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestTableMutations(handler);
}
origin: org.apache.hbase/hbase-thrift

/**
 * Tests for creating, enabling, disabling, and deleting tables.  Also
 * tests that creating a table with an invalid column name yields an
 * IllegalArgument exception.
 *
 * @throws Exception
 */
public void doTestTableCreateDrop() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestTableCreateDrop(handler);
}
origin: co.cask.hbase/hbase

public ThriftServerRunner(Configuration conf) throws IOException {
 this(conf, new ThriftServerRunner.HBaseHandler(conf));
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * Tests for creating, enabling, disabling, and deleting tables.  Also
 * tests that creating a table with an invalid column name yields an
 * IllegalArgument exception.
 *
 * @throws Exception
 */
public void doTestTableCreateDrop() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestTableCreateDrop(handler);
}
origin: org.apache.hbase/hbase-thrift

/**
 * For HBASE-2556
 * Tests for GetTableRegions
 *
 * @throws Exception
 */
public void doTestGetTableRegions() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestGetTableRegions(handler);
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * Tests adding a series of Mutations and BatchMutations, including a
 * delete mutation.  Also tests data retrieval, and getting back multiple
 * versions.
 *
 * @throws Exception
 */
public void doTestTableMutations() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestTableMutations(handler);
}
origin: org.apache.hbase/hbase-thrift

public void doTestIncrements() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 createTestTables(handler);
 doTestIncrements(handler);
 dropTestTables(handler);
}
origin: com.aliyun.hbase/alihbase-thrift

/**
 * For HBASE-2556
 * Tests for GetTableRegions
 *
 * @throws Exception
 */
public void doTestGetTableRegions() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestGetTableRegions(handler);
}
origin: com.aliyun.hbase/alihbase-thrift

public void doTestGetRegionInfo() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestGetRegionInfo(handler);
}
origin: com.aliyun.hbase/alihbase-thrift

public void doTestIncrements() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 createTestTables(handler);
 doTestIncrements(handler);
 dropTestTables(handler);
}
origin: org.apache.hbase/hbase-thrift

public void doTestGetRegionInfo() throws Exception {
 ThriftServerRunner.HBaseHandler handler =
  new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration(),
   UserProvider.instantiate(UTIL.getConfiguration()));
 doTestGetRegionInfo(handler);
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandler<init>

Javadoc

Constructs an HBaseHandler object.

Popular methods of ThriftServerRunner$HBaseHandler

  • 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
  • getScanner
    Returns the scanner associated with the specified ID.
  • getRowsWithColumnsTs,
  • getScanner,
  • getTable,
  • getVer,
  • removeScanner,
  • scannerGetList,
  • append,
  • checkAndPut,
  • closeTable

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Collectors (java.util.stream)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Sublime Text 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