phet commented on code in PR #3878: URL: https://github.com/apache/gobblin/pull/3878#discussion_r1491599812
########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/DagNodeId.java: ########## @@ -0,0 +1,37 @@ +/* + * 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 com.google.common.base.Joiner; + +import lombok.Data; + + +@Data +public class DagNodeId { Review Comment: every class needs javadoc... suggest mentioning relationship to `Dag.DagNode<JEP>` ########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlDagStateStore.java: ########## @@ -160,21 +165,21 @@ public Set<String> getDagIds() throws IOException { * Convert a state store entry into a dag ID * e.g. storeName = group1_name1, tableName = 1234 gives dagId group1_name1_1234 */ - private String entryToDagId(String storeName, String tableName) { + public static String entryToDagId(String storeName, String tableName) { return Joiner.on(ServiceConfigKeys.DAG_STORE_KEY_SEPARATION_CHARACTER).join(storeName, tableName); } /** * Return a storeName given a dagId. Store name is defined as flowGroup_flowName. */ - private String getStoreNameFromDagId(String dagId) { + public static String getStoreNameFromDagId(String dagId) { return dagId.substring(0, dagId.lastIndexOf(ServiceConfigKeys.DAG_STORE_KEY_SEPARATION_CHARACTER)); } /** * Return a tableName given a dagId. Table name is defined as the flowExecutionId. */ - private String getTableNameFromDagId(String dagId) { + public static String getTableNameFromDagId(String dagId) { Review Comment: who's calling these? I missed why they needed to become public. (these encodings really do feel like something to remain encapsulated entirely inside this class) -- 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]
