How does HBase know if a row contains a particular column or not? For example consider the following situation:
Let’ s say we have a table with one column family named “STAT_FAM”, with following two rows:
- One row with key “R1”, that contains 1000 columns named S1 to S1000.
- And another row with key “R2”, that contains another 1000 columns named from S2000 to S3000.
Now, if we are scanning the table, and the scan is defined as below:
Scan s = new Scan();
s.setStartRow ( Bytes.toBytes(“R1”) );
s.setStopRow ( Bytes.toBytes(“R2”) );
s.addColumn( STAT_FAM, Bytes.toBytes(“S500”) );
s.addColumn( STAT_FAM, Bytes.toBytes(“S2500”) );
When HBase does the scan, based on the rowkey, it will locate the record in a particular file on a particular region server.Once this is located, how does it find for a particular column in a row’s data?
For row “R1”, there is no column named “S2500”, so would it have to go through the complete record for this row to determine that the row does not contain the required column?
Thanks in advance!