Search in sources :

Example 1 with JavaSpecSerDe

use of org.apache.gobblin.runtime.spec_serde.JavaSpecSerDe in project incubator-gobblin by apache.

the class MysqlBaseSpecStoreTest method setUp.

@BeforeClass
public void setUp() throws Exception {
    ITestMetastoreDatabase testDb = TestMetastoreDatabaseFactory.get();
    // prefix keys to demonstrate disambiguation mechanism used to side-step intentially-sabatoged non-prefixed, 'fallback'
    Config config = ConfigBuilder.create().addPrimitive(ConfigurationKeys.STATE_STORE_DB_URL_KEY, " SABATOGE! !" + testDb.getJdbcUrl()).addPrimitive(MysqlBaseSpecStore.CONFIG_PREFIX + "." + ConfigurationKeys.STATE_STORE_DB_URL_KEY, testDb.getJdbcUrl()).addPrimitive(MysqlBaseSpecStore.CONFIG_PREFIX + "." + ConfigurationKeys.STATE_STORE_DB_USER_KEY, USER).addPrimitive(MysqlBaseSpecStore.CONFIG_PREFIX + "." + ConfigurationKeys.STATE_STORE_DB_PASSWORD_KEY, PASSWORD).addPrimitive(MysqlBaseSpecStore.CONFIG_PREFIX + "." + ConfigurationKeys.STATE_STORE_DB_TABLE_KEY, TABLE).build();
    this.specStore = new MysqlBaseSpecStore(config, new JavaSpecSerDe());
    topoSpec1 = new TopologySpec.Builder(this.uri1).withConfig(ConfigBuilder.create().addPrimitive("key", "value").addPrimitive("key3", "value3").addPrimitive("config.with.dot", "value4").build()).withDescription("Test1").withVersion("Test version").withSpecExecutor(MockedSpecExecutor.createDummySpecExecutor(new URI("execA"))).build();
    topoSpec2 = new TopologySpec.Builder(this.uri2).withConfig(ConfigBuilder.create().addPrimitive("converter", "value1,value2,value3").addPrimitive("key3", "value3").build()).withDescription("Test2").withVersion("Test version 2").withSpecExecutor(MockedSpecExecutor.createDummySpecExecutor(new URI("execB"))).build();
}
Also used : JavaSpecSerDe(org.apache.gobblin.runtime.spec_serde.JavaSpecSerDe) Config(com.typesafe.config.Config) ConfigBuilder(org.apache.gobblin.config.ConfigBuilder) ITestMetastoreDatabase(org.apache.gobblin.metastore.testing.ITestMetastoreDatabase) URI(java.net.URI) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

Config (com.typesafe.config.Config)1 URI (java.net.URI)1 ConfigBuilder (org.apache.gobblin.config.ConfigBuilder)1 ITestMetastoreDatabase (org.apache.gobblin.metastore.testing.ITestMetastoreDatabase)1 JavaSpecSerDe (org.apache.gobblin.runtime.spec_serde.JavaSpecSerDe)1 BeforeClass (org.testng.annotations.BeforeClass)1