JacksonYao287 commented on code in PR #3425: URL: https://github.com/apache/ozone/pull/3425#discussion_r875612042
########## hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaOp.java: ########## @@ -0,0 +1,63 @@ +/** + * 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.hdds.scm.container.replication; + +import org.apache.hadoop.hdds.protocol.DatanodeDetails; + +/** + * Class to wrap details used to track pending replications. + */ +public class ContainerReplicaOp { + + /** + * Enum representing different types of pending Ops. + */ + public enum PendingOpType { + ADD, DELETE Review Comment: can we also add a type "ECRECONSTRUCT" , since EC reconstruction may also be a sort of inflight action. for ratis container, we don't need the info of replica index for both deletion and replication. but for the deletion and replication of EC container, replica index is needed. what`s more, EC reconstruction, we may need to hold the missingindexes and a list of target datanode. so , i mean, we can add a base class which includes only `scheduledEpochMillis` and `target`, just like the original inflight action. then we can extend the class for EC op(or some other type in the future). since the extended class is a kind of base class, we can manage them like the base class in monitor. when processing the extended class in the monitor, we can convert the base type to a certain extended type if needed -- 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]
