ashutosh-bapat commented on a change in pull request #579: HIVE-21109 : Support
stats replication for ACID tables.
URL: https://github.com/apache/hive/pull/579#discussion_r270786715
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestStatsReplicationScenarios.java
##########
@@ -269,11 +294,23 @@ private String dumpLoadVerify(List<String> tableNames,
String lastReplicationId,
WarehouseInstance.Tuple dumpTuple = primary.run("use " + primaryDbName)
.dump(primaryDbName, lastReplicationId, withClauseList);
+
// Load, if necessary changing configuration.
if (parallelLoad) {
replica.hiveConf.setBoolVar(HiveConf.ConfVars.EXECPARALLEL, true);
}
+ // Fail load if for testing failure and retry scenario. Fail the load
while setting
+ // checkpoint for a table in the middle of list of tables.
+ if (failRetry) {
+ if (lastReplicationId == null) {
+ failBootstrapLoad(dumpTuple, tableNames.size()/2);
+ } else {
+ failIncrementalLoad(dumpTuple, tableNames.size()/2);
Review comment:
We are counting UpdateTableStats or UpdatePartStats events and not every
event. So, we will fail only after encountering no of tables/2 events of those
types. So it can not fail before applying update stats events. But to be on the
safer side, I have changed the code to fail after second event so that we have
at least one successful application before we fail. Since we are performing
multiple insert events per table, we can be sure that there are at least 2
events of each type.
----------------------------------------------------------------
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]