use of org.apache.gobblin.config.store.deploy.FsDeploymentConfig in project incubator-gobblin by apache.
the class SimpleHdfsConfigStoreTest method testDeploy.
@Test(dependsOnMethods = { "testGetCurrentVersion" })
public void testDeploy() throws Exception {
Properties props = new Properties();
props.setProperty(ClasspathConfigSource.CONFIG_STORE_CLASSPATH_RESOURCE_NAME_KEY, "_testDeploy");
this._simpleHadoopFilesystemConfigStore.deploy(new FsDeploymentConfig(new ClasspathConfigSource(props), "2.0"));
Path versionPath = PathUtils.combinePaths(CONFIG_DIR_NAME, SimpleHadoopFilesystemConfigStore.CONFIG_STORE_NAME, "2.0");
Assert.assertTrue(fs.exists(new Path(versionPath, "dir1")));
Assert.assertTrue(fs.exists(new Path(versionPath, "dir1/f1.conf")));
}
use of org.apache.gobblin.config.store.deploy.FsDeploymentConfig in project incubator-gobblin by apache.
the class SimpleHdfsConfigStoreTest method testGetCurrentVersion.
@Test
public void testGetCurrentVersion() throws IOException {
Assert.assertEquals(this._simpleHadoopFilesystemConfigStore.getCurrentVersion(), VERSION);
String newVersion = "v1.1";
this._simpleHadoopFilesystemConfigStore.deploy(new FsDeploymentConfig(new ClasspathConfigSource(new Properties()), newVersion));
Assert.assertEquals(this._simpleHadoopFilesystemConfigStore.getCurrentVersion(), newVersion);
}
use of org.apache.gobblin.config.store.deploy.FsDeploymentConfig in project incubator-gobblin by apache.
the class SimpleHdfsConfigStoreTest method setUp.
@BeforeClass
public void setUp() throws URISyntaxException, ConfigStoreCreationException, IOException {
this.fs = FileSystem.getLocal(new Configuration());
this.fs.mkdirs(CONFIG_DIR_PATH);
SimpleLocalHDFSConfigStoreFactory simpleHDFSConfigStoreConfigFactory = new SimpleLocalHDFSConfigStoreFactory();
URI storeURI = getStoreURI(System.getProperty("user.dir") + File.separator + CONFIG_DIR_NAME);
this._simpleHadoopFilesystemConfigStore = simpleHDFSConfigStoreConfigFactory.createConfigStore(storeURI);
this._simpleHadoopFilesystemConfigStore.deploy(new FsDeploymentConfig(new ClasspathConfigSource(new Properties()), VERSION));
}
Aggregations