[ 
https://issues.apache.org/jira/browse/HBASE-19002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219733#comment-16219733
 ] 

Ted Yu commented on HBASE-19002:
--------------------------------

Josh - you're so fast :-)
{code}
+    public void postFlush(
+        ObserverContext<RegionCoprocessorEnvironment> c, Store store, 
StoreFile resultFile,
+        FlushLifeCycleTracker tracker) throws IOException {
+      flushCounter.increment();
{code}
This hook has store passed to it (compared to postFlush() above this). I wonder 
if a different counter than flushCounter can be used to track the occurrences.
{code}
+public class ValueRewritingObserver implements RegionObserver, 
RegionCoprocessor {
{code}
Please add description on what the observer does.
{code}
+            // TODO: this is incontrived, other types will happen in real life
+            cellBuilder.setType(DataType.Put);
{code}
How about using the same type as that of the cell ?

Please clear the cellBuilder after build() is called.

Thanks

> Introduce more examples to show how to intercept normal region operations
> -------------------------------------------------------------------------
>
>                 Key: HBASE-19002
>                 URL: https://issues.apache.org/jira/browse/HBASE-19002
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Duo Zhang
>            Assignee: Josh Elser
>            Priority: Minor
>             Fix For: 2.0.0-alpha-4
>
>         Attachments: HBASE-19002.001.branch-2.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to