hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (HIVE-21286) Hive should support clean-up of previously bootstrapped tables when retry from different dump.
Date Mon, 04 Mar 2019 18:25:00 GMT


ASF GitHub Bot logged work on HIVE-21286:

                Author: ASF GitHub Bot
            Created on: 04/Mar/19 18:24
            Start Date: 04/Mar/19 18:24
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #551: HIVE-21286: Hive should support
clean-up of previously bootstrapped tables when retry from different dump.

 File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/
 @@ -279,6 +292,72 @@ a database ( directory )
     return 0;
+  /**
+   * Cleanup/drop tables from the given database which are bootstrapped by input dump dir.
+   * @throws HiveException Failed to drop the tables.
+   * @throws IOException File operations failure.
+   * @throws InvalidInputException Invalid input dump directory.
+   */
+  private void bootstrapRollbackTask() throws HiveException, IOException, InvalidInputException
+    Path bootstrapDirectory = new PathBuilder(work.bootstrapDumpToRollback)
+            .addDescendant(ReplUtils.INC_BOOTSTRAP_ROOT_DIR_NAME).build();
+    FileSystem fs = bootstrapDirectory.getFileSystem(conf);
+    if (!fs.exists(bootstrapDirectory)) {
+      throw new InvalidInputException("Input bootstrap dump directory to rollback doesn't
exist: "
+              + bootstrapDirectory);
 Review comment:
   This feature is not specific for external tables. The idea is to rollback the tables bootstrapped
from given dump irrespective of external or acid or even table level replication.
   We expect the input dump to be bootstrap combined in incremental dump. If full bootstrap
dump is specified, it throw exception. I will add a test to see if any other dump is specified,
then repl load should fail.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 207344)
    Time Spent: 1h  (was: 50m)

> Hive should support clean-up of previously bootstrapped tables when retry from different
> ----------------------------------------------------------------------------------------------
>                 Key: HIVE-21286
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: repl
>    Affects Versions: 4.0.0
>            Reporter: Sankar Hariappan
>            Assignee: Sankar Hariappan
>            Priority: Major
>              Labels: DR, Replication, pull-request-available
>         Attachments: HIVE-21286.01.patch
>          Time Spent: 1h
>  Remaining Estimate: 0h
> If external tables are enabled for replication on an existing repl policy, then bootstrapping
of external tables are combined with incremental dump.
> If incremental bootstrap load fails with non-retryable error for which user will have
to manually drop all the external tables before trying with another bootstrap dump. For full
bootstrap, to retry with different dump, we suggested user to drop the DB but in this case
they need to manually drop all the external tables which is not so user friendly. So, need
to handle it in Hive side as follows.
> REPL LOAD takes additional config (passed by user in WITH clause) that says, drop all
the tables which are bootstrapped from previous dump. 
> hive.repl.rollback.bootstrap.load=<previous_bootstrap_dump_dir>
> Hive will use this config only if the current dump is bootstrap dump or combined bootstrap
in incremental dump.
> Caution to be taken by user that this config should not be passed if previous REPL LOAD
(with bootstrap) was successful or any successful incremental dump+load happened after "previous_bootstrap_dump_dir".

This message was sent by Atlassian JIRA

View raw message