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

Anoop Sam John commented on HBASE-10322:
----------------------------------------

My patch is like almost ready except Replication!
ReplicationSource uses AdminService#ReplicateWALEntry() and call 
HRS#replicateWALEntry()  via the same path of client to HRS communication.. ie 
via RpcClient.. So if we have to introduce 2 configs some sort of if checks etc 
will come which tells abt the context etc..:(
Another simple way with out any code change I am thinking now is as follows:

RpcClient looks at "hbase.client.rpc.codec" for getting the Codec class name.
Well HBase client side looks at this config at client end and uses that Codec 
to write to server and also writes the codec class name in connection header. 
Server looks at the connection header to see the class name of the Codec which 
is used by the client and it instantiate that and uses the same to communicate 
with that client.
Here we can do one thing. We can ask the user to configure two class names 
(When some one uses tags) at client and server. 
Say at client use KVCodec and at server configure it as KVCodecWithTags.  Let 
KVCodecWithTags serialize tags also.At the peer cluster HRS also this codec 
class  should be there and there, in connection header, the class name will be 
KVCodecWithTags and will use that  :)

This will work well.   So for existing users there is no need to do any 
changes.  When users use the tags (or visibility labels or cell level acl) they 
must make this change and make sure the 98 upgrade is done in all the clusters.

Opinions pls. 

> Strip tags from KV while sending back to client on reads
> --------------------------------------------------------
>
>                 Key: HBASE-10322
>                 URL: https://issues.apache.org/jira/browse/HBASE-10322
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Blocker
>             Fix For: 0.98.0, 0.99.0
>
>         Attachments: HBASE-10322.patch, HBASE-10322_V2.patch
>
>
> Right now we have some inconsistency wrt sending back tags on read. We do 
> this in scan when using Java client(Codec based cell block encoding). But 
> during a Get operation or when a pure PB based Scan comes we are not sending 
> back the tags.  So any of the below fix we have to do
> 1. Send back tags in missing cases also. But sending back visibility 
> expression/ cell ACL is not correct.
> 2. Don't send back tags in any case. This will a problem when a tool like 
> ExportTool use the scan to export the table data. We will miss exporting the 
> cell visibility/ACL.
> 3. Send back tags based on some condition. It has to be per scan basis. 
> Simplest way is pass some kind of attribute in Scan which says whether to 
> send back tags or not. But believing some thing what scan specifies might not 
> be correct IMO. Then comes the way of checking the user who is doing the 
> scan. When a HBase super user doing the scan then only send back tags. So 
> when a case comes like Export Tool's the execution should happen from a super 
> user.
> So IMO we should go with #3.
> Patch coming soon.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to