hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gray (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-802) RowResult containing or supporting more flexible data structures to access elements returned
Date Mon, 11 Aug 2008 17:44:44 GMT

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

Jonathan Gray commented on HBASE-802:
-------------------------------------

Jim: yeah can definitely do something like that, but

stack: yes, HBASE-806 would suffice.

The combo of these two things would provide what I was looking for.  Thanks.

> RowResult containing or supporting more flexible data structures to access elements returned
> --------------------------------------------------------------------------------------------
>
>                 Key: HBASE-802
>                 URL: https://issues.apache.org/jira/browse/HBASE-802
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: io
>    Affects Versions: 0.2.0
>            Reporter: Jonathan Gray
>             Fix For: 0.3.0
>
>
> Extracting actual data from a RowResult can be an ugly process when you don't know what
you're looking for (to be able to query the Map).
> For example, if i want to get all columns in a family, or I pass a large number of columns
each of which may or may not exist in the specified row, I need to go through the entire list
of column/Cells.  Currently this is done with something like:
> RowResult result = HTable.getRow(rowkey,columns)
> Set<Map.Entry<byte [], Cell>> cols = result.entrySet();
> From here I know how many entries are in the Set (cols.size()), but if I want to go through
them, this requires another step change the Set into an Array or an Iterator.
> Iterator<Map.Entry<byte [], Cell>> iterator = cols.iterator();
> or
> Map.Entry<byte [], Cell> [] entries = cols.toArray(new RowResult.Entry[0])
> So going from what is returned from HBase, into something usable by the client, requires
at least two additional lines and data structure conversions.  The Map -> Set<Map.Entry>
is very likely to be fast.  I'm unsure about the speed of the Iterator or toArray.  I would
guess that the change to Iterator is fairly efficient (not requiring a copy of the memory),
whereas toArray likely does.

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


Mime
View raw message