My initial thoughts about implementing DUMP TABLE was to piggyback on the
TableScanner API. I started down the path of implementing it with a 'dump'
boolean flag on the ScanSpec. But things quickly got ugly. First, all of
the methods to Table scanner would look like this:
if (scan_spec.dump)
do_something_completely_different();
Then, to make life easier, I wanted to use a TableScanner on the METADATA
table to figure out the range map, and then ideally create a TableScanner
for each range of the table being dumped. I couldn't think of a clean way
to create TableScanners within a TableScanner without adding special purpose
TableScanner constructors for DUMP TABLE. I've come to the conclusion that
DUMP TABLE should be implemented as a completely separate API. Here's what
I propose:
class Table {
...
TableDumper *create_dumper(const DumpSpec &dump_spec,
uint32_t timeout_ms = 0);
...
}
class DumpSpec {
uint32_t max_versions;
CstrColumns columns;
std::pair<int64_t,int64_t> time_interval;
};
If you have any thoughts about this approach, or suggestions for an
alternate approach, please share. Thanks.
- Doug
--
You received this message because you are subscribed to the Google Groups
"Hypertable Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hypertable-dev?hl=en.