Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-5846

throw ClassCastException while run_bootstrap

    XMLWordPrintableJSON

Details

    Description

      throw ClassCastException  while run_bootstrap for MERGE_ON_READ table type

      version

      Spark 3.3 & hudi 0.13

      error message

      Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.apache.hudi.table.BulkInsertPartitioner
              at org.apache.hudi.table.action.commit.SparkBulkInsertHelper.bulkInsert(SparkBulkInsertHelper.java:77)
              at org.apache.hudi.table.action.deltacommit.SparkBulkInsertDeltaCommitActionExecutor.execute(SparkBulkInsertDeltaCommitActionExecutor.java:60)
      
      

       

      how to reproduce

      Spark SQL

      create table hive_table (
        id int,
        ts int
      ) stored as parquet;
      
      insert into hive_table values (1, 1);
      
      create table hudi_mor (
        id int,
        ts int
      ) using hudi
      tblproperties (
        type = 'mor',
        primaryKey = 'id',
        preCombineField = 'ts'
      );
      
      call run_bootstrap(table => 'hudi_mor', table_type => 'MERGE_ON_READ', bootstrap_path => 'hdfs://ns1/dtInsight/hive/warehouse/kunni.db/hive_table', base_path => 'hdfs://ns1/dtInsight/hive/warehouse/kunni.db/hudi_mor', rowKey_field => 'id', key_generator_class => 'org.apache.hudi.keygen.NonpartitionedKeyGenerator', bootstrap_overwrite => true, selector_class=> 'org.apache.hudi.client.bootstrap.selector.FullRecordBootstrapModeSelector'); 

       

      cause{}

      org.apache.hudi.table.action.bootstrap.SparkBootstrapDeltaCommitActionExecutor#getBulkInsertActionExecutor method

      used wrong constructor of SparkBulkInsertDeltaCommitActionExecutor class.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              1365976815@qq.com lvyanquan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: