public class CleanerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Integer |
CLEAN_METADATA_VERSION_1 |
static Integer |
CLEAN_METADATA_VERSION_2 |
static Integer |
LATEST_CLEAN_METADATA_VERSION |
| Constructor and Description |
|---|
CleanerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static HoodieCleanMetadata |
convertCleanMetadata(String startCleanTime,
Option<Long> durationInMs,
List<HoodieCleanStat> cleanStats,
Map<String,String> extraMetadatafromCleanPlan) |
static List<HoodieCleanFileInfo> |
convertToHoodieCleanFileInfoList(List<CleanFileInfo> cleanFileInfoList)
Convert list of cleanFileInfo instances to list of avro-generated HoodieCleanFileInfo instances.
|
static HoodieCleanMetadata |
getCleanerMetadata(HoodieTableMetaClient metaClient,
byte[] details)
Get Latest Version of Hoodie Cleaner Metadata - Output of cleaner operation.
|
static HoodieCleanMetadata |
getCleanerMetadata(HoodieTableMetaClient metaClient,
HoodieInstant cleanInstant)
Get Latest Version of Hoodie Cleaner Metadata - Output of cleaner operation.
|
static HoodieCleanerPlan |
getCleanerPlan(HoodieTableMetaClient metaClient,
byte[] details)
Get Latest version of cleaner plan corresponding to a clean instant.
|
static HoodieCleanerPlan |
getCleanerPlan(HoodieTableMetaClient metaClient,
HoodieInstant cleanInstant)
Get Latest version of cleaner plan corresponding to a clean instant.
|
static Option<HoodieInstant> |
getEarliestCommitToRetain(HoodieTimeline commitsTimeline,
HoodieCleaningPolicy cleaningPolicy,
int commitsRetained,
Instant latestInstant,
int hoursRetained,
HoodieTimelineTimeZone timeZone) |
static void |
rollbackFailedWrites(HoodieFailedWritesCleaningPolicy cleaningPolicy,
String actionType,
Functions.Function0<Boolean> rollbackFailedWritesFunc)
Execute
HoodieFailedWritesCleaningPolicy to rollback failed writes for different actions. |
public static final Integer CLEAN_METADATA_VERSION_1
public static final Integer CLEAN_METADATA_VERSION_2
public static final Integer LATEST_CLEAN_METADATA_VERSION
public static HoodieCleanMetadata convertCleanMetadata(String startCleanTime, Option<Long> durationInMs, List<HoodieCleanStat> cleanStats, Map<String,String> extraMetadatafromCleanPlan)
public static HoodieCleanMetadata getCleanerMetadata(HoodieTableMetaClient metaClient, HoodieInstant cleanInstant) throws IOException
metaClient - Hoodie Table Meta ClientcleanInstant - Instant referring to clean actionIOExceptionpublic static HoodieCleanMetadata getCleanerMetadata(HoodieTableMetaClient metaClient, byte[] details) throws IOException
IOExceptionpublic static Option<HoodieInstant> getEarliestCommitToRetain(HoodieTimeline commitsTimeline, HoodieCleaningPolicy cleaningPolicy, int commitsRetained, Instant latestInstant, int hoursRetained, HoodieTimelineTimeZone timeZone)
public static HoodieCleanerPlan getCleanerPlan(HoodieTableMetaClient metaClient, HoodieInstant cleanInstant) throws IOException
metaClient - Hoodie Table Meta ClientcleanInstant - Instant referring to clean actionIOExceptionpublic static HoodieCleanerPlan getCleanerPlan(HoodieTableMetaClient metaClient, byte[] details) throws IOException
metaClient - Hoodie Table Meta ClientIOExceptionpublic static List<HoodieCleanFileInfo> convertToHoodieCleanFileInfoList(List<CleanFileInfo> cleanFileInfoList)
cleanFileInfoList - public static void rollbackFailedWrites(HoodieFailedWritesCleaningPolicy cleaningPolicy, String actionType, Functions.Function0<Boolean> rollbackFailedWritesFunc)
HoodieFailedWritesCleaningPolicy to rollback failed writes for different actions.cleaningPolicy - actionType - rollbackFailedWritesFunc - Copyright © 2024 The Apache Software Foundation. All rights reserved.