ashutosh-bapat commented on a change in pull request #742: HIVE-22068 : Add
more logging to notification cleaner and replication to track events
URL: https://github.com/apache/hive/pull/742#discussion_r314690479
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosExternalTables.java
##########
@@ -750,6 +766,38 @@ public Table apply(@Nullable Table table) {
.verifyResults(Arrays.asList("1", "2"));
}
+ @Test
+ public void testIncrementalDumpEmptyDumpDirectory() throws Throwable {
+ WarehouseInstance.Tuple tuple = primary.run("use " + primaryDbName)
+ .run("create external table t1 (id int)")
+ .run("insert into table t1 values (1)")
+ .run("insert into table t1 values (2)")
+ .dump(primaryDbName, null);
+
+ replica.load(replicatedDbName, tuple.dumpLocation)
+ .status(replicatedDbName)
+ .verifyResult(tuple.lastReplicationId);
+
+ WarehouseInstance.Tuple incTuple = primary.dump(primaryDbName,
tuple.lastReplicationId);
+
+ replica.load(replicatedDbName, incTuple.dumpLocation)
+ .status(replicatedDbName)
+ .verifyResult(incTuple.lastReplicationId);
+
+ // create events for some other database and then dump the primaryDbName
to dump an empty directory.
+ primary.run("create database " + extraPrimaryDb + " WITH DBPROPERTIES ( '"
+
+ SOURCE_OF_REPLICATION + "' = '1,2,3')");
+ WarehouseInstance.Tuple inc2Tuple = primary.run("use " + extraPrimaryDb)
+ .run("create table tbl (fld int)")
+ .run("use " + primaryDbName)
+ .dump(primaryDbName, incTuple.lastReplicationId);
+
Review comment:
Done.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]