Reputation: 476
I'm trying to write code that does a full table scan in go by using the bigtable.Table.SampleRowKeys RPC method. The table as around 7m rows (verified with cbt), yet the call returns a single key, whereas the documentation mention:
// SampleRowKeys returns a sample of row keys in the table. The returned row keys will delimit contiguous sections of
// the table of approximately equal size, which can be used to break up the data for distributed tasks like MapReduce.
Am I missing something?
Upvotes: 0
Views: 331
Reputation: 476
Turns out that the returned keys are midpoints, thus if it returns a single key, say [k1]
, then the ranges are [("", k1), (k1, "")]
.
Upvotes: 1