File tree Expand file tree Collapse file tree
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -399,12 +399,20 @@ public void testConsistentBucketIndexInvalidClusteringConfig() {
399399 }
400400
401401 @ Test
402- public void testSimpleBucketIndexDefaultPartitionerConfig () {
402+ public void testSimpleBucketIndexPartitionerConfig () {
403403 HoodieWriteConfig writeConfig = HoodieWriteConfig .newBuilder ().withPath ("/tmp" )
404404 .withIndexConfig (HoodieIndexConfig .newBuilder ().withIndexType (HoodieIndex .IndexType .BUCKET )
405405 .withBucketIndexEngineType (HoodieIndex .BucketIndexEngineType .SIMPLE ).build ())
406406 .build ();
407407 assertEquals (HoodieLayoutConfig .SIMPLE_BUCKET_LAYOUT_PARTITIONER_CLASS_NAME , writeConfig .getString (HoodieLayoutConfig .LAYOUT_PARTITIONER_CLASS_NAME ));
408+
409+ HoodieWriteConfig overwritePartitioner = HoodieWriteConfig .newBuilder ().withPath ("/tmp" )
410+ .withIndexConfig (HoodieIndexConfig .newBuilder ().withIndexType (HoodieIndex .IndexType .BUCKET )
411+ .withBucketIndexEngineType (HoodieIndex .BucketIndexEngineType .SIMPLE )
412+ .build ())
413+ .withLayoutConfig (HoodieLayoutConfig .newBuilder ().withLayoutPartitioner ("org.apache.hudi.table.action.commit.UpsertPartitioner" ).build ())
414+ .build ();
415+ assertEquals ("org.apache.hudi.table.action.commit.UpsertPartitioner" , overwritePartitioner .getString (HoodieLayoutConfig .LAYOUT_PARTITIONER_CLASS_NAME ));
408416 }
409417
410418 private HoodieWriteConfig createWriteConfig (Map <String , String > configs ) {
You can’t perform that action at this time.
0 commit comments