hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1285) Implement actions need to be taken after chill mode exit wait time
Date Thu, 11 Apr 2019 17:25:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 11/Apr/19 17:24
            Start Date: 11/Apr/19 17:24
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #612: HDDS-1285. Implement
actions need to be taken after chill mode exit w…
URL: https://github.com/apache/hadoop/pull/612#discussion_r274541765
 
 

 ##########
 File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/chillmode/TestSCMChillModeWithPipelineRules.java
 ##########
 @@ -0,0 +1,203 @@
+/**
+ * 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.chillmode;
+
+import org.apache.hadoop.hdds.HddsConfigKeys;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.hdds.protocol.DatanodeDetails;
+import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
+import org.apache.hadoop.hdds.scm.ScmConfigKeys;
+import org.apache.hadoop.hdds.scm.container.ReplicationManager;
+import org.apache.hadoop.hdds.scm.container.replication.ReplicationActivityStatus;
+import org.apache.hadoop.hdds.scm.pipeline.Pipeline;
+import org.apache.hadoop.hdds.scm.pipeline.PipelineManager;
+import org.apache.hadoop.hdds.scm.server.StorageContainerManager;
+import org.apache.hadoop.ozone.MiniOzoneCluster;
+import org.apache.hadoop.test.GenericTestUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+import java.util.List;
+import java.util.concurrent.TimeoutException;
+
+import static org.junit.Assert.fail;
+
+/**
+ * This class tests SCM Chill mode with pipeline rules.
+ */
+
+public class TestSCMChillModeWithPipelineRules {
+
+  private static MiniOzoneCluster cluster;
+  private OzoneConfiguration conf = new OzoneConfiguration();
+  private PipelineManager pipelineManager;
+  private MiniOzoneCluster.Builder clusterBuilder;
+
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  public void setup(int numDatanodes) throws Exception {
+    conf.set(HddsConfigKeys.OZONE_METADATA_DIRS,
+        temporaryFolder.newFolder().toString());
+    conf.setBoolean(
+        HddsConfigKeys.HDDS_SCM_CHILLMODE_PIPELINE_AVAILABILITY_CHECK,
+        true);
+    conf.set(HddsConfigKeys.HDDS_SCM_WAIT_TIME_AFTER_CHILL_MODE_EXIT, "10s");
+    conf.set(ScmConfigKeys.OZONE_SCM_PIPELINE_CREATION_INTERVAL, "10s");
+    clusterBuilder = MiniOzoneCluster.newBuilder(conf)
+        .setNumDatanodes(numDatanodes)
+        .setHbInterval(1000)
+        .setHbProcessorInterval(1000);
+
+    cluster = clusterBuilder.build();
+    cluster.waitForClusterToBeReady();
+    StorageContainerManager scm = cluster.getStorageContainerManager();
+    pipelineManager = scm.getPipelineManager();
+  }
+
+
+  @Test
+  public void testScmChillMode() throws Exception {
+
+    int datanodeCount = 6;
+    setup(datanodeCount);
+
+    waitForRatis3NodePipelines(datanodeCount/3);
+    waitForRatis1NodePipelines(datanodeCount);
+
+    int totalPipelineCount = datanodeCount + (datanodeCount/3);
+
+    //Cluster is started successfully
+    cluster.stop();
+
+    cluster.restartOzoneManager();
+    cluster.restartStorageContainerManager(false);
+
+    pipelineManager = cluster.getStorageContainerManager().getPipelineManager();
+    List<Pipeline> pipelineList =
+        pipelineManager.getPipelines(HddsProtos.ReplicationType.RATIS,
+            HddsProtos.ReplicationFactor.THREE);
+
+
+    pipelineList.get(0).getNodes().forEach(datanodeDetails -> {
+      try {
+        cluster.restartHddsDatanode(datanodeDetails, false);
+      } catch (Exception ex) {
+        fail("Datanode restart failed");
+      }
+    });
+
+
+    SCMChillModeManager scmChillModeManager =
+        cluster.getStorageContainerManager().getScmChillModeManager();
+
+
+    // Ceil(0.1 * 2) is 1, as one pipeline is healthy healthy pipeline rule is
+    // satisfied
+
+    GenericTestUtils.waitFor(() ->
 
 Review comment:
   Yes because here scm is restarted without waiting for any datanodes.
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 226193)
    Time Spent: 2h 50m  (was: 2h 40m)

> Implement actions need to be taken after chill mode exit wait time
> ------------------------------------------------------------------
>
>                 Key: HDDS-1285
>                 URL: https://issues.apache.org/jira/browse/HDDS-1285
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: SCM
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> # Destroy and close the pipelines
>  # Close all the containers on the pipeline.
>  # trigger for pipeline creation



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

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


Mime
View raw message