From commits-return-70981-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Mon Apr 9 22:51:13 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DA8F0180780 for ; Mon, 9 Apr 2018 22:51:10 +0200 (CEST) Received: (qmail 80864 invoked by uid 500); 9 Apr 2018 20:51:06 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 80007 invoked by uid 99); 9 Apr 2018 20:51:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2018 20:51:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8CA04F678A; Mon, 9 Apr 2018 20:51:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: busbey@apache.org To: commits@hbase.apache.org Date: Mon, 09 Apr 2018 20:51:27 -0000 Message-Id: <0ffba5225de6426e881ee847c57e1ee5@git.apache.org> In-Reply-To: <0f68eb79af2c4fe5954ab4d09d3344a2@git.apache.org> References: <0f68eb79af2c4fe5954ab4d09d3344a2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [23/52] [partial] hbase-site git commit: HBASE-20365 addendum. include the test*docs from 2.0.0-beta-2 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2d0e0a43/2.0/testapidocs/org/apache/hadoop/hbase/IntegrationTestingUtility.html ---------------------------------------------------------------------- diff --git a/2.0/testapidocs/org/apache/hadoop/hbase/IntegrationTestingUtility.html b/2.0/testapidocs/org/apache/hadoop/hbase/IntegrationTestingUtility.html new file mode 100644 index 0000000..d8e18dc --- /dev/null +++ b/2.0/testapidocs/org/apache/hadoop/hbase/IntegrationTestingUtility.html @@ -0,0 +1,530 @@ + + + + + + +IntegrationTestingUtility (Apache HBase 2.0.0-beta-2 Test API) + + + + + + + + + + + +
+
org.apache.hadoop.hbase
+

Class IntegrationTestingUtility

+
+
+ +
+
    +
  • +
    +
    +
    public class IntegrationTestingUtility
    +extends HBaseTestingUtility
    +
    Facility for integration/system tests. This extends HBaseTestingUtility + and adds-in the functionality needed by integration and system tests. This class understands + distributed and pseudo-distributed/local cluster deployments, and abstracts those from the tests + in this module. +

    + IntegrationTestingUtility is constructed and used by the integration tests, but the tests + themselves should not assume a particular deployment. They can rely on the methods in this + class and HBaseCluster. Before the testing begins, the test should initialize the cluster by + calling initializeCluster(int). +

    + The cluster that is used defaults to a mini cluster, but it can be forced to use a distributed + cluster by calling setUseDistributedCluster(Configuration). This method is invoked by + test drivers (maven, IntegrationTestsDriver, etc) before initializing the cluster + via initializeCluster(int). Individual tests should not directly call + setUseDistributedCluster(Configuration).

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        IS_DISTRIBUTED_CLUSTER

        +
        public static final String IS_DISTRIBUTED_CLUSTER
        +
        Configuration that controls whether this utility assumes a running/deployed cluster. + This is different than "hbase.cluster.distributed" since that parameter indicates whether the + cluster is in an actual distributed environment, while this shows that there is a + deployed (distributed or pseudo-distributed) cluster running, and we do not need to + start a mini-cluster for tests.
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        initializeCluster

        +
        public void initializeCluster(int numSlaves)
        +                       throws Exception
        +
        Initializes the state of the cluster. It starts a new in-process mini cluster, OR + if we are given an already deployed distributed cluster it initializes the state.
        +
        +
        Parameters:
        +
        numSlaves - Number of slaves to start up if we are booting a mini cluster. Otherwise + we check whether this many nodes are available and throw an exception if not.
        +
        Throws:
        +
        Exception
        +
        +
      • +
      + + + +
        +
      • +

        checkNodeCount

        +
        public void checkNodeCount(int numSlaves)
        +                    throws Exception
        +
        Checks whether we have more than numSlaves nodes. Throws an + exception otherwise.
        +
        +
        Throws:
        +
        Exception
        +
        +
      • +
      + + + +
        +
      • +

        restoreCluster

        +
        public void restoreCluster()
        +                    throws IOException
        +
        Restores the cluster to the initial state if it is a distributed cluster, otherwise, shutdowns the + mini cluster.
        +
        +
        Throws:
        +
        IOException
        +
        +
      • +
      + + + +
        +
      • +

        setUseDistributedCluster

        +
        public static void setUseDistributedCluster(org.apache.hadoop.conf.Configuration conf)
        +
        Sets the configuration property to use a distributed cluster for the integration tests. Test drivers + should use this to enforce cluster deployment.
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.

+ +