Class TestBulkLoadHFilesWithDfsPermissions

java.lang.Object
org.apache.hadoop.hbase.tool.TestBulkLoadHFilesWithDfsPermissions

@Tag("org.apache.hadoop.hbase.testclassification.MiscTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests") public class TestBulkLoadHFilesWithDfsPermissions extends Object
End-to-end bulk load test on a MiniDFSCluster with HDFS permissions enabled and three distinct identities: the HBase service user (which runs the mini cluster and must not be the HDFS superuser), the bulk load client (which owns the input HFiles and the target table) and an unrelated attacker user.

A single HFile spanning the table split point is loaded, so BulkLoadHFilesTool has to split it into .tmp/<uuid>.bottom and .tmp/<uuid>.top inside the client's own directory. The test verifies that the load succeeds without any world-writable permission on the split artifacts (they are handed to the service user through the staging directory of SecureBulkLoadManager, which is protected by a random directory name), and that a third user cannot tamper with the split directory.