Search in sources :

Example 1 with UdbConfiguration

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

the class RemoteGlueTest method connect.

@Before
public /**
 * Integration test with remote glue service.
 */
void connect() {
    Map<String, String> conf = ImmutableMap.of("aws.accesskey", AWS_ACCESS_KEY_ID, "aws.secretkey", AWS_SECRET_KEY, "aws.region", AWS_REGION, "aws.catalog.id", CATALOG_ID);
    mUdbConfiguration = new UdbConfiguration(conf);
    mGlueDatabase = new GlueDatabase(mUdbContext, mUdbConfiguration, DB_NAME);
    mGlueClient = mGlueDatabase.getClient();
}
Also used : UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Before(org.junit.Before)

Example 2 with UdbConfiguration

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

the class GlueDatabaseTest method before.

@Before
public void before() {
    Map<String, String> conf = ImmutableMap.of("aws.region", "us-east-1");
    mUdbConfiguration = new UdbConfiguration(conf);
    mUdbContext = new UdbContext(null, null, "glue", "null", DB_NAME, DB_NAME);
}
Also used : UdbContext(alluxio.table.common.udb.UdbContext) UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Before(org.junit.Before)

Example 3 with UdbConfiguration

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

the class GlueDatabaseTest method createEmptyName.

@Test
public void createEmptyName() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "glue", 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 4 with UdbConfiguration

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

the class HiveDatabaseTest method createNullConnectionUri.

@Test
public void createNullConnectionUri() {
    mExpection.expect(IllegalArgumentException.class);
    UdbContext udbContext = new UdbContext(null, null, "hive", null, 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 5 with UdbConfiguration

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

the class HiveDatabaseTest method createWithProps.

@Test
public void createWithProps() {
    Map<String, String> props = ImmutableMap.of("prop1", "value1", "prop2", "value2");
    assertEquals(DB_NAME, HiveDatabase.create(mUdbContext, new UdbConfiguration(props)).getName());
}
Also used : UdbConfiguration(alluxio.table.common.udb.UdbConfiguration) Test(org.junit.Test)

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