ayushtkn commented on a change in pull request #2907:
URL: https://github.com/apache/hive/pull/2907#discussion_r821532790



##########
File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -4610,6 +4613,99 @@ public void testPolicyIdImplicitly() throws Exception {
             result.get(0).contains("repl.source.for=default_REPL DUMP " + 
dbName));
   }
 
+  @Test
+  public void testReplicationMetricForSkippedIteration() throws Throwable {
+    String name = testName.getMethodName();
+    String primaryDbName = createDB(name, driver);
+    String replicaDbName = "replicaDb";
+    try {
+      isMetricsEnabledForTests(true);
+      MetricCollector collector = MetricCollector.getInstance();
+      run("create table " + primaryDbName + ".t1 (id int) clustered by(id) 
into 3 buckets stored as orc tblproperties (\"transactional\"=\"true\")", 
driver);
+      run("insert into " + primaryDbName + ".t1 values(1)", driver);

Review comment:
       I think the insert is failing due to transactional true.
   I tried a select * on this
   ```
   java.io.IOException: java.lang.RuntimeException: ORC split generation failed 
with exception: java.lang.IllegalArgumentException: No ValidTxnList for 
pfile:/Users/ayushsaxena/code/hive-os/hive/itests/hive-unit/target/warehouse/testreplicationmetricforskippediteration.db/t1/delta_0000000_0000000_0000/000001_0/delta_0000000_0000000
   
   ```
   
   Put this after insert and check:
   ```
         verifySetupSteps = true;
         verifySetup("SELECT id from " + primaryDbName + ".t1", new 
String[]{"1"}, driver);
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to