[ 
https://issues.apache.org/jira/browse/HIVE-16813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037291#comment-16037291
 ] 

Sankar Hariappan edited comment on HIVE-16813 at 6/5/17 6:00 PM:
-----------------------------------------------------------------

Added 01.patch with below changes.
- Added a custom comparator (EventDumpDirComparator) to sort the directories 
listed during REPL LOAD. It compares the dir length before comparing the 
directory name Strings.
- Added unit tests to verify the new comparator and also to verify the bug with 
default FileStatus comparator.

Request [~anishek] / [~sushanth] to kindly review the patch!
cc [~thejas]


was (Author: sankarh):
Added 01.patch with below changes.
- Added a custom comparator (EventDumpDirComparator) to sort the directories 
listed during REPL LOAD. It compares the dir length before comparing the 
directory name Strings.
- Added unit tests to verify the new comparator and also to verify the bug with 
default FileStatus comparator.

> Incremental REPL LOAD should load the events in the same sequence as it is 
> dumped.
> ----------------------------------------------------------------------------------
>
>                 Key: HIVE-16813
>                 URL: https://issues.apache.org/jira/browse/HIVE-16813
>             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
>
>
> 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
(v6.3.15#6346)

Reply via email to