Search in sources :

Example 1 with DrillConnectionImpl

use of org.apache.drill.jdbc.impl.DrillConnectionImpl in project drill by apache.

the class JdbcTestBase method updateSchemaLocations.

private static void updateSchemaLocations(Connection conn) {
    if (conn instanceof DrillConnectionImpl) {
        StoragePluginRegistry storage = DrillConnectionUtils.getStorage((DrillConnectionImpl) conn);
        try {
            StoragePluginTestUtils.configureFormatPlugins(storage);
            StoragePluginTestUtils.updateSchemaLocation(StoragePluginTestUtils.DFS_PLUGIN_NAME, storage, dirTestWatcher.getDfsTestTmpDir(), StoragePluginTestUtils.TMP_SCHEMA);
            StoragePluginTestUtils.updateSchemaLocation(StoragePluginTestUtils.DFS_PLUGIN_NAME, storage, dirTestWatcher.getRootDir(), StoragePluginTestUtils.ROOT_SCHEMA);
            StoragePluginTestUtils.updateSchemaLocation(StoragePluginTestUtils.DFS_PLUGIN_NAME, storage, dirTestWatcher.getRootDir(), SchemaFactory.DEFAULT_WS_NAME);
        } catch (StoragePluginRegistry.PluginException e) {
            throw new RuntimeException(e);
        }
    }
}
Also used : StoragePluginRegistry(org.apache.drill.exec.store.StoragePluginRegistry) DrillConnectionImpl(org.apache.drill.jdbc.impl.DrillConnectionImpl)

Aggregations

StoragePluginRegistry (org.apache.drill.exec.store.StoragePluginRegistry)1 DrillConnectionImpl (org.apache.drill.jdbc.impl.DrillConnectionImpl)1