Hello Mike Percy, Kudu Jenkins, Adar Dembo, Grant Henke,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/13356

to look at the new patch set (#4).

Change subject: [backup] Add a basic CLI tool
......................................................................

[backup] Add a basic CLI tool

This adds a CLI tool. For a set of tables, it can
- Print out the latest backup
- Print out the sequence of backups that would be used by a restore job
- Print out all backups, ordered by end time

An example invocation looks like

$ java -cp <elided> org.apache.kudu.backup.KuduBackupCLI \
  --rootPath=hdfs:///kudu-backups \
  list_restore_sequence \
  default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e foo
 table name                                            | table id               
          | end time                     | start timestamp | end timestamp | 
type
-------------------------------------------------------+----------------------------------+------------------------------+-----------------+---------------+-------------
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
b46191d75c8d46bab6dc76ba0bd345ba | 2019-05-13T09:38:54.642-0700 | 0             
  | 1557765534642 | full
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
b46191d75c8d46bab6dc76ba0bd345ba | 2019-05-13T10:33:23.669-0700 | 1557765534642 
  | 1557768803669 | incremental
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
b46191d75c8d46bab6dc76ba0bd345ba | 2019-05-13T11:07:25.358-0700 | 1557768803669 
  | 1557770845358 | incremental

 table name                                            | table id               
          | end time                     | start timestamp | end timestamp | 
type
-------------------------------------------------------+----------------------------------+------------------------------+-----------------+---------------+------
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
1e0ab43cb925473fbc5acf86db12eb56 | 2019-05-13T14:09:01.518-0700 | 0             
  | 1557781741518 | full

No backups were found for 1 table(s):
foo

Notice how, due to table renames, more than one table can match a table
name, and, of course, there may be no table for a name.

Another example:

$ java -cp <elided> org.apache.kudu.backup.KuduBackupCLI \
  --rootPath=hdfs:///kudu-backup-tests-again \
  list_latest \
  default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e
 table name                                            | table id               
          | end time                     | start timestamp | end timestamp | 
type
-------------------------------------------------------+----------------------------------+------------------------------+-----------------+---------------+-------------
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
b46191d75c8d46bab6dc76ba0bd345ba | 2019-05-13T11:07:25.358-0700 | 1557768803669 
  | 1557770845358 | incremental
 default.loadgen_auto_69c4838542ea481d81e03e8f66f7731e | 
1e0ab43cb925473fbc5acf86db12eb56 | 2019-05-13T14:09:01.518-0700 | 0             
  | 1557781741518 | full

The tool also supports TSV and CSV output, and listing out information
about all backups by omitting and explicit list of tables.

Change-Id: Ib5a4d3b44c77a06fa1b5d2b09506ba5a6e1b52c1
---
M java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/BackupGraph.scala
M java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/BackupIO.scala
A 
java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupCLI.scala
3 files changed, 202 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/13356/4
--
To view, visit http://gerrit.cloudera.org:8080/13356
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib5a4d3b44c77a06fa1b5d2b09506ba5a6e1b52c1
Gerrit-Change-Number: 13356
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>

Reply via email to