hudi-client/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapCommitActionExecutor.java
/**
   * Perform Full Bootstrap.
   * @param partitionFilesList List of partitions and files within that partitions
   */
Perform Full Bootstrap.
@param partitionFilesList List of partitions and files within that partitions
Perform Full Bootstrap . @param partitionFilesList List of partitions and files within that partitions
protected Option<HoodieWriteMetadata> fullBootstrap(List<Pair<String, List<HoodieFileStatus>>> partitionFilesList) {
    if (null == partitionFilesList || partitionFilesList.isEmpty()) {
      return Option.empty();
    }
    TypedProperties properties = new TypedProperties();
    properties.putAll(config.getProps());
    FullRecordBootstrapDataProvider inputProvider =
        (FullRecordBootstrapDataProvider) ReflectionUtils.loadClass(config.getFullBootstrapInputProvider(),
            properties, jsc);
    JavaRDD<HoodieRecord> inputRecordsRDD =
        inputProvider.generateInputRecordRDD("bootstrap_source", config.getBootstrapSourceBasePath(),
            partitionFilesList);
    final HoodieInstant requested = new HoodieInstant(State.REQUESTED, table.getMetaClient().getCommitActionType(),
        HoodieTimeline.FULL_BOOTSTRAP_INSTANT_TS);
    table.getActiveTimeline().createNewInstant(requested);
    return Option.of(getBulkInsertActionExecutor(inputRecordsRDD).execute());
  }
protected Option < HoodieWriteMetadata > fullBootstrap ( List < Pair < String , List < HoodieFileStatus > > > partitionFilesList ) { if ( null == partitionFilesList || partitionFilesList . isEmpty ( ) ) { return Option . empty ( ) ; } TypedProperties properties = new TypedProperties ( ) ; properties . putAll ( config . getProps ( ) ) ; FullRecordBootstrapDataProvider inputProvider = ( FullRecordBootstrapDataProvider ) ReflectionUtils . loadClass ( config . getFullBootstrapInputProvider ( ) , properties , jsc ) ; JavaRDD < HoodieRecord > inputRecordsRDD = inputProvider . generateInputRecordRDD ( "bootstrap_source" , config . getBootstrapSourceBasePath ( ) , partitionFilesList ) ; final HoodieInstant requested = new HoodieInstant ( State . REQUESTED , table . getMetaClient ( ) . getCommitActionType ( ) , HoodieTimeline . FULL_BOOTSTRAP_INSTANT_TS ) ; table . getActiveTimeline ( ) . createNewInstant ( requested ) ; return Option . of ( getBulkInsertActionExecutor ( inputRecordsRDD ) . execute ( ) ) ; }
Perform Full Bootstrap.
Perform Full Bootstrap .
// Start Full Bootstrap // Setup correct schema and run bulk insert.