AndyJiang99 commented on code in PR #3583: URL: https://github.com/apache/gobblin/pull/3583#discussion_r996180142
########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/SharedFlowGraphHelper.java: ########## @@ -0,0 +1,126 @@ +/* + * 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.modules.flowgraph; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.util.Map; + +import org.apache.commons.io.FilenameUtils; +import org.apache.hadoop.fs.Path; + +import com.google.common.base.Optional; +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; +import com.typesafe.config.ConfigValueFactory; + +import lombok.extern.slf4j.Slf4j; + +import org.apache.gobblin.runtime.api.TopologySpec; +import org.apache.gobblin.service.modules.template_catalog.FSFlowTemplateCatalog; +import org.apache.gobblin.util.ConfigUtils; +import org.apache.gobblin.util.reflection.GobblinConstructorUtils; + + +/** + * Supports a configuration of a flowgraph where it can support multiple sub-flowgraphs within its directory + * Node definitions are shared between each subgraph, but can be overwritten within the subgraph + * Edge definitions are only defined in the subgraphs + * e.g. + * /gobblin-flowgraph + * /subgraphA + * /nodeA + * /nodeB + * edgeAB.properties + * /subgraphB + * /nodeA + * /nodeB + * edgeAB.properties + * A.properties + * /nodes + * A.properties + * B.properties + */ +@Slf4j +public class SharedFlowGraphHelper extends BaseFlowGraphHelper { + + protected String sharedNodeFolder; + private static String NODE_FILE_SUFFIX = ".properties"; + private static String SHARED_NODE_FOLDER_NAME = "nodes"; + private static int NODE_FOLDER_DEPTH = 2; Review Comment: Same as above. Any reason why this number was chosen? As it looks to be different from the BaseFlowGraph helper function depth value -- 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]
