Grant Henke has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17388 )

Change subject: [backup] KUDU-3183 Add --newDatabaseName and 
--removeImpalaPrefix  options to restore job
......................................................................

[backup] KUDU-3183 Add --newDatabaseName and --removeImpalaPrefix
options to restore job

While Kudu does not have a notion of database, usually the full
table name is stored as <database>.<tablename> on kudu side. (NOTE:
database name is optional). Using the options in this patch users
can change the existing database name of the table or add a new
database name to the table i.e. the prefix to the '.' in the full
tablename as well as remove impala prefix for the tables which
are being restored.

1.--newDatabaseName : Use this option to specify the new database
name for the restored table. This will overwrite any existing
database and if there is no existing database, a new database will
be added to the table name. Will not affect "impala::" prefix.
E.g: Adding database name "newDB" to the tables impala::default.test,
impala::test, default.test, test will result in the table names
impala::newDB.test, impala::newDB.test, newDB.test, newDB.test .
This will not affect the existing/source tables.

2.--removeImpalaPrefix : If enabled, this option will remove the
“impala::” prefix, if present from the restored table names. This is
advisable if tables are backed up in Kudu clusters without HMS
integration and being restored to Kudu clusters with HMS integration.

Change-Id: I65adcc1b3de0a8e1ac5b7f50a2d3a7036aa69421
Reviewed-on: http://gerrit.cloudera.org:8080/17388
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <granthe...@apache.org>
---
M java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduRestore.scala
M java/kudu-backup/src/main/scala/org/apache/kudu/backup/Options.scala
M java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala
M java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestOptions.scala
4 files changed, 126 insertions(+), 4 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Grant Henke: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/17388
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I65adcc1b3de0a8e1ac5b7f50a2d3a7036aa69421
Gerrit-Change-Number: 17388
Gerrit-PatchSet: 10
Gerrit-Owner: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to