Search in sources :

Example 6 with UserHS2ConnectionFileParser

use of org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser in project hive by apache.

the class TestUserHS2ConnectionFileParser method testNoLocationFoundCase.

/*
   * Tests if null value returned when file is not present in any of the lookup locations
   */
@Test
public void testNoLocationFoundCase() throws Exception {
    testLocations.add(LOCATION_1);
    testLocations.add(LOCATION_2);
    testLocations.add(LOCATION_3);
    UserHS2ConnectionFileParser testHS2ConfigManager = new UserHS2ConnectionFileParser(testLocations);
    Assert.assertTrue(testHS2ConfigManager.getConnectionProperties().isEmpty());
}
Also used : UserHS2ConnectionFileParser(org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser) Test(org.junit.Test)

Example 7 with UserHS2ConnectionFileParser

use of org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser in project hive by apache.

the class TestUserHS2ConnectionFileParser method getParsedUrlFromConfigFile.

private String getParsedUrlFromConfigFile(String filename) throws BeelineHS2ConnectionFileParseException {
    String path = HiveTestUtils.getFileFromClasspath(filename);
    testLocations.add(path);
    UserHS2ConnectionFileParser testHS2ConfigManager = new UserHS2ConnectionFileParser(testLocations);
    return HS2ConnectionFileUtils.getUrl(testHS2ConfigManager.getConnectionProperties());
}
Also used : UserHS2ConnectionFileParser(org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser)

Aggregations

UserHS2ConnectionFileParser (org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser)7 Test (org.junit.Test)5 Field (java.lang.reflect.Field)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Properties (java.util.Properties)1 BeelineSiteParseException (org.apache.hive.beeline.hs2connection.BeelineSiteParseException)1 BeelineSiteParser (org.apache.hive.beeline.hs2connection.BeelineSiteParser)1 HS2ConnectionFileParser (org.apache.hive.beeline.hs2connection.HS2ConnectionFileParser)1 HiveSiteHS2ConnectionFileParser (org.apache.hive.beeline.hs2connection.HiveSiteHS2ConnectionFileParser)1 JdbcUriParseException (org.apache.hive.jdbc.JdbcUriParseException)1 JdbcConnectionParams (org.apache.hive.jdbc.Utils.JdbcConnectionParams)1