Search in sources :

Example 6 with UdbConfiguration

use of alluxio.table.common.udb.UdbConfiguration in project alluxio by Alluxio.

the class GlueDatabaseTest method createNullName.

@Test
public void createNullName() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "glue", null, null, DB_NAME);
    assertEquals(DB_NAME, GlueDatabase.create(udbContext, new UdbConfiguration(ImmutableMap.of())).getName());
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Test(org.junit.Test)

Example 7 with UdbConfiguration

use of alluxio.table.common.udb.UdbConfiguration in project alluxio by Alluxio.

the class HiveDatabaseTest method createEmptyName.

@Test
public void createEmptyName() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "hive", "thrift://not_running:9083", "", DB_NAME);
    assertEquals(DB_NAME, HiveDatabase.create(udbContext, new UdbConfiguration(ImmutableMap.of())).getName());
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Test(org.junit.Test)

Example 8 with UdbConfiguration

use of alluxio.table.common.udb.UdbConfiguration in project alluxio by Alluxio.

the class HiveDatabaseTest method createEmptyConnectionUri.

@Test
public void createEmptyConnectionUri() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "hive", "", DB_NAME, DB_NAME);
    assertEquals(DB_NAME, HiveDatabase.create(udbContext, new UdbConfiguration(ImmutableMap.of())).getName());
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Test(org.junit.Test)

Example 9 with UdbConfiguration

use of alluxio.table.common.udb.UdbConfiguration in project alluxio by Alluxio.

the class HiveDatabaseTest method createNullName.

@Test
public void createNullName() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "hive", "thrift://not_running:9083", null, DB_NAME);
    assertEquals(DB_NAME, HiveDatabase.create(udbContext, new UdbConfiguration(ImmutableMap.of())).getName());
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Test(org.junit.Test)

Example 10 with UdbConfiguration

use of alluxio.table.common.udb.UdbConfiguration in project alluxio by Alluxio.

the class HiveDatabaseTest method before.

@Before
public void before() {
    mUdbContext = new UdbContext(null, null, "hive", "thrift://not_running:9083", DB_NAME, DB_NAME);
    mUdbConf = new UdbConfiguration(CONF);
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Before(org.junit.Before)

Aggregations

UdbConfiguration (alluxio.table.common.udb.UdbConfiguration)10 UdbContext (alluxio.table.common.udb.UdbContext)8 Test (org.junit.Test)7 Before (org.junit.Before)3