use of com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler in project aws-athena-query-federation by awslabs.
the class ImpalaMuxRecordHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcRecordHandler> recorddataHandlersMap = new HashMap<String, JdbcRecordHandler>();
for (int jdbcHandlerCount = 0; jdbcHandlerCount <= 100; jdbcHandlerCount++) {
recorddataHandlersMap.put("recordImpala" + jdbcHandlerCount, this.impalaRecordHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", ImpalaConstants.IMPALA_NAME, "impala://jdbc:impala://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new ImpalaMuxRecordHandler(this.amazonS3, this.secretsManager, this.athena, this.jdbcConnectionFactory, databaseConnectionConfig, recorddataHandlersMap);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
use of com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler in project aws-athena-query-federation by awslabs.
the class HiveMuxRecordHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcRecordHandler> recorddataHandlersMap = new HashMap<String, JdbcRecordHandler>();
for (int jdbcHandlerCount = 0; jdbcHandlerCount <= 100; jdbcHandlerCount++) {
recorddataHandlersMap.put("recordHive" + jdbcHandlerCount, this.hiveRecordHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", HiveConstants.HIVE_NAME, "hive2://jdbc:hive2://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new HiveMuxRecordHandler(this.amazonS3, this.secretsManager, this.athena, this.jdbcConnectionFactory, databaseConnectionConfig, recorddataHandlersMap);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
use of com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler in project aws-athena-query-federation by awslabs.
the class HiveMuxRecordHandlerTest method maxCatalogTest.
@Test
public void maxCatalogTest() {
Map<String, JdbcRecordHandler> recorddataHandlersMap = new HashMap<String, JdbcRecordHandler>();
for (int jdbcHandlerCount = 0; jdbcHandlerCount <= 100; jdbcHandlerCount++) {
recorddataHandlersMap.put("recordHive" + jdbcHandlerCount, this.hiveRecordHandler);
}
DatabaseConnectionConfig databaseConnectionConfig = new DatabaseConnectionConfig("testCatalog1", HiveConstants.HIVE_NAME, "hive2://jdbc:hive2://54.89.6.2:10000/authena;AuthMech=3;${testSecret}", "testSecret");
try {
new HiveMuxRecordHandler(this.amazonS3, this.secretsManager, this.athena, this.jdbcConnectionFactory, databaseConnectionConfig, recorddataHandlersMap);
} catch (Exception e) {
e.getMessage();
Assert.assertTrue(e.getMessage().contains("Max 100 catalogs supported in multiplexer."));
}
}
Aggregations