Grant Henke has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/17513


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>
(cherry picked from commit bd37d601d36bcf51c595baad52b5d24b5e20d684)
---
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(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/13/17513/1
--
To view, visit http://gerrit.cloudera.org:8080/17513
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.15.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65adcc1b3de0a8e1ac5b7f50a2d3a7036aa69421
Gerrit-Change-Number: 17513
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>

Reply via email to