n3nash commented on a change in pull request #2611:
URL: https://github.com/apache/hudi/pull/2611#discussion_r587111398
##########
File path:
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieHiveUtils.java
##########
@@ -115,4 +121,20 @@ public static Path getNthParent(Path path, int n) {
}
return result;
}
+
+ public static HoodieTimeline getTableTimeline(final String tableName, final
JobConf job, final HoodieTableMetaClient metaClient) {
+ boolean includePendingCommits =
job.getBoolean(String.format(HOODIE_CONSUME_PENDING_COMMITS, tableName), false);
+ if (includePendingCommits) {
+ HoodieTimeline timeline =
metaClient.getActiveTimeline().getCommitsTimeline();
+ String maxTimestamp =
job.get(String.format(HOODIE_CONSUME_VALIDATE_TIMESTAMP, tableName));
+ if (maxTimestamp == null || !timeline.containsInstant(maxTimestamp)) {
+ LOG.info("Timestamp configured for validation: " + maxTimestamp + "
commits timeline:" + timeline + " table: " + tableName);
+ throw new HoodieIOException("Valid timestamp is required for " +
HOODIE_CONSUME_VALIDATE_TIMESTAMP + " in validate mode");
Review comment:
Please change the log to "Valid commit is required for .."
----------------------------------------------------------------
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]