szetszwo commented on code in PR #8059: URL: https://github.com/apache/ozone/pull/8059#discussion_r1996974880
########## hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/execution/OMGateway.java: ########## @@ -0,0 +1,106 @@ +/* + * 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.hadoop.ozone.om.execution; + +import static org.apache.hadoop.ozone.util.MetricUtil.captureLatencyNs; + +import com.google.protobuf.ServiceException; +import java.io.IOException; +import org.apache.hadoop.ozone.om.OMPerformanceMetrics; +import org.apache.hadoop.ozone.om.OzoneManager; +import org.apache.hadoop.ozone.om.helpers.OMAuditLogger; +import org.apache.hadoop.ozone.om.ratis.utils.OzoneManagerRatisUtils; +import org.apache.hadoop.ozone.om.request.OMClientRequest; +import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest; +import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse; +import org.apache.ratis.protocol.ClientId; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * entry for execution flow for write request. + */ +public class OMGateway { + private static final Logger LOG = LoggerFactory.getLogger(OMGateway.class); + + private final OzoneManager ozoneManager; + private final OMPerformanceMetrics perfMetrics; + + public OMGateway(OzoneManager om) throws IOException { + this.ozoneManager = om; + this.perfMetrics = ozoneManager.getPerfMetrics(); + } + + public void start() { + // TODO: with pre-ratis execution flow, this is required to manage flow Review Comment: Let's add the `start` and `stop` methods in a later JIRA. We can discuss the details at that time, too see if there is another approach, e.g. we may pass an `ExecutorService` instead. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
