hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sankar Hariappan (JIRA)" <>
Subject [jira] [Commented] (HIVE-16813) Incremental REPL LOAD should load the events in the same sequence as it is dumped.
Date Wed, 07 Jun 2017 17:10:18 GMT


Sankar Hariappan commented on HIVE-16813:

One additional use case as i was going through the patch, though not related to incremental
load but to bootstrap load. Currently during bootstrap load we dont order tables in a database
in any specific order, hence if there is a virtual_view/table which is created using a select
as and the table which its selected from is dumped after, there might be a failure, unfortunately
i was not able to test the same as replication related commands are not working on my machine
since distcp doAs is not able to impersonate.

I think, for bootstrap, table dump sequence won't be a problem even if table is created using
CTAS as the resultant table or view will be an independent object. 
- CTAS will create an independent table with schema and data cloned from the original table.
But, once the table is created, it has no backward reference.
- In case of virtual views, the reference query command is just stored into the Table object
corresponding to the view. During dump/load, no computations done using this query command.
Hence, no reference to the original table unless someone issue a query on the view.
- For materialized views, it is as good as an independent table with own schema and data files.
Even queries won't refer back to the original table.

> Incremental REPL LOAD should load the events in the same sequence as it is dumped.
> ----------------------------------------------------------------------------------
>                 Key: HIVE-16813
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive, repl
>    Affects Versions: 2.1.0
>            Reporter: Sankar Hariappan
>            Assignee: Sankar Hariappan
>              Labels: DR, replication
>         Attachments: HIVE-16813.01.patch, HIVE-16813.02.patch
> Currently, incremental REPL DUMP use $dumpdir/<eventID> to dump the metadata and
data files corresponding to the event. The event is dumped in the same sequence in which it
was generated.
> Now, REPL LOAD, lists the directories inside $dumpdir using listStatus and sort it using
compareTo algorithm of FileStatus class which doesn't check the length before sorting it alphabetically.
> Due to this, the event-100 is processed before event-99 and hence making the replica
database non-sync with source.
> Need to use a customized compareTo algorithm to sort the FileStatus.

This message was sent by Atlassian JIRA

View raw message