@ShellComponent public class RepairsCommand extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEDUPLICATE_RETURN_PREFIX |
| Constructor and Description |
|---|
RepairsCommand() |
| Modifier and Type | Method and Description |
|---|---|
String |
addPartitionMeta(boolean dryRun) |
String |
deduplicate(String duplicatedPartitionPath,
String repairedOutputPath,
String sparkPropertiesPath,
String master,
String sparkMemory,
boolean dryRun,
String dedupeType) |
String |
migratePartitionMeta(boolean dryRun) |
String |
overwriteHoodieProperties(String overwriteFilePath) |
void |
removeCorruptedPendingCleanAction() |
String |
renamePartition(String oldPartition,
String newPartition,
String sparkPropertiesPath,
String master,
String sparkMemory) |
String |
repairDeprecatePartition(String sparkPropertiesPath,
String master,
String sparkMemory) |
void |
showFailedCommits() |
public static final String DEDUPLICATE_RETURN_PREFIX
@ShellMethod(key="repair deduplicate",
value="De-duplicate a partition path contains duplicates & produce repaired files to replace with")
public String deduplicate(@ShellOption(value="--duplicatedPartitionPath",defaultValue="",help="Partition Path containing the duplicates")
String duplicatedPartitionPath,
@ShellOption(value="--repairedOutputPath",help="Location to place the repaired files")
String repairedOutputPath,
@ShellOption(value="--sparkProperties",help="Spark Properties File Path",defaultValue="")
String sparkPropertiesPath,
@ShellOption(value="--sparkMaster",defaultValue="",help="Spark Master")
String master,
@ShellOption(value="--sparkMemory",defaultValue="4G",help="Spark executor memory")
String sparkMemory,
@ShellOption(value="--dryrun",help="Should we actually remove duplicates or just run and store result to repairedOutputPath",defaultValue="true")
boolean dryRun,
@ShellOption(value="--dedupeType",help="Valid values are - insert_type, update_type and upsert_type",defaultValue="insert_type")
String dedupeType)
throws Exception
Exception@ShellMethod(key="repair addpartitionmeta",
value="Add partition metadata to a table, if not present")
public String addPartitionMeta(@ShellOption(value="--dryrun",help="Should we actually add or just print what would be done",defaultValue="true")
boolean dryRun)
throws IOException
IOException@ShellMethod(key="repair overwrite-hoodie-props",
value="Overwrite hoodie.properties with provided file. Risky operation. Proceed with caution!")
public String overwriteHoodieProperties(@ShellOption(value="--new-props-file",help="Path to a properties file on local filesystem to overwrite the table\'s hoodie.properties with")
String overwriteFilePath)
throws IOException
IOException@ShellMethod(key="repair corrupted clean files",
value="repair corrupted clean files")
public void removeCorruptedPendingCleanAction()
@ShellMethod(key="repair show empty commit metadata",
value="show failed commits")
public void showFailedCommits()
@ShellMethod(key="repair migrate-partition-meta",
value="Migrate all partition meta file currently stored in text format to be stored in base file format. See HoodieTableConfig#PARTITION_METAFILE_USE_DATA_FORMAT.")
public String migratePartitionMeta(@ShellOption(value="--dryrun",help="dry run without modifying anything.",defaultValue="true")
boolean dryRun)
throws IOException
IOException@ShellMethod(key="repair deprecated partition",
value="Repair deprecated partition (\"default\"). Re-writes data from the deprecated partition into __HIVE_DEFAULT_PARTITION__")
public String repairDeprecatePartition(@ShellOption(value="--sparkProperties",help="Spark Properties File Path",defaultValue="")
String sparkPropertiesPath,
@ShellOption(value="--sparkMaster",defaultValue="",help="Spark Master")
String master,
@ShellOption(value="--sparkMemory",defaultValue="4G",help="Spark executor memory")
String sparkMemory)
throws Exception
Exception@ShellMethod(key="rename partition",
value="Rename partition. Usage: rename partition --oldPartition <oldPartition> --newPartition <newPartition>")
public String renamePartition(@ShellOption(value="--oldPartition",help="Partition value to be renamed")
String oldPartition,
@ShellOption(value="--newPartition",help="New partition value after rename")
String newPartition,
@ShellOption(value="--sparkProperties",help="Spark Properties File Path",defaultValue="")
String sparkPropertiesPath,
@ShellOption(value="--sparkMaster",defaultValue="",help="Spark Master")
String master,
@ShellOption(value="--sparkMemory",defaultValue="4G",help="Spark executor memory")
String sparkMemory)
throws Exception
ExceptionCopyright © 2025 The Apache Software Foundation. All rights reserved.