satishkotha commented on a change in pull request #2542: URL: https://github.com/apache/hudi/pull/2542#discussion_r651116518
########## File path: hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableGloballyConsistentMetaClient.java ########## @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hudi.common.table; + +import java.io.IOException; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.mapred.JobConf; +import org.apache.hudi.common.fs.ConsistencyGuardConfig; +import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion; +import org.apache.hudi.common.table.timeline.HoodieTimeline; +import org.apache.hudi.common.table.timeline.HoodieInstant; +import org.apache.hudi.common.util.Option; +import org.apache.hudi.common.util.StringUtils; +import org.apache.hudi.exception.TableNotFoundException; +import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; + +/* + * Uber specific version of HoodieTableMetaClient to make sure when a table level property is set + * to indicate a commit timestamp that is present across DC make sure to limit the local .hoodie + * timeline to upto that commit timestamp. + * + * Note: There is an assumption that this means every other commit + * that is present upto this commit is present globally. This assumption makes it easier to just + * trim the commit timeline at the head. Otherwise we will have to store the valid commit timeline + * in the table as a property. + * + * Note: This object should not be cached between mapreduce jobs since the jobConf can change + */ +public class HoodieTableGloballyConsistentMetaClient extends HoodieTableMetaClient { Review comment: @jsbali good question. I think it makes sense for read global to take precedence. include_pending is only used for dev testing, so we can add instructions to explicitly disable read global for these cases. -- 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