jerryshao commented on code in PR #4281:
URL: https://github.com/apache/gravitino/pull/4281#discussion_r1704912757


##########
api/src/main/java/org/apache/gravitino/file/FilesetDataOperationCtx.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.gravitino.file;
+
+import org.apache.gravitino.annotation.Evolving;
+
+/**
+ * An interface representing a fileset data operation context. This interface 
defines some
+ * information need to report to the server.
+ *
+ * <p>{@link FilesetDataOperationCtx} defines the basic properties of a 
fileset data operation
+ * context object.
+ */
+@Evolving
+public interface FilesetDataOperationCtx {
+  /** @return The sub path which is operated by the data operation . */
+  String subPath();
+
+  /** @return The data operation type. */
+  FilesetDataOperation operation();
+
+  /** @return The client type of the data operation. */
+  ClientType clientType();
+}

Review Comment:
   @xloya my general feeling is that using "interfaces" to define the content 
of fileset operation is too strict, it is not convenient to add more properties 
unless we change the API definitions, DTOs and REST server/client.
   
   My thinking is that we can simply using `Map<String, String>` to store the 
context information we want, that will be simple to extend, another thing is 
that we can refer to Hadoop's CallerContext to see how it design.
   
   My feeling is that using a API system to define the caller context 
information seems too overkill, what do you think?



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

Reply via email to