use of org.apache.hudi.avro.model.HoodieArchivedMetaEntry in project hudi by apache.
the class TestMetadataConversionUtils method testCompletedReplace.
@Test
public void testCompletedReplace() throws Exception {
String newCommitTime = HoodieTestTable.makeNewCommitTime();
createReplace(newCommitTime, WriteOperationType.INSERT_OVERWRITE, true);
HoodieArchivedMetaEntry metaEntry = MetadataConversionUtils.createMetaWrapper(new HoodieInstant(State.COMPLETED, HoodieTimeline.REPLACE_COMMIT_ACTION, newCommitTime), metaClient);
assertEquals(metaEntry.getActionState(), State.COMPLETED.toString());
assertEquals(metaEntry.getHoodieReplaceCommitMetadata().getOperationType(), WriteOperationType.INSERT_OVERWRITE.toString());
}
use of org.apache.hudi.avro.model.HoodieArchivedMetaEntry in project hudi by apache.
the class TestMetadataConversionUtils method testCompletedDeltaCommit.
@Test
public void testCompletedDeltaCommit() throws Exception {
String newCommitTime = HoodieTestTable.makeNewCommitTime();
createDeltaCommitMetadata(newCommitTime);
HoodieArchivedMetaEntry metaEntry = MetadataConversionUtils.createMetaWrapper(new HoodieInstant(State.COMPLETED, HoodieTimeline.DELTA_COMMIT_ACTION, newCommitTime), metaClient);
assertEquals(metaEntry.getActionState(), State.COMPLETED.toString());
assertEquals(metaEntry.getActionType(), HoodieTimeline.DELTA_COMMIT_ACTION);
}
use of org.apache.hudi.avro.model.HoodieArchivedMetaEntry in project hudi by apache.
the class TestMetadataConversionUtils method testCompletedCompaction.
@Test
public void testCompletedCompaction() throws Exception {
String newCommitTime = HoodieTestTable.makeNewCommitTime();
createCompactionMetadata(newCommitTime);
HoodieArchivedMetaEntry metaEntry = MetadataConversionUtils.createMetaWrapper(new HoodieInstant(State.COMPLETED, HoodieTimeline.COMMIT_ACTION, newCommitTime), metaClient);
assertEquals(metaEntry.getActionState(), State.COMPLETED.toString());
assertEquals(metaEntry.getHoodieCommitMetadata().getOperationType(), WriteOperationType.COMPACT.toString());
}
use of org.apache.hudi.avro.model.HoodieArchivedMetaEntry in project hudi by apache.
the class TestMetadataConversionUtils method testCompletedCommit.
@Test
public void testCompletedCommit() throws Exception {
String newCommitTime = HoodieTestTable.makeNewCommitTime();
createCommitMetadata(newCommitTime);
HoodieArchivedMetaEntry metaEntry = MetadataConversionUtils.createMetaWrapper(new HoodieInstant(State.COMPLETED, HoodieTimeline.COMMIT_ACTION, newCommitTime), metaClient);
assertEquals(metaEntry.getActionState(), State.COMPLETED.toString());
assertEquals(metaEntry.getHoodieCommitMetadata().getOperationType(), WriteOperationType.INSERT.toString());
}
use of org.apache.hudi.avro.model.HoodieArchivedMetaEntry in project hudi by apache.
the class TestMetadataConversionUtils method testCompletedRollback.
@Test
public void testCompletedRollback() throws Exception {
String newCommitTime = HoodieTestTable.makeNewCommitTime();
createRollbackMetadata(newCommitTime);
HoodieArchivedMetaEntry metaEntry = MetadataConversionUtils.createMetaWrapper(new HoodieInstant(State.COMPLETED, HoodieTimeline.ROLLBACK_ACTION, newCommitTime), metaClient);
assertEquals(metaEntry.getActionState(), State.COMPLETED.toString());
assertEquals(metaEntry.getHoodieRollbackMetadata().getStartRollbackTime(), newCommitTime);
}
Aggregations