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

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

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

origin: com.aliyun.hbase/alihbase-thrift

public static void doTestIncrements(HBaseHandler handler) throws Exception {
 List<Mutation> mutations = new ArrayList<>(1);
 mutations.add(new Mutation(false, columnAAname, valueEname, true));
 mutations.add(new Mutation(false, columnAname, valueEname, true));
 handler.mutateRow(tableAname, rowAname, mutations, null);
 handler.mutateRow(tableAname, rowBname, mutations, null);
 List<TIncrement> increments = new ArrayList<>(3);
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 int numIncrements = 60000;
 for (int i = 0; i < numIncrements; i++) {
  handler.increment(new TIncrement(tableAname, rowAname, columnAname, 2));
  handler.incrementRows(increments);
 }
 Thread.sleep(1000);
 long lv = handler.get(tableAname, rowAname, columnAname, null).get(0).value.getLong();
 // Wait on all increments being flushed
 while (handler.coalescer.getQueueSize() != 0) Threads.sleep(10);
 assertEquals((100 + (2 * numIncrements)), lv );
 lv = handler.get(tableAname, rowBname, columnAAname, null).get(0).value.getLong();
 assertEquals((100 + (3 * 7 * numIncrements)), lv);
 assertTrue(handler.coalescer.getSuccessfulCoalescings() > 0);
}
origin: org.apache.hbase/hbase-thrift

public static void doTestIncrements(HBaseHandler handler) throws Exception {
 List<Mutation> mutations = new ArrayList<>(1);
 mutations.add(new Mutation(false, columnAAname, valueEname, true));
 mutations.add(new Mutation(false, columnAname, valueEname, true));
 handler.mutateRow(tableAname, rowAname, mutations, null);
 handler.mutateRow(tableAname, rowBname, mutations, null);
 List<TIncrement> increments = new ArrayList<>(3);
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 increments.add(new TIncrement(tableAname, rowBname, columnAAname, 7));
 int numIncrements = 60000;
 for (int i = 0; i < numIncrements; i++) {
  handler.increment(new TIncrement(tableAname, rowAname, columnAname, 2));
  handler.incrementRows(increments);
 }
 Thread.sleep(1000);
 long lv = handler.get(tableAname, rowAname, columnAname, null).get(0).value.getLong();
 // Wait on all increments being flushed
 while (handler.coalescer.getQueueSize() != 0) Threads.sleep(10);
 assertEquals((100 + (2 * numIncrements)), lv );
 lv = handler.get(tableAname, rowBname, columnAAname, null).get(0).value.getLong();
 assertEquals((100 + (3 * 7 * numIncrements)), lv);
 assertTrue(handler.coalescer.getSuccessfulCoalescings() > 0);
}
org.apache.hadoop.hbase.thriftThriftServerRunner$HBaseHandlerincrementRows

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
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • String (java.lang)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ImageIO (javax.imageio)
  • Top Vim 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