catalogURI = String.format("jdbc:derby:%s/db;create=true", path.toUri().getPath());
}
String connectionId = System.getProperty(CatalogConstants.CONNECTION_ID);
String password = System.getProperty(CatalogConstants.CONNECTION_PASSWORD);
TajoConf conf = new TajoConf();
conf.set(CatalogConstants.STORE_CLASS, driverClass);
conf.set(CATALOG_URI, catalogURI);
conf.setVar(TajoConf.ConfVars.CATALOG_ADDRESS, "127.0.0.1:0");
// MySQLStore requires password
if (driverClass.equals(MySQLStore.class.getCanonicalName())) {
if (connectionId == null) {
throw new CatalogException(String.format("%s driver requires %s", driverClass, CatalogConstants.CONNECTION_ID));
}
conf.set(CatalogConstants.CONNECTION_ID, connectionId);
if (password != null) {
conf.set(CatalogConstants.CONNECTION_PASSWORD, password);
}
}
Path defaultTableSpace = CommonTestingUtil.getTestDir();