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

Jim Kellerman commented on HBASE-847:
-------------------------------------

What needs to be done:

o.a.h.h.ipc.HRegionInterface:
- bump versionID
- change:
{code}
public RowResult getRow(final byte[] regionName, final byte[] row, final 
byte[][] columns, final long ts, final long lockId)

// to:

public RowResult getRow(final byte[] regionName, final byte[] row, final 
byte[][] columns, final long ts, final int numVersions, final long lockId)
{code}

o.a.h.h.client.HTable:
- add overloads to getRow:
{code}
public RowResult getRow(String row, int numVersions)
public RowResult getRow(String row, long timestamp, int numVersions)
public RowResult getRow(String row, String[] columns, int numVersions)
public RowResult getRow(String row, String[] columns, long timestamp, int 
numVersions)
public RowResult getRow(String row, String[] columns, long timestamp, int 
numVersions, RowLock rowLock)

public RowResult getRow(byte[] row, int numVersions)
public RowResult getRow(byte[] row, long timestamp, int numVersions)
public RowResult getRow(byte[] row, byte[][] columns, int numVersions)
public RowResult getRow(byte[] row, byte[][] columns, long timestamp, int 
numVersions)
{code}
- replace:
{code}
public RowResult getRow(byte[] row, byte[][] columns, long timestamp, RowLock 
rowLock)

// with:

public RowResult getRow(byte[] row, byte[][] columns, long timestamp, int 
numVersions, RowLock rowLock)
{code}

All getRow(String...) methods should call:

{code}
public RowResult getRow(String row, String[] columns, long timestamp, int 
numVersions, RowLock rowLock)

// which calls:

public RowResult getRow(byte[] row, byte[][] columns, long timestamp, int 
numVersions, RowLock rowLock)
{code}

Similarly all getRow(byte[]...) methods should call:

{code}
public RowResult getRow(byte[] row, byte[][] columns, long timestamp, int 
numVersions, RowLock rowLock)
{code}

which will use the new getRow api in HRegionInterface described above.

Modify HRegionServer.getRow to match the change in HRegionInterface. This will 
require corresponding changes to HRegion.getFull, 
HStore.{getFull,getFullFromMapFile} and Memcache.{getFull,internalGetFull}

Multiple values and timestamps for the same column:family can be stored in a 
single Cell using either of the constructors:

{code}
Cell(String[] vals, long[] ts)
Cell(byte[][] vals, long[] ts)
{code}


> new API: HTable.getRow with numVersion specified
> ------------------------------------------------
>
>                 Key: HBASE-847
>                 URL: https://issues.apache.org/jira/browse/HBASE-847
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Michael Bieniosek
>            Assignee: Jim Kellerman
>             Fix For: 0.19.0
>
>
> I'd like to be able to call HTable.getRow with numVersions, and get multiple 
> versions for each column.

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