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

Alex Baranau commented on HBASE-3811:
-------------------------------------

That was expected by me since I added the code below to handle this case:

    int numAttributes = 0;
    try {
      numAttributes = in.readInt();
    } catch (EOFException e) { // indicates that serialized scan doesn't 
support attributes
      // DO NOTHING
      // TODO: should we really care about it? or should we increase scan 
version number and handle/not handle
      // attributes depending on version?
    }

Still one may think that using Scan version is cleaner variant. Not sure what 
are the plans for Scan version and when it is ok to change it *by initial 
design*.

> Allow adding attributes to Scan
> -------------------------------
>
>                 Key: HBASE-3811
>                 URL: https://issues.apache.org/jira/browse/HBASE-3811
>             Project: HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Alex Baranau
>            Priority: Minor
>         Attachments: HBASE-3811.patch, HBASE-3811.patch
>
>
> There's sometimes a need to add custom attribute to Scan object so that it 
> can be accessed on server side.
> Example of the case where it is needed discussed here: 
> http://search-hadoop.com/m/v3Jtb2GkiO. There might be other cases where it is 
> useful, which are mostly about logging/gathering stats on server side.
> Alternative to allowing adding any custom attributes to scan could be adding 
> some fixed field, like "type" to the class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to