use of org.apache.drill.metastore.iceberg.IcebergMetastore in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testCreationWithComponentPropertiesPrecedence.
@Test
public void testCreationWithComponentPropertiesPrecedence() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()).withValue(String.format(COMPONENTS_COMMON_PROPERTIES_PATTERN, TableProperties.SPLIT_SIZE), ConfigValueFactory.fromAnyRef(10)).withValue(String.format(COMPONENTS_TABLES_PROPERTIES_PATTERN, TableProperties.SPLIT_SIZE), ConfigValueFactory.fromAnyRef(100)));
Metastore metastore = new IcebergMetastore(config);
assertEquals(Collections.singletonMap(TableProperties.SPLIT_SIZE, "100"), metastore.tables().metadata().properties());
}
use of org.apache.drill.metastore.iceberg.IcebergMetastore in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testCreationWithCommonAndComponentProperties.
@Test
public void testCreationWithCommonAndComponentProperties() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()).withValue(String.format(COMPONENTS_COMMON_PROPERTIES_PATTERN, TableProperties.SPLIT_SIZE), ConfigValueFactory.fromAnyRef(10)).withValue(String.format(COMPONENTS_TABLES_PROPERTIES_PATTERN, TableProperties.MANIFEST_MIN_MERGE_COUNT), ConfigValueFactory.fromAnyRef(2)));
Metastore metastore = new IcebergMetastore(config);
Map<String, String> expected = new HashMap<>();
expected.put(TableProperties.SPLIT_SIZE, "10");
expected.put(TableProperties.MANIFEST_MIN_MERGE_COUNT, "2");
assertEquals(expected, metastore.tables().metadata().properties());
}
Aggregations