[HUDI-846][HUDI-848] Enable Incremental cleaning and embedded timeline-server by default (#1634)
This commit is contained in:
committed by
GitHub
parent
f802d4400b
commit
74ecc27e92
@@ -30,6 +30,9 @@ import org.apache.hudi.common.model.HoodieTableType;
|
||||
import org.apache.hudi.common.model.HoodieTestUtils;
|
||||
import org.apache.hudi.common.table.HoodieTableMetaClient;
|
||||
import org.apache.hudi.common.table.timeline.HoodieActiveTimeline;
|
||||
import org.apache.hudi.common.table.timeline.HoodieInstant;
|
||||
import org.apache.hudi.common.table.timeline.HoodieInstant.State;
|
||||
import org.apache.hudi.common.table.timeline.HoodieTimeline;
|
||||
import org.apache.hudi.common.util.Option;
|
||||
import org.apache.hudi.config.HoodieCompactionConfig;
|
||||
import org.apache.hudi.config.HoodieIndexConfig;
|
||||
@@ -152,9 +155,13 @@ public class TestHoodieCompactor extends HoodieClientTestHarness {
|
||||
HoodieIndex index = new HoodieBloomIndex<>(config);
|
||||
updatedRecords = index.tagLocation(updatedRecordsRDD, jsc, table).collect();
|
||||
|
||||
// Write them to corresponding avro logfiles
|
||||
// Write them to corresponding avro logfiles. Also, set the state transition properly.
|
||||
HoodieTestUtils.writeRecordsToLogFiles(fs, metaClient.getBasePath(),
|
||||
HoodieTestDataGenerator.AVRO_SCHEMA_WITH_METADATA_FIELDS, updatedRecords);
|
||||
metaClient.getActiveTimeline().transitionRequestedToInflight(new HoodieInstant(State.REQUESTED,
|
||||
HoodieTimeline.DELTA_COMMIT_ACTION, newCommitTime), Option.empty());
|
||||
writeClient.commit(newCommitTime, jsc.emptyRDD(), Option.empty());
|
||||
metaClient.reloadActiveTimeline();
|
||||
|
||||
// Verify that all data file has one log file
|
||||
table = HoodieTable.create(config, hadoopConf);
|
||||
|
||||
Reference in New Issue
Block a user