[ https://issues.apache.org/jira/browse/HIVE-24912?focusedWorklogId=576700&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-576700 ]
ASF GitHub Bot logged work on HIVE-24912: ----------------------------------------- Author: ASF GitHub Bot Created on: 05/Apr/21 05:27 Start Date: 05/Apr/21 05:27 Worklog Time Spent: 10m Work Description: hmangla98 commented on a change in pull request #2092: URL: https://github.com/apache/hive/pull/2092#discussion_r606925266 ########## File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java ########## @@ -4287,6 +4288,42 @@ public void testMoveOptimizationIncremental() throws IOException { verifyRun("SELECT count(*) from " + replDbName + ".unptned_late ", "3", driverMirror); } + @Test + public void testReplTargetSetInIncremental() throws Exception { + String name = testName.getMethodName(); + String dbName = createDB(name, driver); + run("ALTER DATABASE " + dbName + " Set DBPROPERTIES('custom_property' = 'custom_value')", driver); + String replDbName = dbName + "_dupe"; + + run("CREATE TABLE " + dbName + ".unptned(a string) STORED AS TEXTFILE", driver); + Tuple bootstrapDump = bootstrapLoadAndVerify(dbName, replDbName); + run("DESCRIBE DATABASE EXTENDED " + replDbName, driverMirror); + List<String> result = getOutput(driverMirror); + assertTrue(result.get(0), result.get(0).contains("repl.target.for=true")); + assertTrue(result.get(0), result.get(0).contains("custom_property=custom_value")); + + // Remove TARGET_OF_REPLICATION property. + run("ALTER DATABASE " + replDbName + " Set DBPROPERTIES('" + TARGET_OF_REPLICATION + "' = '')", driverMirror); + + run("DESCRIBE DATABASE EXTENDED " + replDbName, driverMirror); + result = getOutput(driverMirror); + assertTrue(result.get(0), result.get(0).contains("repl.target.for=")); + + String[] unptn_data = new String[]{ "eleven" , "twelve" }; + String unptn_locn = new Path(TEST_PATH, name + "_unptn").toUri().getPath(); + createTestDataFile(unptn_locn, unptn_data); + run("LOAD DATA LOCAL INPATH '" + unptn_locn + "' OVERWRITE INTO TABLE " + dbName + ".unptned", true, driver); + verifySetup("SELECT * from " + dbName + ".unptned", unptn_data, driver); + + // Perform REPL-DUMP/LOAD + Tuple incrementalDump = incrementalLoadAndVerify(dbName, replDbName); + + run("DESCRIBE DATABASE EXTENDED " + replDbName, driverMirror); + result = getOutput(driverMirror); + assertTrue(result.get(0), result.get(0).contains("repl.target.for=true")); 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 576700) Time Spent: 1h 10m (was: 1h) > Support to add repl.target.for property during incremental run > -------------------------------------------------------------- > > Key: HIVE-24912 > URL: https://issues.apache.org/jira/browse/HIVE-24912 > Project: Hive > Issue Type: Bug > Reporter: Haymant Mangla > Assignee: Haymant Mangla > Priority: Major > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)