Reputation: 33
Assume that we have a Bigtable structure as follows: Table1: cf1 [“col1”, “col2”], cf2[“colX”, “colY”]
Query from hbase client API:
Get getT = new Get(Bytes.toBytes(rowKey));
getT.addColumn(byteArray_cf1, byteArray_col1);
Result rt = table.get(getT);
Is the retrieval efficient to look for a particular cf and column when returning the desired query result? Assuming that size of each of column values col1, col2, colX and colY is 10 MB, is the above query efficient enough to just look up value for col1 and return the query results?
Also, when calling Put for updating the column value, is the entire row re-written by bigtable? or is it just the column value that gets updated?
Put putT = new Put(Bytes.toBytes(rowKey));
putT.addColumn(byteArray_cf1, byteArray_col1, Bytes.toBytes("updatedData"));
table.put(putT)
Upvotes: 0
Views: 1159
Reputation: 13424
Is the retrieval efficient to look for a particular cf and column when returning the desired query result?
Yes.
Assuming that size of each of column values col1, col2, colX and colY is 10 MB, is the above query efficient enough to just look up value for col1 and return the query results?
Only the requested data in (column family, qualifier) is returned to the caller.
Also, when calling Put for updating the column value, is the entire row re-written by bigtable? or is it just the column value that gets updated?
Only the column value that's specified is updated, not the entire row.
Upvotes: 1