fsaintjacques
fsaintjacques

Reputation: 476

bigtable.SampleRowKeys return a single key

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

Answers (1)

fsaintjacques
fsaintjacques

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

Related Questions