You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sh...@apache.org on 2020/09/11 09:14:40 UTC

[hadoop-ozone] branch master updated: HDDS-4218.Remove test TestRatisManager (#1409)

This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 2134c2e  HDDS-4218.Remove test TestRatisManager (#1409)
2134c2e is described below

commit 2134c2e0e49685940d3f55f63cdb3fc1fc7509d7
Author: Sadanand Shenoy <sa...@gmail.com>
AuthorDate: Fri Sep 11 14:44:29 2020 +0530

    HDDS-4218.Remove test TestRatisManager (#1409)
---
 .../container/ozoneimpl/TestRatisManager.java      | 124 ---------------------
 1 file changed, 124 deletions(-)

diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestRatisManager.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestRatisManager.java
deleted file mode 100644
index 2ca7cfe..0000000
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestRatisManager.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.container.ozoneimpl;
-
-import org.apache.hadoop.hdds.protocol.DatanodeDetails;
-import org.apache.hadoop.ozone.HddsDatanodeService;
-import org.apache.hadoop.ozone.MiniOzoneCluster;
-import org.apache.hadoop.hdds.conf.OzoneConfiguration;
-import org.apache.hadoop.ozone.RatisTestHelper;
-import org.apache.ratis.rpc.RpcType;
-import org.apache.ratis.rpc.SupportedRpcType;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.Timeout;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.stream.Collectors;
-
-/**
- * Tests ozone containers with Apache Ratis.
- */
-@Ignore("Disabling Ratis tests for pipeline work.")
-public class TestRatisManager {
-  private static final Logger LOG = LoggerFactory.getLogger(
-      TestRatisManager.class);
-
-  static OzoneConfiguration newOzoneConfiguration() {
-    return new OzoneConfiguration();
-  }
-
-
-  /** Set the timeout for every test. */
-  @Rule
-  public Timeout testTimeout = new Timeout(200_000);
-
-  @Test
-  public void testTestRatisManagerGrpc() throws Exception {
-    runTestRatisManager(SupportedRpcType.GRPC);
-  }
-
-  @Test
-  public void testTestRatisManagerNetty() throws Exception {
-    runTestRatisManager(SupportedRpcType.NETTY);
-  }
-
-  private static void runTestRatisManager(RpcType rpc) throws Exception {
-    LOG.info("runTestRatisManager, rpc={}", rpc);
-
-    // create Ozone clusters
-    final OzoneConfiguration conf = newOzoneConfiguration();
-    RatisTestHelper.initRatisConf(rpc, conf);
-    final MiniOzoneCluster cluster = MiniOzoneCluster.newBuilder(conf)
-        .setNumDatanodes(5)
-        .build();
-    try {
-      cluster.waitForClusterToBeReady();
-
-      final List<HddsDatanodeService> datanodes = cluster.getHddsDatanodes();
-      final List<DatanodeDetails> datanodeDetailsSet = datanodes.stream()
-          .map(HddsDatanodeService::getDatanodeDetails).collect(
-              Collectors.toList());
-
-      //final RatisManager manager = RatisManager.newRatisManager(conf);
-
-      final int[] idIndex = {3, 4, 5};
-      for (int i = 0; i < idIndex.length; i++) {
-        final int previous = i == 0 ? 0 : idIndex[i - 1];
-        final List<DatanodeDetails> subIds = datanodeDetailsSet.subList(
-            previous, idIndex[i]);
-
-        // Create Ratis cluster
-        final String ratisId = "ratis" + i;
-        //manager.createRatisCluster(ratisId, subIds);
-        LOG.info("Created RatisCluster {}", ratisId);
-
-        // check Ratis cluster members
-        //final List<DatanodeDetails> dns = manager.getMembers(ratisId);
-        //Assert.assertEquals(subIds, dns);
-      }
-
-      // randomly close two of the clusters
-      final int chosen = ThreadLocalRandom.current().nextInt(idIndex.length);
-      LOG.info("chosen = {}", chosen);
-
-      for (int i = 0; i < idIndex.length; i++) {
-        if (i != chosen) {
-          final String ratisId = "ratis" + i;
-          //manager.closeRatisCluster(ratisId);
-        }
-      }
-
-      // update datanodes
-      final String ratisId = "ratis" + chosen;
-      //manager.updatePipeline(ratisId, allIds);
-
-      // check Ratis cluster members
-      //final List<DatanodeDetails> dns = manager.getMembers(ratisId);
-      //Assert.assertEquals(allIds, dns);
-    } finally {
-      cluster.shutdown();
-    }
-  }
-
-}


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