use of org.apache.drill.common.config.DrillConfig in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testNewInstance.
@Test
public void testNewInstance() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Metastore metastore = new IcebergMetastore(config);
assertNotSame(metastore.tables(), metastore.tables());
}
use of org.apache.drill.common.config.DrillConfig in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testLoadWithoutProperties.
@Test
public void testLoadWithoutProperties() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Metastore initialMetastore = new IcebergMetastore(config);
assertTrue(initialMetastore.tables().metadata().properties().isEmpty());
Metastore newMetastore = new IcebergMetastore(config);
assertTrue(newMetastore.tables().metadata().properties().isEmpty());
}
use of org.apache.drill.common.config.DrillConfig in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testVersionUpdate.
@Test
public void testVersionUpdate() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Tables tables = new IcebergMetastore(config).tables();
Metadata metadata = tables.metadata();
assertTrue(metadata.supportsVersioning());
assertEquals(0, metadata.version());
tables.modify().overwrite(TableMetadataUnit.builder().storagePlugin("dfs").workspace("tmp").tableName("nation").metadataKey("dir0").build()).execute();
assertNotEquals(0, metadata.version());
}
use of org.apache.drill.common.config.DrillConfig in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testVersionInitial.
@Test
public void testVersionInitial() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Metastore metastore = new IcebergMetastore(config);
Metadata metadata = metastore.tables().metadata();
assertTrue(metadata.supportsVersioning());
assertEquals(0, metadata.version());
}
use of org.apache.drill.common.config.DrillConfig in project drill by apache.
the class TestTablesOperationTransformer method init.
@BeforeClass
public static void init() throws Exception {
location = new Path(defaultFolder.newFolder(TestTablesOperationTransformer.class.getSimpleName()).toURI().getPath()).toUri().getPath();
IcebergMetastore metastore = new IcebergMetastore(new DrillConfig(baseIcebergConfig(new File(location))));
transformer = new TablesOperationTransformer((IcebergTables) metastore.tables());
}
Aggregations