use of org.apache.hadoop.hbase.JMXListener in project hbase by apache.
the class TestMasterCoprocessorServices method testVisibilityLabelServices.
@Test
public void testVisibilityLabelServices() {
MasterCoprocessor defaultImpl = new VisibilityController();
MasterCoprocessor customImpl = new MockVisibilityController();
MasterCoprocessor unrelatedImpl = new JMXListener();
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(defaultImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(customImpl), VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.emptyList(), VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(null, VisibilityLabelsService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.singletonList(unrelatedImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, customImpl), VisibilityLabelsService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, defaultImpl), VisibilityLabelsService.Interface.class));
}
use of org.apache.hadoop.hbase.JMXListener in project hbase by apache.
the class TestMasterCoprocessorServices method testAccessControlServices.
@Test
public void testAccessControlServices() {
MasterCoprocessor defaultImpl = new AccessController();
MasterCoprocessor customImpl = new MockAccessController();
MasterCoprocessor unrelatedImpl = new JMXListener();
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(defaultImpl), AccessControlService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Collections.singletonList(customImpl), AccessControlService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.emptyList(), AccessControlService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(null, AccessControlService.Interface.class));
assertFalse(masterServices.checkCoprocessorWithService(Collections.singletonList(unrelatedImpl), AccessControlService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, customImpl), AccessControlService.Interface.class));
assertTrue(masterServices.checkCoprocessorWithService(Arrays.asList(unrelatedImpl, defaultImpl), AccessControlService.Interface.class));
}
Aggregations