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/12/06 16:32:50 UTC

[GitHub] [hudi] BenjMaq opened a new issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

BenjMaq opened a new issue #4229:
URL: https://github.com/apache/hudi/issues/4229


   **Describe the problem you faced**
   
   Using Hudi `0.10.0-rc3`, creating an external COW table without primaryKey fails with 
   ```
   Can't find primaryKey `uuid` in root
   ```
   Creating with a primaryKey **does not** fail.
   
   I'm also wondering what this error means?
   ```
   ERROR org.apache.hudi.common.config.DFSPropertiesConfiguration  - Error reading in properties from dfs
   ```
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. Create table
   ```
   CREATE TABLE IF NOT EXISTS public.test_create (
       id bigint,
       name string,
       dt string
   ) USING hudi
   LOCATION 's3a://<bucket>/<path>/test_create'
   OPTIONS (
     type = 'cow'
   );
   ```
   2. Error is thrown
   
   **Expected behavior**
   
   I would expect the table to be correctly created.
   
   **Environment Description**
   
   * Hudi version : 0.10.0-rc3
   
   * Spark version : 2.4.4
   
   * Hive version : 2.3.5
   
   * Hadoop version : 2.7.3
   
   * Storage (HDFS/S3/GCS..) : S3
   
   * Running on Docker? (yes/no) : No
   
   **Stacktrace**
   
   ```
   4575 [main] ERROR org.apache.hudi.common.config.DFSPropertiesConfiguration  - Error reading in properties from dfs
   Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root
    |-- _hoodie_commit_time: string (nullable = true)
    |-- _hoodie_commit_seqno: string (nullable = true)
    |-- _hoodie_record_key: string (nullable = true)
    |-- _hoodie_partition_path: string (nullable = true)
    |-- _hoodie_file_name: string (nullable = true)
    |-- id: long (nullable = true)
    |-- name: string (nullable = true)
    |-- dt: string (nullable = true)
   .
   	at org.apache.hudi.common.util.ValidationUtils.checkArgument(ValidationUtils.java:40)
   	at org.apache.spark.sql.hudi.HoodieOptionConfig$$anonfun$validateTable$1.apply(HoodieOptionConfig.scala:201)
   	at org.apache.spark.sql.hudi.HoodieOptionConfig$$anonfun$validateTable$1.apply(HoodieOptionConfig.scala:200)
   	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
   	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
   	at org.apache.spark.sql.hudi.HoodieOptionConfig$.validateTable(HoodieOptionConfig.scala:200)
   	at org.apache.spark.sql.catalyst.catalog.HoodieCatalogTable.parseSchemaAndConfigs(HoodieCatalogTable.scala:213)
   	at org.apache.spark.sql.catalyst.catalog.HoodieCatalogTable.initHoodieTable(HoodieCatalogTable.scala:156)
   	at org.apache.spark.sql.hudi.command.CreateHoodieTableCommand.run(CreateHoodieTableCommand.scala:67)
   	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.executeCollect(commands.scala:79)
   	at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:194)
   	at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:194)
   	at org.apache.spark.sql.Dataset$$anonfun$52.apply(Dataset.scala:3370)
   	at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:78)
   	at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:125)
   	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:73)
   	at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3369)
   	at org.apache.spark.sql.Dataset.<init>(Dataset.scala:194)
   	at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:79)
   	at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
   	at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:694)
   	at com.twilio.optimustranformer.OptimusTranformer$$anonfun$main$1$$anonfun$apply$mcV$sp$1.apply(OptimusTranformer.scala:74)
   	at com.twilio.optimustranformer.OptimusTranformer$$anonfun$main$1$$anonfun$apply$mcV$sp$1.apply(OptimusTranformer.scala:72)
   	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
   	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
   	at com.twilio.optimustranformer.OptimusTranformer$$anonfun$main$1.apply$mcV$sp(OptimusTranformer.scala:71)
   	at scala.util.control.Breaks.breakable(Breaks.scala:38)
   	at com.twilio.optimustranformer.OptimusTranformer$.main(OptimusTranformer.scala:70)
   	at com.twilio.optimustranformer.OptimusTranformer.main(OptimusTranformer.scala)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
   	at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
   	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:920)
   	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
   	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
   ```
   


-- 
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



[GitHub] [hudi] yanghua commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
yanghua commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987591321


   Hi @BenjMaq Maybe, you should define the `uuid` field actively. Yes, the default behavior has been changed compared to 0.9.


-- 
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



[GitHub] [hudi] yanghua commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
yanghua commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987821182


   > So how do I define this `uuid`? 
   
   Just like you have defined the field `id, name...`.
   
   > And what is it used for? 
   
   If you don't specify a primary key, Hudi would try to use `uuid` as the primary key and find its definition. Or you can specify a primary key, like your `id` field actively.
   
   > Does it mean in `0.10.0` tables **must** have a primaryKey?
   
   yes
   
   


-- 
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



[GitHub] [hudi] yanghua closed issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
yanghua closed issue #4229:
URL: https://github.com/apache/hudi/issues/4229


   


-- 
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



[GitHub] [hudi] yanghua commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
yanghua commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-995350604


   > Thank you all. Passing a primary is the way then. We are good to close for me.
   
   thanks, closing now.


-- 
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



[GitHub] [hudi] leesf removed a comment on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
leesf removed a comment on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987707953


   您好,您的邮件我已经收到,我会立即回复,祝您生活愉快!


-- 
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



[GitHub] [hudi] leesf commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
leesf commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987707953


   您好,您的邮件我已经收到,我会立即回复,祝您生活愉快!


-- 
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



[GitHub] [hudi] BenjMaq commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
BenjMaq commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-994560291


   Thank you all. Passing a primary is the way then. We are good to close for me.


-- 
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



[GitHub] [hudi] YannByron commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
YannByron commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987705455


   @BenjMaq
   as @yanghua commented. also, we'll update quick-start docs ASAP.


-- 
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



[GitHub] [hudi] BenjMaq commented on issue #4229: [SUPPORT] Exception in thread "main" java.lang.IllegalArgumentException: Can't find primaryKey `uuid` in root

Posted by GitBox <gi...@apache.org>.
BenjMaq commented on issue #4229:
URL: https://github.com/apache/hudi/issues/4229#issuecomment-987753030


   Thanks for the answers. So how do I define this `uuid`? And what is it used for? Does it mean in `0.10.0` tables **must** have a primaryKey?


-- 
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