Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

REPL DUMP <dbname>[.<tablename>] [FROM <init-evid> [TO <end-evid>] [LIMIT <num-evids>] ] [WITH ('key1'='value1', 'key2'='value2')];

This is better described via various examples of each of the pieces of the command syntax, as follows:

...

Now, the dump generated will be similar to the kind of dumps generated by EXPORTs, in that it will contain a _metadata file, but it will not contain the actual data files, instead using a _files file as an indirection to the actual files. One more aspect of REPL DUMP is that it does not take a directory as an argument on where to dump into. Instead, it creates its own dump directory inside a root dir specified by a new HiveConf parameter, hive.repl.rootdir , which will configure a root directory for dumps, and returns the dumped directory as part of the return value from it. It is intended also that we will introduce a replication dumpdir cleaner which will periodically clean it up.

The REPL DUMP command has an optional WITH clause to set command-specific configurations to be used when trying to copy from the source cluster. These configurations are only used by the corresponding REPL DUMP command and won't be used for other queries running in the same session.

Return values:

  1. Error codes returned as return error codes (and over jdbc if with HS2)
  2. Returns 2 columns in the ResultSet:
    1. <dir-name> - the directory to which it has dumped info.
    2. <last-evid> - the last event-id associated with this dump, which might be the end-evid, or the curr-evid, as the case may be.

...