ketkidev opened a new issue, #9958:
URL: https://github.com/apache/hudi/issues/9958

   **Describe the problem you faced**
   
   In **Hudi 0.14** when running our application where more than one tables are 
processed and upserted at a time using multithreading, we get this error once 
in a while (generally once in an hour). It also gets resolved automatically in 
the second or third retry. It's not happening in when tables are upserted in 
serialize manner. At a time we are trying to upsert 6-7 tables.
   
   Please note we never observed this issue in 0.13 while upserting multiple 
tables at a time.
   
   **To Reproduce**
   
   Example of a Hudi MOR Table configuration:
   
   ```
   {    
           'hoodie.table.name': asset,                                
        'hoodie.datasource.write.recordkey.field': id,     
        'hoodie.datasource.write.table.name': asset,             
        'hoodie.upsert.shuffle.parallelism': 400,               
        'hoodie.keep.max.commits': 50,                
        'hoodie.keep.min.commits': 49,
        'hoodie.compact.inline.max.delta.commits': 6,
        'hoodie.clean.automatic': 'false',
        'hoodie.clean.async': 'false'
        'hoodie.datasource.write.operation': 'upsert',
        'hoodie.datasource.write.precombine.field': 'cdc_timestamp',  
        'hoodie.datasource.write.table.type': 'MERGE_ON_READ',       
        'hoodie.cleaner.policy': 'KEEP_LATEST_COMMITS',        
        'hoodie.schema.on.read.enable' : "true",                      
        'hoodie.datasource.write.reconcile.schema' : "true",
        'hoodie.compact.inline' : "true",
        'hoodie.datasource.write.keygenerator.class': 
'org.apache.hudi.keygen.NonpartitionedKeyGenerator',
           'hoodie.metadata.max.deltacommits.when_pending' : 2000
   }
   ```
   
   **Expected behavior**
   
   A smooth upsert in all tables.
   
   **Environment Description**
   
   * Hudi version : 0.14.0
   
   * Spark version : 3.4.1
   
   * Storage (HDFS/S3/GCS..) : S3
   
   * Running on Docker? (yes/no) : no
   
   
   
   **Stacktrace**
   
   ```
   Could not upsert into Hudi table. While upserting, encountered this error - 
An error occurred while calling o511.save.
   -> java.lang.NullPointerException
           at 
org.apache.hudi.common.config.HoodieConfig.setDefaults(HoodieConfig.java->123)
           at 
org.apache.hudi.config.HoodieMemoryConfig.access$100(HoodieMemoryConfig.java->46)
           at 
org.apache.hudi.config.HoodieMemoryConfig$Builder.build(HoodieMemoryConfig.java->199)
           at 
org.apache.hudi.config.HoodieWriteConfig$Builder.setDefaults(HoodieWriteConfig.java->3099)
           at 
org.apache.hudi.config.HoodieWriteConfig$Builder.build(HoodieWriteConfig.java->3213)
           at 
org.apache.hudi.config.HoodieWriteConfig$Builder.build(HoodieWriteConfig.java->3208)
           at 
org.apache.hudi.DataSourceUtils.createHoodieConfig(DataSourceUtils.java->202)
           at 
org.apache.hudi.DataSourceUtils.createHoodieClient(DataSourceUtils.java->207)
           at 
org.apache.hudi.HoodieSparkSqlWriter$.$anonfun$writeInternal$25(HoodieSparkSqlWriter.scala->394)
           at scala.Option.getOrElse(Option.scala->189)
           at 
org.apache.hudi.HoodieSparkSqlWriter$.writeInternal(HoodieSparkSqlWriter.scala->391)
           at 
org.apache.hudi.HoodieSparkSqlWriter$.write(HoodieSparkSqlWriter.scala->132)
           at 
org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala->150)
           at 
org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala->47)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala->75)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala->73)
           at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala->84)
           at 
org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.$anonfun$applyOrElse$1(QueryExecution.scala->98)
           at 
org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala->118)
           at 
org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala->195)
           at 
org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala->103)
           at 
org.apache.spark.sql.SparkSession.withActive(SparkSession.scala->827)
           at 
org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala->65)
           at 
org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.applyOrElse(QueryExecution.scala->98)
           at 
org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.applyOrElse(QueryExecution.scala->94)
           at 
org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala->512)
           at 
org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala->104)
           at 
org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala->512)
           at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.org$apache$spark$sql$catalyst$plans$logical$AnalysisHelper$$super$transformDownWithPruning(LogicalPlan.scala->31)
           at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning(AnalysisHelper.scala->267)
           at 
org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning$(AnalysisHelper.scala->263)
           at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala->31)
           at 
org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala->31)
           at 
org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala->488)
           at 
org.apache.spark.sql.execution.QueryExecution.eagerlyExecuteCommands(QueryExecution.scala->94)
           at 
org.apache.spark.sql.execution.QueryExecution.commandExecuted$lzycompute(QueryExecution.scala->81)
           at 
org.apache.spark.sql.execution.QueryExecution.commandExecuted(QueryExecution.scala->79)
           at 
org.apache.spark.sql.execution.QueryExecution.assertCommandExecuted(QueryExecution.scala->133)
           at 
org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala->856)
           at 
org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala->387)
           at 
org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala->360)
           at 
org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala->239)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java->62)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java->43)
           at java.base/java.lang.reflect.Method.invoke(Method.java->566)
           at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java->244)
           at 
py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java->374)
           at py4j.Gateway.invoke(Gateway.java->282)
           at 
py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java->132)
           at py4j.commands.CallCommand.execute(CallCommand.java->79)
           at 
py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java->182)
           at py4j.ClientServerConnection.run(ClientServerConnection.java->106)
           at java.base/java.lang.Thread.run(Thread.java->829)
    | line_num = 629 | line_num -> 1210 | retry_number -> 1
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to