Search in sources :

Example 1 with EngineType

use of org.apache.hudi.common.engine.EngineType in project hudi by apache.

the class TestHoodieWriteConfig method testEngineSpecificConfig.

/**
 * Tests the engine-specific configuration values for one configuration key .
 *
 * @param getConfigFunc     Function to get the config value.
 * @param expectedConfigMap Expected config map, with key as the engine type
 *                          and value as the corresponding config value for the engine.
 */
private void testEngineSpecificConfig(Function<HoodieWriteConfig, Object> getConfigFunc, Map<EngineType, Object> expectedConfigMap) {
    HoodieWriteConfig writeConfig = HoodieWriteConfig.newBuilder().withPath("/tmp").build();
    assertEquals(expectedConfigMap.get(EngineType.SPARK), getConfigFunc.apply(writeConfig));
    for (EngineType engineType : expectedConfigMap.keySet()) {
        writeConfig = HoodieWriteConfig.newBuilder().withEngineType(engineType).withPath("/tmp").build();
        assertEquals(expectedConfigMap.get(engineType), getConfigFunc.apply(writeConfig));
    }
}
Also used : EngineType(org.apache.hudi.common.engine.EngineType)

Aggregations

EngineType (org.apache.hudi.common.engine.EngineType)1