phet commented on code in PR #4041:
URL: https://github.com/apache/gobblin/pull/4041#discussion_r1751150699


##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResourceHandlerInterface.java:
##########
@@ -25,8 +25,8 @@
 import com.linkedin.restli.server.UpdateResponse;
 
 
-// Unlike FlowConfigsV2ResourceHandler, this is an interface rather than a 
class because it's implementation needs
-// classes from gobblin-service module, and adding gobblin-service as a 
dependency will cause circular dependency,
+// This is an interface rather than a class because implementation may need 
resources from the packages it cannot have
+// direct dependency on
 public interface FlowExecutionResourceHandlerInterface {

Review Comment:
   also javadoc



##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/modules/restli/FlowConfigsV2ResourceHandler.java:
##########
@@ -164,16 +165,14 @@ public UpdateResponse  partialUpdateFlowConfig(FlowId 
flowId,
     return updateFlowConfig(flowId, flowConfig, modifiedWatermark);
   }
 
-  public UpdateResponse updateFlowConfig(FlowId flowId,
-      FlowConfig flowConfig) throws FlowConfigLoggedException {
+  public UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig flowConfig) 
throws FlowConfigLoggedException {
     // We have modifiedWatermark here to avoid update config happens at the 
same time on different hosts overwrite each other
     // timestamp here will be treated as largest modifiedWatermark that we can 
update
     long version = System.currentTimeMillis() / 1000;
     return updateFlowConfig(flowId, flowConfig, version);
   }
 
-  public UpdateResponse updateFlowConfig(FlowId flowId,
-      FlowConfig flowConfig, long modifiedWatermark) throws 
FlowConfigLoggedException {
+  private UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig 
flowConfig, long modifiedWatermark) throws FlowConfigLoggedException {

Review Comment:
   surprised to see this private when the interface had this public



##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsResourceHandlerInterface.java:
##########
@@ -0,0 +1,56 @@
+/*
+ * 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.gobblin.service;
+
+import java.util.Collection;
+import java.util.Properties;
+
+import com.linkedin.restli.common.ComplexResourceKey;
+import com.linkedin.restli.common.PatchRequest;
+import com.linkedin.restli.server.CreateKVResponse;
+import com.linkedin.restli.server.UpdateResponse;
+
+import org.apache.gobblin.runtime.api.FlowSpecSearchObject;
+
+
+// This is an interface rather than a class because implementation may need 
resources from the packages it cannot have
+// direct dependency on
+public interface FlowConfigsResourceHandlerInterface {

Review Comment:
   good comment, but deserves more javadoc, esp. citing the PDL endpoint this 
relates to.  if it's not clear from that, potentially do call out that this 
relates to the flowConfigsV2 endpoint (not flowConfigs, which has been removed)



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