Class TestSecureBulkLoadManager

java.lang.Object
org.apache.hadoop.hbase.regionserver.TestSecureBulkLoadManager

public class TestSecureBulkLoadManager extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • data

      public static Collection<Boolean> data()
    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • tearDown

      public void tearDown() throws Exception
      Throws:
      Exception
    • testForRaceCondition

      public void testForRaceCondition() throws Exception
      After a secure bulkload finished , there is a clean-up for FileSystems used in the bulkload. Sometimes, FileSystems used in the finished bulkload might also be used in other bulkload calls, or there are other FileSystems created by the same user, they could be closed by a FileSystem.closeAllForUGI call. So during the clean-up, those FileSystems need to be used later can not get closed ,or else a race condition occurs. testForRaceCondition tests the case that two secure bulkload calls from the same UGI go into two different regions and one bulkload finishes earlier when the other bulkload still needs its FileSystems, checks that both bulkloads succeed.
      Throws:
      Exception
    • doBulkloadWithoutRetry

      private void doBulkloadWithoutRetry(org.apache.hadoop.fs.Path dir) throws Exception
      Throws:
      Exception
    • prepareHFile

      private void prepareHFile(org.apache.hadoop.fs.Path dir, byte[] key, byte[] value) throws Exception
      Throws:
      Exception