Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Vexler committed Oct 17, 2024
1 parent 709a37a commit 143dfa7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ public static HoodieWriteConfig createHoodieConfig(String schemaStr, String base
return builder.forTable(tblName)
.withCompactionConfig(HoodieCompactionConfig.newBuilder()
.withInlineCompaction(inlineCompact).build())
.withPayloadConfig(HoodiePayloadConfig.newBuilder()
.withPayloadClass(parameters.get(DataSourceWriteOptions.PAYLOAD_CLASS_NAME().key()))
.withPayloadOrderingField(parameters.get(DataSourceWriteOptions.PRECOMBINE_FIELD().key()))
.build())
// override above with Hoodie configs specified as options.
.withProps(parameters).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.hudi.avro.HoodieAvroUtils;
import org.apache.hudi.client.SparkRDDWriteClient;
import org.apache.hudi.common.config.TypedProperties;
import org.apache.hudi.common.model.DefaultHoodieRecordPayload;
import org.apache.hudi.common.model.HoodieColumnRangeMetadata;
import org.apache.hudi.common.model.HoodieRecord;
import org.apache.hudi.common.model.HoodieRecordPayload;
Expand Down Expand Up @@ -221,8 +222,7 @@ public void testCreateHoodieConfigWithAsyncClustering() {
asyncClusteringKeyValues.stream().forEach(pair -> {
HashMap<String, String> params = new HashMap<>(3);
params.put(DataSourceWriteOptions.TABLE_TYPE().key(), DataSourceWriteOptions.TABLE_TYPE().defaultValue());
params.put(DataSourceWriteOptions.RECORD_MERGE_MODE().key(),
DataSourceWriteOptions.RECORD_MERGE_MODE().defaultValue());
params.put(DataSourceWriteOptions.PAYLOAD_CLASS_NAME().key(), DefaultHoodieRecordPayload.class.getName());
params.put(pair.left, pair.right.toString());
HoodieWriteConfig hoodieConfig = DataSourceUtils
.createHoodieConfig(avroSchemaString, config.getBasePath(), "test", params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1621,10 +1621,9 @@ public void testPayloadClassUpdateWithCOWTable() throws Exception {
props.load(inputStream);
}

//will use merge mode by default
assertFalse(props.containsKey(HoodieTableConfig.PAYLOAD_CLASS_NAME.key()));


assertTrue(props.containsKey(HoodieTableConfig.PAYLOAD_CLASS_NAME.key()));
assertTrue(props.containsKey(HoodieTableConfig.RECORD_MERGE_MODE.key()));
assertTrue(props.containsKey(HoodieTableConfig.RECORD_MERGER_STRATEGY.key()));

//now create one more deltaStreamer instance and update payload class
cfg = TestHelpers.makeConfig(dataSetBasePath, WriteOperationType.BULK_INSERT,
Expand Down

0 comments on commit 143dfa7

Please sign in to comment.