[ 
https://issues.apache.org/jira/browse/HDDS-1205?focusedWorklogId=215113&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-215113
 ]

ASF GitHub Bot logged work on HDDS-1205:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 00:00
            Start Date: 19/Mar/19 00:00
    Worklog Time Spent: 10m 
      Work Description: arp7 commented on pull request #620: HDDS-1205. 
Refactor ReplicationManager to handle QUASI_CLOSED contain…
URL: https://github.com/apache/hadoop/pull/620#discussion_r266640460
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
 ##########
 @@ -0,0 +1,686 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdds.protocol.DatanodeDetails;
+import org.apache.hadoop.hdds.protocol.proto.HddsProtos.LifeCycleState;
+import org.apache.hadoop.hdds.protocol.proto
+    .StorageContainerDatanodeProtocolProtos.ContainerReplicaProto.State;
+import org.apache.hadoop.hdds.scm.ScmConfigKeys;
+import org.apache.hadoop.hdds.scm.container.placement.algorithms
+    .ContainerPlacementPolicy;
+import org.apache.hadoop.hdds.scm.events.SCMEvents;
+import org.apache.hadoop.hdds.server.events.EventPublisher;
+import org.apache.hadoop.ozone.lock.LockManager;
+import org.apache.hadoop.ozone.protocol.commands.CloseContainerCommand;
+import org.apache.hadoop.ozone.protocol.commands.CommandForDatanode;
+import org.apache.hadoop.ozone.protocol.commands.DeleteContainerCommand;
+import org.apache.hadoop.ozone.protocol.commands.ReplicateContainerCommand;
+import org.apache.hadoop.util.ExitUtil;
+import org.apache.hadoop.util.Time;
+import org.apache.ratis.util.Preconditions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+/**
+ * Replication Manager (RM) is the one which is responsible for making sure
+ * that the containers are properly replicated. Replication Manager deals only
+ * with Quasi Closed / Closed container.
+ */
+public class ReplicationManager {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(ReplicationManager.class);
+
+  /**
+   * Reference to the ContainerManager.
+   */
+  private final ContainerManager containerManager;
+
+  /**
+   * PlacementPolicy which is used to identify where a container
+   * should be copied.
+   */
+  private final ContainerPlacementPolicy containerPlacement;
+
+  /**
+   * EventPublisher to fire Replicate and Delete container commands.
+   */
+  private final EventPublisher eventPublisher;
+
+  /**
+   * Used for locking a container with its ID while processing it.
+   */
+  private final LockManager<ContainerID> lockManager;
 
 Review comment:
   Can the locks just be embedded in the container object? Not a big deal and 
we can revisit it in the future.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 215113)
    Time Spent: 1h 20m  (was: 1h 10m)

> Refactor ReplicationManager to handle QUASI_CLOSED containers
> -------------------------------------------------------------
>
>                 Key: HDDS-1205
>                 URL: https://issues.apache.org/jira/browse/HDDS-1205
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: SCM
>            Reporter: Nanda kumar
>            Assignee: Nanda kumar
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HDDS-1205.000.patch, HDDS-1205.001.patch, 
> HDDS-1205.002.patch
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> This Jira is for refactoring the ReplicationManager code to handle all the 
> scenarios that are possible with the introduction of QUASI_CLOSED state of a 
> container.
> The new ReplicationManager will go through the complete set of containers in 
> SCM to find out under/over replicated and unhealthy containers and takes 
> appropriate action.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to