Search in sources :

Example 1 with NoOpBootstrapIndex

use of org.apache.hudi.common.bootstrap.index.NoOpBootstrapIndex in project hudi by apache.

the class TestBootstrapIndex method testNoOpBootstrapIndex.

@Test
public void testNoOpBootstrapIndex() throws IOException {
    Properties props = metaClient.getTableConfig().getProps();
    props.put(HoodieTableConfig.BOOTSTRAP_INDEX_ENABLE.key(), "false");
    Properties properties = new Properties();
    properties.putAll(props);
    HoodieTableConfig.create(metaClient.getFs(), new Path(metaClient.getMetaPath()), properties);
    metaClient = HoodieTableMetaClient.builder().setConf(metaClient.getHadoopConf()).setBasePath(basePath).build();
    BootstrapIndex bootstrapIndex = BootstrapIndex.getBootstrapIndex(metaClient);
    assert (bootstrapIndex instanceof NoOpBootstrapIndex);
}
Also used : Path(org.apache.hadoop.fs.Path) HoodiePath(org.apache.hudi.avro.model.HoodiePath) NoOpBootstrapIndex(org.apache.hudi.common.bootstrap.index.NoOpBootstrapIndex) HFileBootstrapIndex(org.apache.hudi.common.bootstrap.index.HFileBootstrapIndex) BootstrapIndex(org.apache.hudi.common.bootstrap.index.BootstrapIndex) Properties(java.util.Properties) NoOpBootstrapIndex(org.apache.hudi.common.bootstrap.index.NoOpBootstrapIndex) Test(org.junit.jupiter.api.Test)

Aggregations

Properties (java.util.Properties)1 Path (org.apache.hadoop.fs.Path)1 HoodiePath (org.apache.hudi.avro.model.HoodiePath)1 BootstrapIndex (org.apache.hudi.common.bootstrap.index.BootstrapIndex)1 HFileBootstrapIndex (org.apache.hudi.common.bootstrap.index.HFileBootstrapIndex)1 NoOpBootstrapIndex (org.apache.hudi.common.bootstrap.index.NoOpBootstrapIndex)1 Test (org.junit.jupiter.api.Test)1