use of com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler in project aws-athena-query-federation by awslabs.
the class HiveMuxMetadataHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcMetadataHandler> metadataHandlersMap = new HashMap<String, JdbcMetadataHandler>();
for (int jdbcMetadataHandlerCount = 0; jdbcMetadataHandlerCount <= 100; jdbcMetadataHandlerCount++) {
metadataHandlersMap.put("metaHive" + jdbcMetadataHandlerCount, this.hiveMetadataHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", HiveConstants.HIVE_NAME, "hive2://jdbc:hive2://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new HiveMuxMetadataHandler(this.secretsManager, this.athena, this.jdbcConnectionFactory, metadataHandlersMap, databaseConnectionConfig);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
use of com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler in project aws-athena-query-federation by awslabs.
the class HiveMuxMetadataHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcMetadataHandler> metadataHandlersMap = new HashMap<String, JdbcMetadataHandler>();
for (int jdbcMetadataHandlerCount = 0; jdbcMetadataHandlerCount <= 100; jdbcMetadataHandlerCount++) {
metadataHandlersMap.put("metaHive" + jdbcMetadataHandlerCount, this.hiveMetadataHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", HiveConstants.HIVE_NAME, "hive2://jdbc:hive2://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new HiveMuxMetadataHandler(this.secretsManager, this.athena, this.jdbcConnectionFactory, metadataHandlersMap, databaseConnectionConfig);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
use of com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler in project aws-athena-query-federation by awslabs.
the class ImpalaMuxMetadataHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcMetadataHandler> metadataHandlersMap = new HashMap<String, JdbcMetadataHandler>();
for (int jdbcMetadataHandlerCount = 0; jdbcMetadataHandlerCount <= 100; jdbcMetadataHandlerCount++) {
metadataHandlersMap.put("metaHive" + jdbcMetadataHandlerCount, this.impalaMetadataHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", ImpalaConstants.IMPALA_NAME, "hive2://jdbc:hive2://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new ImpalaMuxMetadataHandler(this.secretsManager, this.athena, this.jdbcConnectionFactory, metadataHandlersMap, databaseConnectionConfig);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
Aggregations