You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/11/16 12:15:25 UTC

[GitHub] [hudi] joha0123 removed a comment on issue #3941: [SUPPORT] How to access the Hudi INMEMORY metrics after a commit

joha0123 removed a comment on issue #3941:
URL: https://github.com/apache/hudi/issues/3941#issuecomment-970085147


   @xushiyan I implemented a simple Class to test:
   
   ```
   import org.apache.hudi.callback.HoodieWriteCommitCallback;
   import org.apache.hudi.callback.common.HoodieWriteCommitCallbackMessage;
   import org.apache.hudi.config.HoodieWriteConfig;
   
   public class MyWriteCommitCallbackJava implements HoodieWriteCommitCallback {
   
       public void MyWriteCommitCallback(HoodieWriteConfig hoodieWriteConfig) {
       }
   
       @Override
       public void call(HoodieWriteCommitCallbackMessage hoodieWriteCommitCallbackMessage) {
           System.out.println("-----------TEST!");
       }
   }
   ```
   
   But i get this error: 
   ```
   Exception in thread "main" org.apache.hudi.exception.HoodieException: Unable to instantiate class com.infineon.hudi.MyWriteCommitCallbackJava
           at org.apache.hudi.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:92)
           at org.apache.hudi.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:101)
           at org.apache.hudi.callback.util.HoodieCommitCallbackFactory.create(HoodieCommitCallbackFactory.java:34)
           at org.apache.hudi.client.AbstractHoodieWriteClient.commitStats(AbstractHoodieWriteClient.java:205)
           at org.apache.hudi.client.SparkRDDWriteClient.commit(SparkRDDWriteClient.java:124)
           at org.apache.hudi.HoodieSparkSqlWriter$.commitAndPerformPostOperations(HoodieSparkSqlWriter.scala:614)
           at org.apache.hudi.HoodieSparkSqlWriter$.write(HoodieSparkSqlWriter.scala:272)
           at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:164)
           at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:45)
           at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
           at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
           at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:86)
           at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:141)
           at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:137)
           at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:165)
           at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
           at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:162)
           at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:137)
           at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:93)
           at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:91)
           at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:684)
           at org.apache.spark.sql.DataFrameWriter$$anonfun$runCommand$1.apply(DataFrameWriter.scala:684)
           at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:80)
           at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:127)
           at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:75)
           at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:684)
           at org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:285)
           at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:271)
           at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:229)
           at com.infineon.hudi.HudiLoader$class.loadFromSourceToTargetTable(HudiLoader.scala:23)
           at com.infineon.dwh.HiveExecutorHudi$.loadFromSourceToTargetTable(HiveExecutorHudi.scala:6)
           at com.infineon.dwh.HiveExecutorHudi$.executeWithErrorHandling(HiveExecutorHudi.scala:23)
           at com.infineon.dwh.lib.DwhJob$class.run(DwhJob.scala:157)
           at com.infineon.dwh.HiveExecutorHudi$.run(HiveExecutorHudi.scala:6)
           at com.infineon.dwh.HiveExecutorHudi$.main(HiveExecutorHudi.scala:30)
           at com.infineon.dwh.HiveExecutorHudi.main(HiveExecutorHudi.scala)
           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 org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
           at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:847)
           at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
           at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
           at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
           at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:922)
           at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:931)
           at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
   Caused by: java.lang.NoSuchMethodException: com.infineon.hudi.MyWriteCommitCallbackJava.<init>(org.apache.hudi.config.HoodieWriteConfig)
           at java.base/java.lang.Class.getConstructor0(Class.java:3349)
           at java.base/java.lang.Class.getConstructor(Class.java:2151)
           at org.apache.hudi.common.util.ReflectionUtils.loadClass(ReflectionUtils.java:90)
           ... 47 more
   
   ```
   
   Can you tell me what im doing wrong?
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org