Dump table is actually a special case of map job, I'm not sure that it should be part of the client API. Rather it should be a separate utility class (a la the LoadData* classes) in the library. The same is true for the "restore" feature.
DumpSpec seems too limiting, why not just use ScanSpec? Initially you can limit the ScanSpec to be full table only (empty intervals) and enhance later on using the get_scan_splits API. On Tue, Jan 26, 2010 at 8:26 PM, Doug Judd <[email protected]> wrote: > 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. > -- 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.
