Class HBaseCommonTestingUtility

java.lang.Object
org.apache.hadoop.hbase.HBaseCommonTestingUtility
Direct Known Subclasses:
HBaseZKTestingUtility

@Public @Deprecated public class HBaseCommonTestingUtility extends Object
Deprecated.
since 3.0.0, will be removed in 4.0.0. Use TestingHBaseCluster instead.
Common helpers for testing HBase that do not depend on specific server/etc. things.
See Also:
  • org.apache.hadoop.hbase.HBaseCommonTestingUtil
  • Field Details

  • Constructor Details

  • Method Details

    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
      Deprecated.
      Returns this classes's instance of Configuration.
      Returns:
      Instance of Configuration.
    • getDataTestDir

      public org.apache.hadoop.fs.Path getDataTestDir()
      Deprecated.
      Returns:
      Where to write test data on local filesystem, specific to the test. Useful for tests that do not use a cluster. Creates it if it does not exist already.
    • getDataTestDir

      public org.apache.hadoop.fs.Path getDataTestDir(String name)
      Deprecated.
      Parameters:
      name - the name of a subdirectory or file in the test data directory
      Returns:
      Path to a subdirectory or file named {code subdirName} under getDataTestDir(). Does *NOT* create the directory or file if it does not exist.
    • setupDataTestDir

      protected org.apache.hadoop.fs.Path setupDataTestDir()
      Deprecated.
      Sets up a directory for a test to use.
      Returns:
      New directory path, if created.
    • getRandomDir

      public org.apache.hadoop.fs.Path getRandomDir()
      Deprecated.
      Returns:
      A dir with a random (uuid) name under the test dir
      See Also:
    • getRandomUUID

      public static UUID getRandomUUID()
      Deprecated.
    • createSubDir

      protected void createSubDir(String propertyName, org.apache.hadoop.fs.Path parent, String subDirName)
      Deprecated.
    • deleteOnExit

      boolean deleteOnExit()
      Deprecated.
      Returns True if we should delete testing dirs on exit.
    • cleanupTestDir

      public boolean cleanupTestDir()
      Deprecated.
      Returns True if we removed the test dirs
    • cleanupTestDir

      public boolean cleanupTestDir(String subdir)
      Deprecated.
      Parameters:
      subdir - Test subdir name.
      Returns:
      True if we removed the test dir
    • getBaseTestDir

      private org.apache.hadoop.fs.Path getBaseTestDir()
      Deprecated.
      Returns:
      Where to write test data on local filesystem; usually DEFAULT_BASE_TEST_DIRECTORY Should not be used by the unit tests, hence its's private. Unit test will use a subdirectory of this directory.
      See Also:
    • deleteDir

      boolean deleteDir(File dir)
      Deprecated.
      Parameters:
      dir - Directory to delete
      Returns:
      True if we deleted it.
    • waitFor

      public <E extends Exception> long waitFor(long timeout, <any> predicate) throws E
      Deprecated.
      Wrapper method for Waiter#waitFor(Configuration, long, Predicate).
      Throws:
      E extends Exception
    • waitFor

      public <E extends Exception> long waitFor(long timeout, long interval, <any> predicate) throws E
      Deprecated.
      Wrapper method for Waiter#waitFor(Configuration, long, long, Predicate).
      Throws:
      E extends Exception
    • waitFor

      public <E extends Exception> long waitFor(long timeout, long interval, boolean failIfTimeout, <any> predicate) throws E
      Deprecated.
      Wrapper method for Waiter#waitFor(Configuration, long, long, boolean, Predicate).
      Throws:
      E extends Exception
    • randomFreePort

      public static int randomFreePort()
      Deprecated.