hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19092) Make Tag IA.LimitedPrivate and expose for CPs
Date Tue, 14 Nov 2017 17:12:01 GMT

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

ramkrishna.s.vasudevan commented on HBASE-19092:

I did a grep on the Timeline server code for Tags and found these use cases
ublic static AggregationOperation getAggregationOperationFromTagsList(
      List<Tag> tags) {
    for (AggregationOperation aggOp : AggregationOperation.values()) {
      for (Tag tag : tags) {
        if (tag.getType() == aggOp.getTagType()) {
          return aggOp;
So where they need a list of tags. Which is got from 

 private AggregationOperation getCurrentAggOp(Cell cell) {
    List<Tag> tags = Tag.asList(cell.getTagsArray(), cell.getTagsOffset(),
There are also need for creating byte[] from Tag.
 if ((attributes != null) && (attributes.size() > 0)) {
      for (Map.Entry<String, byte[]> attribute : attributes.entrySet()) {
        Tag t = HBaseTimelineStorageUtils.getTagFromAttribute(attribute);
      byte[] tagByteArray = Tag.fromList(tags);
      NavigableMap<byte[], List<Cell>> newFamilyMap = new TreeMap<>(
          long cellTimestamp = getCellTimestamp(cell.getTimestamp(), tags);
              CellUtil.cloneFamily(cell), CellUtil.cloneQualifier(cell),
              cellTimestamp, KeyValue.Type.Put, CellUtil.cloneValue(cell),
Now we have the ExtendedCellBuilder to build it. 
>From my limited grep I think what ever is exposed we are doing good. Probably we can have
Tag.asList(Cell) so that we can handle both BB and byte[] backed cells and user need not bother
about it.
And another point is that they have their own RegionScanner called FlowScanner which does
use of these Tags. 

> Make Tag IA.LimitedPrivate and expose for CPs
> ---------------------------------------------
>                 Key: HBASE-19092
>                 URL: https://issues.apache.org/jira/browse/HBASE-19092
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 2.0.0-beta-1
>         Attachments: HBASE-19092-branch-2.patch, HBASE-19092-branch-2_5.patch, HBASE-19092-branch-2_5.patch,
> We need to make tags as LimitedPrivate as some use cases are trying to use tags like
timeline server. The same topic was discussed in dev@ and also in HBASE-18995.
> Shall we target this for beta1 - cc [~saint.ack@gmail.com].
> So once we do this all related Util methods and APIs should also move to LimitedPrivate
Util classes.

This message was sent by Atlassian JIRA

View raw message