@ShellComponent public class BootstrapCommand extends Object
| Constructor and Description |
|---|
BootstrapCommand() |
| Modifier and Type | Method and Description |
|---|---|
String |
bootstrap(String srcPath,
String targetPath,
String tableName,
String tableType,
String rowKeyField,
String partitionPathField,
String bootstrapIndexClass,
String selectorClass,
String keyGeneratorClass,
String fullBootstrapInputProvider,
String schemaProviderClass,
String payloadClass,
String recordMergeMode,
String recordMergeStrategyId,
String recordMergeImplClasses,
int parallelism,
String master,
String sparkMemory,
Boolean enableHiveSync,
String propsFilePath,
String[] configs) |
String |
showBootstrapIndexMapping(String partitionPath,
String fileIds,
Integer limit,
String sortByField,
boolean descending,
boolean headerOnly) |
String |
showBootstrapIndexPartitions() |
@ShellMethod(key="bootstrap run",
value="Run a bootstrap action for current Hudi table")
public String bootstrap(@ShellOption(value="--srcPath",help="Bootstrap source data path of the table")
String srcPath,
@ShellOption(value="--targetPath",help="Base path for the target hoodie table")
String targetPath,
@ShellOption(value="--tableName",help="Hoodie table name")
String tableName,
@ShellOption(value="--tableType",help="Hoodie table type")
String tableType,
@ShellOption(value="--rowKeyField",help="Record key columns for bootstrap data")
String rowKeyField,
@ShellOption(value="--partitionPathField",defaultValue="",help="Partition fields for bootstrap source data")
String partitionPathField,
@ShellOption(value="--bootstrapIndexClass",defaultValue="org.apache.hudi.common.bootstrap.index.hfile.HFileBootstrapIndex",help="Bootstrap Index Class")
String bootstrapIndexClass,
@ShellOption(value="--selectorClass",defaultValue="org.apache.hudi.client.bootstrap.selector.MetadataOnlyBootstrapModeSelector",help="Selector class for bootstrap")
String selectorClass,
@ShellOption(value="--keyGeneratorClass",defaultValue="org.apache.hudi.keygen.SimpleKeyGenerator",help="Key generator class for bootstrap")
String keyGeneratorClass,
@ShellOption(value="--fullBootstrapInputProvider",defaultValue="org.apache.hudi.bootstrap.SparkParquetBootstrapDataProvider",help="Class for Full bootstrap input provider")
String fullBootstrapInputProvider,
@ShellOption(value="--schemaProviderClass",defaultValue="",help="SchemaProvider to attach schemas to bootstrap source data")
String schemaProviderClass,
@ShellOption(value="--payloadClass",defaultValue="",help="Payload Class (deprecated). Use `--merge-mode` to specify the equivalent payload update behavior.")
String payloadClass,
@ShellOption(value={"--merge-mode","--record-merge-mode"},defaultValue="",help="Merge mode to use. \'EVENT_TIME_ORDERING\', \'COMMIT_TIME_ORDERING\', or \'CUSTOM\' if you want to set a custom merge strategy ID and implementation.")
String recordMergeMode,
@ShellOption(value={"--merge-strategy-id","--record-merge-strategy-id"},defaultValue="",help="ID of the merge strategy to use. Only set when using \'CUSTOM\' merge mode")
String recordMergeStrategyId,
@ShellOption(value={"--merge-impl-classes","--record-merge-custom-implementation-classes"},defaultValue="",help="Comma separated list of classes that implement the record merge strategy")
String recordMergeImplClasses,
@ShellOption(value="--parallelism",defaultValue="1500",help="Bootstrap writer parallelism")
int parallelism,
@ShellOption(value="--sparkMaster",defaultValue="",help="Spark Master")
String master,
@ShellOption(value="--sparkMemory",defaultValue="4G",help="Spark executor memory")
String sparkMemory,
@ShellOption(value="--enableHiveSync",defaultValue="false",help="Enable Hive sync")
Boolean enableHiveSync,
@ShellOption(value="--propsFilePath",help="path to properties file on localfs or dfs with configurations for hoodie client for importing",defaultValue="")
String propsFilePath,
@ShellOption(value="--hoodieConfigs",help="Any configuration that can be set in the properties file can be passed here in the form of an array",defaultValue="")
String[] configs)
throws IOException,
InterruptedException,
URISyntaxException
@ShellMethod(key="bootstrap index showmapping",
value="Show bootstrap index mapping")
public String showBootstrapIndexMapping(@ShellOption(value="--partitionPath",defaultValue="",help="A valid partition path")
String partitionPath,
@ShellOption(value="--fileIds",defaultValue="",help="Valid fileIds split by comma")
String fileIds,
@ShellOption(value="--limit",defaultValue="-1",help="Limit rows to be displayed")
Integer limit,
@ShellOption(value="--sortBy",defaultValue="",help="Sorting Field")
String sortByField,
@ShellOption(value="--desc",defaultValue="false",help="Ordering")
boolean descending,
@ShellOption(value="--headeronly",defaultValue="false",help="Print Header Only")
boolean headerOnly)
@ShellMethod(key="bootstrap index showpartitions",
value="Show bootstrap indexed partitions")
public String showBootstrapIndexPartitions()
Copyright © 2025 The Apache Software Foundation. All rights reserved.