[ https://issues.apache.org/jira/browse/HBASE-19002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16221089#comment-16221089 ]
Josh Elser commented on HBASE-19002: ------------------------------------ {code} Cell c = result.get(i); // Replace the Cell if the value is the one we're replacing if (c.getTypeByte() == KeyValue.Type.Put.ordinal() {code} I'm struggling to find public API to determine if a Cell is a Put. It looks like {{DataType}} was introduced to eliminate the dependency on {{KeyValue.Type}}, but {{Cell.getTypeByte}} is still returning a byte that correspond to {{KeyValue.Type}}, not {{DataType}}. It seems like we should have some utility methods in CellUtil that handle implicitly handle the conversion from {{KeyValue.Type}} in a Cell to {{DataType}}. Or.. better yet, we deprecate {{Cell.getTypeByte}} and introduce a new version that returns {{DataType}} instead of the magic {{byte}} which corresponds to a {{KeyValue.Type}}. > 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)