1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18 package org.apache.hadoop.hbase.mapreduce;
19
20 import org.apache.hadoop.hbase.HBaseTestingUtility;
21 import org.apache.hadoop.hbase.LargeTests;
22 import org.apache.hadoop.hbase.security.access.AccessControlLists;
23 import org.apache.hadoop.hbase.security.access.SecureTestUtil;
24
25 import org.junit.BeforeClass;
26 import org.junit.Test;
27 import org.junit.experimental.categories.Category;
28
29
30 /**
31 * Reruns TestSecureLoadIncrementalHFilesSplitRecovery
32 * using LoadIncrementalHFiles in secure mode.
33 * This suite is unable to verify the security handoff/turnover
34 * as miniCluster is running as system user thus has root privileges
35 * and delegation tokens don't seem to work on miniDFS.
36 *
37 * Thus SecureBulkload can only be completely verified by running
38 * integration tests against a secure cluster. This suite is still
39 * invaluable as it verifies the other mechanisms that need to be
40 * supported as part of a LoadIncrementalFiles call.
41 */
42 @Category(LargeTests.class)
43 public class TestSecureLoadIncrementalHFilesSplitRecovery extends TestLoadIncrementalHFilesSplitRecovery {
44
45 //This "overrides" the parent static method
46 //make sure they are in sync
47 @BeforeClass
48 public static void setupCluster() throws Exception {
49 useSecure = true;
50 util = new HBaseTestingUtility();
51 // setup configuration
52 SecureTestUtil.enableSecurity(util.getConfiguration());
53
54 util.startMiniCluster();
55
56 // Wait for the ACL table to become available
57 util.waitTableEnabled(AccessControlLists.ACL_TABLE_NAME.getName());
58 }
59
60 //Disabling this test as it does not work in secure mode
61 @Test
62 @Override
63 public void testBulkLoadPhaseFailure() {
64 }
65 }
66