Codota Logo
IncrementHandler
Code IndexAdd Codota to your IDE (free)

How to use
IncrementHandler
in
co.cask.cdap.data2.increment.hbase98

Best Java code snippets using co.cask.cdap.data2.increment.hbase98.IncrementHandler (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: cdapio/cdap

 @Override
 public ReturnCode filterKeyValue(Cell cell) throws IOException {
  if (IncrementHandler.isIncrement(cell)) {
   // all visible increments should be included until we get to a non-increment
   return ReturnCode.INCLUDE;
  } else {
   // as soon as we find a KV to include we can move to the next column
   return ReturnCode.INCLUDE_AND_NEXT_COL;
  }
 }
}
origin: cdapio/cdap

@Override
public void setCoprocessorTimestampOracle(TimestampOracle timeOracle) {
 Coprocessor cp = region.getCoprocessorHost().findCoprocessor(IncrementHandler.class.getName());
 assertNotNull(cp);
 ((IncrementHandler) cp).setTimestampOracle(timeOracle);
}
origin: cdapio/cdap

@Override
public void start(CoprocessorEnvironment e) throws IOException {
 if (e instanceof RegionCoprocessorEnvironment) {
  RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
  this.region = ((RegionCoprocessorEnvironment) e).getRegion();
  HTableDescriptor tableDesc = region.getTableDesc();
  this.state = new IncrementHandlerState(env, tableDesc);
  for (HColumnDescriptor columnDesc : tableDesc.getFamilies()) {
   state.initFamily(columnDesc.getName(), convertFamilyValues(columnDesc.getValues()));
  }
 }
}
origin: cdapio/cdap

if (IncrementHandler.isIncrement(cell)) {
 if (LOG.isTraceEnabled()) {
  LOG.trace("Found increment for row=" + Bytes.toStringBinary(CellUtil.cloneRow(cell)) + ", " +
co.cask.cdap.data2.increment.hbase98IncrementHandler

Javadoc

HBase coprocessor that handles reading and writing read-less increment operations.

Writes of incremental values are performed as normal Puts, flagged with a special attribute HBaseTable#DELTA_WRITE. The coprocessor intercepts these writes and rewrites the cell value to use a special marker prefix.

For read (for Get and Scan) operations, all of the delta values are summed up for a column, up to and including the most recent "full" (non-delta) value. The sum of these delta values, plus the full value (if found) is returned for the column.

To mitigate the performance impact on reading, this coprocessor also overrides the scanner used in flush and compaction operations, using IncrementSummingScanner to generate a new "full" value aggregated from all the successfully committed delta values.

Most used methods

  • convertFamilyValues
  • isIncrement
  • setTimestampOracle

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • Kernel (java.awt.image)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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