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-21197) Hive replication can add duplicate data during migration to a target with hive.strict.managed.tables enabled
Date Fri, 22 Feb 2019 09:14:01 GMT


ASF GitHub Bot logged work on HIVE-21197:

                Author: ASF GitHub Bot
            Created on: 22/Feb/19 09:13
            Start Date: 22/Feb/19 09:13
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #541: HIVE-21197 : Hive Replication
can add duplicate data during migration to a target with hive.strict.managed.tables enabled

 File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/
 @@ -0,0 +1,233 @@
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.parse;
+import org.apache.hadoop.hdfs.DistributedFileSystem;
+import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.metastore.InjectableBehaviourObjectStore;
+import org.apache.hadoop.hive.metastore.InjectableBehaviourObjectStore.BehaviourInjection;
+import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
+import org.apache.hadoop.hive.ql.exec.repl.util.ReplUtils;
+import org.apache.hadoop.hive.shims.Utils;
+import org.junit.*;
+import org.junit.rules.TestName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import javax.annotation.Nullable;
+import java.util.*;
 Review comment:
   Shall avoid importing *.
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 202468)
    Time Spent: 50m  (was: 40m)

> Hive replication can add duplicate data during migration to a target with hive.strict.managed.tables
> ------------------------------------------------------------------------------------------------------------
>                 Key: HIVE-21197
>                 URL:
>             Project: Hive
>          Issue Type: Task
>          Components: repl
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21197.01.patch, HIVE-21197.02.patch
>          Time Spent: 50m
>  Remaining Estimate: 0h
> During bootstrap phase it may happen that the files copied to target are created by events
which are not part of the bootstrap. This is because of the fact that, bootstrap first gets
the last event id and then the file list. During this period if some event are added, then
bootstrap will include files created by these events also.The same files will be copied again
during the first incremental replication just after the bootstrap. In normal scenario, the
duplicate copy does not cause any issue as hive allows the use of target database only after
the first incremental. But in case of migration, the file at source and target are copied
to different location (based on the write id at target) and thus this may lead to duplicate
data at target. This can be avoided by having at check at load time for duplicate file. This
check can be done only for the first incremental and theĀ search can be done in the bootstrap
directory (with write id 1). if the file is already present then just ignore the copy.

This message was sent by Atlassian JIRA

View raw message