hudi-client/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapCommitActionExecutor.java
/**
   * Return Bootstrap Mode selections for partitions listed and figure out bootstrap Schema.
   * @return
   * @throws IOException
   */
Return Bootstrap Mode selections for partitions listed and figure out bootstrap Schema.
Return Bootstrap Mode selections for partitions listed and figure out bootstrap Schema .
private Map<BootstrapMode, List<Pair<String, List<HoodieFileStatus>>>> listAndProcessSourcePartitions() throws IOException {
    List<Pair<String, List<HoodieFileStatus>>> folders = BootstrapUtils.getAllLeafFoldersWithFiles(
            table.getMetaClient(), bootstrapSourceFileSystem, config.getBootstrapSourceBasePath(), jsc);
    LOG.info("Fetching Bootstrap Schema !!");
    BootstrapSchemaProvider sourceSchemaProvider = new BootstrapSchemaProvider(config);
    bootstrapSchema = sourceSchemaProvider.getBootstrapSchema(jsc, folders).toString();
    LOG.info("Bootstrap Schema :" + bootstrapSchema);
    BootstrapModeSelector selector =
        (BootstrapModeSelector) ReflectionUtils.loadClass(config.getBootstrapModeSelectorClass(), config);
    Map<BootstrapMode, List<String>> result = selector.select(folders);
    Map<String, List<HoodieFileStatus>> partitionToFiles = folders.stream().collect(
        Collectors.toMap(Pair::getKey, Pair::getValue));
    ValidationUtils.checkArgument(partitionToFiles.keySet().equals(
        result.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())));
    return result.entrySet().stream().map(e -> Pair.of(e.getKey(), e.getValue().stream()
        .map(p -> Pair.of(p, partitionToFiles.get(p))).collect(Collectors.toList())))
        .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
  }
private Map < BootstrapMode , List < Pair < String , List < HoodieFileStatus > > > > listAndProcessSourcePartitions ( ) throws IOException { List < Pair < String , List < HoodieFileStatus > > > folders = BootstrapUtils . getAllLeafFoldersWithFiles ( table . getMetaClient ( ) , bootstrapSourceFileSystem , config . getBootstrapSourceBasePath ( ) , jsc ) ; LOG . info ( "Fetching Bootstrap Schema !!" ) ; BootstrapSchemaProvider sourceSchemaProvider = new BootstrapSchemaProvider ( config ) ; bootstrapSchema = sourceSchemaProvider . getBootstrapSchema ( jsc , folders ) . toString ( ) ; LOG . info ( "Bootstrap Schema :" + bootstrapSchema ) ; BootstrapModeSelector selector = ( BootstrapModeSelector ) ReflectionUtils . loadClass ( config . getBootstrapModeSelectorClass ( ) , config ) ; Map < BootstrapMode , List < String > > result = selector . select ( folders ) ; Map < String , List < HoodieFileStatus > > partitionToFiles = folders . stream ( ) . collect ( Collectors . toMap ( Pair :: getKey , Pair :: getValue ) ) ; ValidationUtils . checkArgument ( partitionToFiles . keySet ( ) . equals ( result . values ( ) . stream ( ) . flatMap ( Collection :: stream ) . collect ( Collectors . toSet ( ) ) ) ) ; return result . entrySet ( ) . stream ( ) . map ( e -> Pair . of ( e . getKey ( ) , e . getValue ( ) . stream ( ) . map ( p -> Pair . of ( p , partitionToFiles . get ( p ) ) ) . collect ( Collectors . toList ( ) ) ) ) . collect ( Collectors . toMap ( Pair :: getKey , Pair :: getValue ) ) ; }
Return Bootstrap Mode selections for partitions listed and figure out bootstrap Schema.
Return Bootstrap Mode selections for partitions listed and figure out bootstrap Schema .
// Ensure all partitions are accounted for