1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.hadoop.hbase.security.visibility;
19
20 import static org.apache.hadoop.hbase.security.visibility.VisibilityConstants.LABELS_TABLE_NAME;
21
22 import org.apache.hadoop.hbase.HConstants;
23 import org.apache.hadoop.hbase.testclassification.MediumTests;
24 import org.apache.hadoop.hbase.security.User;
25 import org.junit.BeforeClass;
26 import org.junit.experimental.categories.Category;
27
28
29
30
31 @Category(MediumTests.class)
32 public class TestVisibilityLabelsWithDistributedLogReplay extends
33 TestVisibilityLabelsWithDefaultVisLabelService {
34
35 @BeforeClass
36 public static void setupBeforeClass() throws Exception {
37
38 conf = TEST_UTIL.getConfiguration();
39 conf.setBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY, true);
40 VisibilityTestUtil.enableVisiblityLabels(conf);
41
42 conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
43 ScanLabelGenerator.class);
44 conf.set("hbase.superuser", "admin");
45 TEST_UTIL.startMiniCluster(2);
46 SUPERUSER = User.createUserForTesting(conf, "admin", new String[] { "supergroup" });
47 USER1 = User.createUserForTesting(conf, "user1", new String[] {});
48
49
50 TEST_UTIL.waitTableEnabled(LABELS_TABLE_NAME.getName(), 50000);
51 addLabels();
52 }
53 }