shahrs87 commented on pull request #2707:
URL: https://github.com/apache/hbase/pull/2707#issuecomment-733974388
> We should not be exposing entire PrivateCellUtil even for CPs. There is a
Cell util public and CP exposed version. For CPs to handle tags, if we need new
APIs, lets target those and expose that only. Like we have TagUtil now but
private. Pls explain what are the reqs.
May be we need a way to create new Tag in correct format. API to retrieve
tags from Cell. API to add a new tag to existing Cell with or with out tags
already. What else? Let us discuss in Jira
Requirements:
1. Create a new tag: Currently there are 2 implementations of Tag i.e.
ArrayBackedTag and ByteBufferTag. Both the implementations are annotated as
IA.Private. @Apache9 gave an idea to create a Builder class and make that
LimitedPrivate while keeping the implementation still Private. This makes sense.
2. Creating a new Cell with existing Cell and list of Tags:
[PrivateCellUtil#Cell createCell(Cell cell, List
tags)](https://github.com/apache/hbase/blob/master/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java#L106)
I can't find any replacement for this api. Please let me know if I missed
any class.
3. Get a list of Tags from a Cell something like: [PrivateCellUtil#List
getTags(Cell
cell)](https://github.com/apache/hbase/blob/master/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java#L903)
There is an already existing method which is CP public
_RawCell#Iterator getTags()_ but that returns an iterator and we have to
convert it to list which is what PrivateCellUtil#getTags is exactly doing. This
is nice to have api.
Cc @anoopsjohn @Apache9 @gjacoby126
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org