congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IncrementHandler
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now