nsivabalan commented on code in PR #13307: URL: https://github.com/apache/hudi/pull/13307#discussion_r2122925225
########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/callback/common/WriteStatusHandlerCallback.java: ########## @@ -0,0 +1,41 @@ +/* + * 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.callback.common; + +import org.apache.hudi.client.WriteStatus; +import org.apache.hudi.common.data.HoodieData; +import org.apache.hudi.common.util.Option; + +/** + * WriteStatus handler callback to assist caller to process errors if any. Caller can dictate if we wanted to proceed with the commit or not by means of the return + * value of the call back (processWriteStatuses). We noticed that sometimes callers invoke the dag just to process it there are any errors before proceeding with the commit. + * With this callback, we are avoiding additional dag triggers from the callers side. + */ +public interface WriteStatusHandlerCallback { Review Comment: two points to name it this way a. these are not user-facing. just some internal refactoring. b. And adding to that, we already have something called pre commit validator, we have preCommit() method in BaseHoodieWriteCommit.commitStats() {} . For these reasons, we did not want to name this commitValidator as it might cause confusion. -- 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]
