Rick,

Yes and yes, but why not using the column keys instead of the timestamps?

J-D

On Sat, Jul 19, 2008 at 1:47 AM, Rick Hangartner <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> This is a question about the HBase transaction model.
>
> Suppose I have a table with two columns "c1" and "c2".  Now assume for each
> timestamp in each row, I have a entry in each column.  That is, assume the
> table is ALWAYS written such that it is "dense" (e.g. a complete relation)
> rather than sparse (e.g. a partial relation) using the transaction
> semantics:
>
>    HTable table = new HTable(conf, new Text("test"));
>    static final Text rowId = new Text("row_num");
>    static final Text col1Id = new Text("c1");
>    static final Text col2Id = new Text("c2");
>
>    long lockid = table.startUpdate(rowId);
>
>    // always write all columns in a row
>    table.put( lockid, col1Id, val );
>    table.put( lockid, col2Id, val );
>
>    table.commit( lockid, timestamp );
>
> Also assume that  the two columns are read as something like:
>
>    byte[][] c1Vals = table.get( rowId, col1Id, versions );
>    byte[][] c2Vals = table.get( rowId, col2Id, versions );
>
>
> Is it guaranteed that for each index value i,  c1Vals[i][] and c2Vals[i][]
> are the two column entries originally written with the same timestamp?
>
> Also, is something like:
>
>    byte[][] c1Vals = table.get( rowId, col1Id, MAX_VALUE );
>
> sufficient to guarantee all versions are returned in the "get" operations?
>
> Thanks,
> Rick
>
>
>

Reply via email to