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

stack commented on HBASE-10322:
-------------------------------

bq. Another suggestion atleast to avoid changes to the codec part is to have an 
init() in the Codec.java. So once the codec is instantiated we could set this 
flag as true or false based on client or server. 

Anoop fed me the above off line.  It just seems wrong that codec need know if 
'server' or 'client'.  Why can't it be TagsCodec and StripTagsCodec and then at 
the various junctions (client sending, server receiving, WAL writing, etc.) 
they read configuration what Codec to use or what code to use Decoding a 
particular Encoder; e.g. on server, we'd write back to the client using 
NoTagsKVCodec.

Pardon me if I am making suggestion you fellas have already said won't work.

bq. The major concern with that was we will have to recreate KVs (In filter/cp) 
and byte array copying. The perf penalty is a major concern

Are we writing new KVs or creating a cell block?  If the latter, then it'll be 
no more expensive copying a KV with or without the Tags?

To get Andrew his RC the sooner, will life be easier if no tags from server to 
client?  In a later HBase we can add codec negotiation, etc?

Good stuff lads.



> 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
>
>
> 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