[ 
https://issues.apache.org/jira/browse/HADOOP-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HADOOP-2296:
--------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed clearing of map on each next invocation.

> hbase shell: phantom columns show up from select command
> --------------------------------------------------------
>
>                 Key: HADOOP-2296
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2296
>             Project: Hadoop
>          Issue Type: Bug
>          Components: contrib/hbase
>    Affects Versions: 0.15.0
>            Reporter: Michael Bieniosek
>            Assignee: stack
>         Attachments: 2296.patch
>
>
> {code}
> Hbase> select * from hbase_test where row='2';
> +--------------------------------------+--------------------------------------+
> | Column                               | Cell                                 
> |
> +--------------------------------------+--------------------------------------+
> | test:a                               | a                                    
> |
> +--------------------------------------+--------------------------------------+
> | test:c                               | c                                    
> |
> +--------------------------------------+--------------------------------------+
> 2 row(s) in set (0.00 sec)
> Hbase> select * from hbase_test where row='1';
> +--------------------------------------+--------------------------------------+
> | Column                               | Cell                                 
> |
> +--------------------------------------+--------------------------------------+
> | test:a                               | a                                    
> |
> +--------------------------------------+--------------------------------------+
> | test:b                               | b                                    
> |
> +--------------------------------------+--------------------------------------+
> 2 row(s) in set (0.00 sec)
> Hbase> select * from hbase_test;          
> +-------------------------+-------------------------+-------------------------+
> | Row                     | Column                  | Cell                    
> |
> +-------------------------+-------------------------+-------------------------+
> | 1                       | test:a                  | a                       
> |
> +-------------------------+-------------------------+-------------------------+
> | 1                       | test:b                  | b                       
> |
> +-------------------------+-------------------------+-------------------------+
> | 2                       | test:a                  | a                       
> |
> +-------------------------+-------------------------+-------------------------+
> | 2                       | test:b                  | b                       
> |
> +-------------------------+-------------------------+-------------------------+
> | 2                       | test:c                  | c                       
> |
> +-------------------------+-------------------------+-------------------------+
> 5 row(s) in set (0.14 sec)
> {code}
> Note the phantom value for test:b in row 2.
> I looked at the code, and it looks like SelectCommand.scanPrint incorrectly 
> fails to call results.clear() every time it calls scan.next().  
> However, I also think that the HScannerInterface.next(HStoreKey key, 
> SortedMap<Text,byte[]> results) is confusing, since it requires the user to 
> call results.clear() and key.clear() before calling next each time.  Since 
> the Iterable interface that provides the zero-arg next has been added, I 
> suggest that it might be worthwhile to deprecate the two-arg next.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to