use of org.apache.knox.gateway.ha.provider.URLManager in project knox by apache.
the class AtlasZookeeperURLManagerTest method doTestAtlasZooKeeperURLManager.
private void doTestAtlasZooKeeperURLManager(final String serviceName, final boolean enabled, final String ensemble, final String namespace) {
HaServiceConfig config = new DefaultHaServiceConfig(serviceName);
config.setEnabled(enabled);
config.setZookeeperEnsemble(ensemble);
config.setZookeeperNamespace(namespace);
URLManager manager = URLManagerLoader.loadURLManager(config);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof AtlasZookeeperURLManager);
}
use of org.apache.knox.gateway.ha.provider.URLManager in project knox by apache.
the class HBaseZookeeperURLManagerTest method testHBaseZookeeperURLManagerLoading.
@Test
public void testHBaseZookeeperURLManagerLoading() {
HaServiceConfig config = new DefaultHaServiceConfig("WEBHBASE");
config.setEnabled(true);
config.setZookeeperEnsemble(cluster.getConnectString());
URLManager manager = URLManagerLoader.loadURLManager(config);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof HBaseZookeeperURLManager);
}
use of org.apache.knox.gateway.ha.provider.URLManager in project knox by apache.
the class HS2ZookeeperURLManagerTest method testHS2URLManagerLoading.
@Test
public void testHS2URLManagerLoading() {
HaServiceConfig config = new DefaultHaServiceConfig("HIVE");
config.setEnabled(true);
config.setZookeeperEnsemble(cluster.getConnectString());
config.setZookeeperNamespace("hiveServer2");
URLManager manager = URLManagerLoader.loadURLManager(config);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof HS2ZookeeperURLManager);
}
use of org.apache.knox.gateway.ha.provider.URLManager in project knox by apache.
the class SOLRZookeeperURLManagerTest method testSOLRZookeeperURLManagerLoading.
@Test
public void testSOLRZookeeperURLManagerLoading() {
HaServiceConfig config = new DefaultHaServiceConfig("SOLR");
config.setEnabled(true);
config.setZookeeperEnsemble(cluster.getConnectString());
URLManager manager = URLManagerLoader.loadURLManager(config);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof SOLRZookeeperURLManager);
}
use of org.apache.knox.gateway.ha.provider.URLManager in project knox by apache.
the class URLManagerLoaderTest method testDefaultURLManager.
@Test
public void testDefaultURLManager() {
DefaultHaServiceConfig serviceConfig = new DefaultHaServiceConfig("nothing like this exists");
URLManager manager = URLManagerLoader.loadURLManager(serviceConfig);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof DefaultURLManager);
manager = URLManagerLoader.loadURLManager(null);
Assert.assertNotNull(manager);
Assert.assertTrue(manager instanceof DefaultURLManager);
}
Aggregations