phoenix
phoenix copied to clipboard
PHOENIX-6786 SequenceRegionObserver should use batch mutation coproc hook
@kadirozde Is this the kind of refactoring you had in mind?
This patch:
- Adds a preBatchMutate hook to SequenceRegionObserver that will filter any Append or Increment operations submitted in batch and handle them ahead of base HBase processing. Puts and Deletes will be passed through to normal handling as required. Phoenix rewrites Increments on the sequence table into Puts to same and submits them by Region#batchMutate, which would set up a cycle with preBatchMutate otherwise, I believe.
- Retains existing hooks for preAppend and preIncrement that are necessary for intercepting other APIs.
- Refactors most logic to reusable private methods.