Class TestSecureBulkLoadManager
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestSecureBulkLoadManager
@Tag("org.apache.hadoop.hbase.testclassification.RegionServerTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestSecureBulkLoadManager
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classA trick is used to make sure server-side failures( if any ) not being covered up by a client retry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static byte[]private static org.apache.hadoop.conf.Configurationprivate Threadprivate static byte[]private static byte[]private static byte[]private static byte[]private Threadprivate static final org.slf4j.Loggerprivate static byte[]private static org.apache.hadoop.hbase.TableNameprotected static final HBaseTestingUtilprotected Booleanprivate static byte[]private static byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddoBulkloadWithoutRetry(org.apache.hadoop.fs.Path dir) static Stream<org.junit.jupiter.params.provider.Arguments>private voidprepareHFile(org.apache.hadoop.fs.Path dir, byte[] key, byte[] value) voidsetUp()voidtearDown()voidAfter a secure bulkload finished , there is a clean-up for FileSystems used in the bulkload.
-
Field Details
-
LOG
-
TABLE
-
FAMILY
-
COLUMN
-
key1
-
key2
-
key3
-
value1
-
value3
-
SPLIT_ROWKEY
-
ealierBulkload
-
laterBulkload
-
useFileBasedSFT
-
testUtil
-
conf
-
-
Constructor Details
-
TestSecureBulkLoadManager
-
-
Method Details
-
parameters
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testForRaceCondition
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
- Throws:
Exception
-
prepareHFile
- Throws:
Exception
-