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/04/13 09:21:53 UTC

[GitHub] [hudi] xglv1985 opened a new issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

xglv1985 opened a new issue #2812:
URL: https://github.com/apache/hudi/issues/2812


   when I ran a Spark 2.4 job to incremental query a MOR table, the job failed with the following errors:
   
   `2021-04-13 12:39:54 [Executor task launch worker for task 215] ERROR [Executor:91]: Exception in task 160.2 in stage 0.0 (TID 215)
   java.io.IOException: can not read class org.apache.parquet.format.PageHeader: null
   	at org.apache.parquet.format.Util.read(Util.java:216)
   	at org.apache.parquet.format.Util.readPageHeader(Util.java:65)
   	at org.apache.parquet.hadoop.ParquetFileReader$Chunk.readPageHeader(ParquetFileReader.java:936)
   	at org.apache.parquet.hadoop.ParquetFileReader$Chunk.readAllPages(ParquetFileReader.java:950)
   	at org.apache.parquet.hadoop.ParquetFileReader.readNextRowGroup(ParquetFileReader.java:807)
   	at org.apache.parquet.hadoop.InternalParquetRecordReader.checkRead(InternalParquetRecordReader.java:127)
   	at org.apache.parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:222)
   	at org.apache.parquet.hadoop.ParquetRecordReader.nextKeyValue(ParquetRecordReader.java:207)
   	at org.apache.spark.sql.execution.datasources.RecordReaderIterator.hasNext(RecordReaderIterator.scala:39)
   	at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
   	at org.apache.hudi.HoodieMergeOnReadRDD$$anon$3.hasNext(HoodieMergeOnReadRDD.scala:217)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.agg_doAggregateWithoutKey_0$(Unknown Source)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$13$$anon$1.hasNext(WholeStageCodegenExec.scala:636)
   	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:409)
   	at org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter.write(BypassMergeSortShuffleWriter.java:125)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:55)
   	at org.apache.spark.scheduler.Task.run(Task.scala:121)
   	at org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:408)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:414)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: shaded.parquet.org.apache.thrift.transport.TTransportException
   	at shaded.parquet.org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
   	at shaded.parquet.org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
   	at shaded.parquet.org.apache.thrift.protocol.TCompactProtocol.readBinary(TCompactProtocol.java:709)
   	at org.apache.parquet.format.InterningProtocol.readBinary(InterningProtocol.java:223)
   	at shaded.parquet.org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:102)
   	at shaded.parquet.org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:138)
   	at shaded.parquet.org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:130)
   	at shaded.parquet.org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:60)
   	at org.apache.parquet.format.PageHeader$PageHeaderStandardScheme.read(PageHeader.java:1047)
   	at org.apache.parquet.format.PageHeader$PageHeaderStandardScheme.read(PageHeader.java:966)
   	at org.apache.parquet.format.PageHeader.read(PageHeader.java:843)
   	at org.apache.parquet.format.Util.read(Util.java:213)
   	... 25 more`
   
   and
   
   `2021-04-13 12:40:07 [Executor task launch worker for task 1113] ERROR [Executor:91]: Exception in task 206.4 in stage 0.0 (TID 1113)
   java.io.IOException: can not read class org.apache.parquet.format.PageHeader: Required field 'uncompressed_page_size' was not found in serialized data! Struct: org.apache.parquet.format.PageHeader$PageHeaderStandardScheme@ec35f50
   	at org.apache.parquet.format.Util.read(Util.java:216)
   	at org.apache.parquet.format.Util.readPageHeader(Util.java:65)
   	at org.apache.parquet.hadoop.ParquetFileReader$Chunk.readPageHeader(ParquetFileReader.java:936)
   	at org.apache.parquet.hadoop.ParquetFileReader$Chunk.readAllPages(ParquetFileReader.java:950)
   	at org.apache.parquet.hadoop.ParquetFileReader.readNextRowGroup(ParquetFileReader.java:807)
   	at org.apache.parquet.hadoop.InternalParquetRecordReader.checkRead(InternalParquetRecordReader.java:127)
   	at org.apache.parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:222)
   	at org.apache.parquet.hadoop.ParquetRecordReader.nextKeyValue(ParquetRecordReader.java:207)
   	at org.apache.spark.sql.execution.datasources.RecordReaderIterator.hasNext(RecordReaderIterator.scala:39)
   	at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
   	at org.apache.hudi.HoodieMergeOnReadRDD$$anon$3.hasNext(HoodieMergeOnReadRDD.scala:217)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.agg_doAggregateWithoutKey_0$(Unknown Source)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$13$$anon$1.hasNext(WholeStageCodegenExec.scala:636)
   	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:409)
   	at org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter.write(BypassMergeSortShuffleWriter.java:125)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
   	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:55)
   	at org.apache.spark.scheduler.Task.run(Task.scala:121)
   	at org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:408)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:414)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: shaded.parquet.org.apache.thrift.protocol.TProtocolException: Required field 'uncompressed_page_size' was not found in serialized data! Struct: org.apache.parquet.format.PageHeader$PageHeaderStandardScheme@ec35f50
   	at org.apache.parquet.format.PageHeader$PageHeaderStandardScheme.read(PageHeader.java:1055)
   	at org.apache.parquet.format.PageHeader$PageHeaderStandardScheme.read(PageHeader.java:966)
   	at org.apache.parquet.format.PageHeader.read(PageHeader.java:843)
   	at org.apache.parquet.format.Util.read(Util.java:213)`
   
   my scala code is as follows:
   `def main(args: Array[String]) {
   
       val spark = SparkSession.builder().getOrCreate()
   
       val conf = spark.conf
       val input = conf.get(Constants.SPARK_INPUT)
       val sql = conf.get(Constants.SPARK_SQL_QUERY)
       val df = spark.read.format("hudi").
         option(QUERY_TYPE_OPT_KEY, QUERY_TYPE_INCREMENTAL_OPT_VAL).
         option(BEGIN_INSTANTTIME_OPT_KEY, "20210413081500").
         load(input)
   
       df.createOrReplaceTempView("hudi_materials_incremental")
       spark.sql(sql).show()
       df.printSchema()
     }`
   
   In case it was caused by parquet file itself, I did an experiment that I changed the code spark.read.format("hudi") to spark.read.format("parquet"), removed the next two lines with hudi options, and re-ran the job. I got no error at all.
   
   So what on earth caused the error? How should I do with my code or configuration, to eliminate the error? Thanks! 
   
   **Environment Description**
   
   * Hudi version : 0.8.0
   
   * Spark version : 2.4
   
   * Hive version :
   
   * Hadoop version :
   
   * Storage (HDFS/S3/GCS..) : HDFS
   
   * Running on Docker? (yes/no) :
   
   
   **Additional context**
   
   Add any other context about the problem here.
   
   **Stacktrace**
   
   ```Add the stacktrace of the error.```
   
   


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

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



[GitHub] [hudi] codope commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   @xglv1985 Is this still an issue? Did you get a chance to try the workaround suggested in https://issues.apache.org/jira/browse/SPARK-11844 ?


-- 
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] n3nash commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   Okay, do you mind re-opening that Spark ticket and asking a question there ? Other options are to try a different Spark build to confirm that this is a spark issue and should probably go away with a different build (may be 2.4)


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

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



[GitHub] [hudi] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   
   
   
   
   
   
   sorry for late response.
   
   > While we wait for your response, can you help answer these questions too
   > 
   > * Did you hit this issue right from the beginning when you start incremental query? Or do you see after some time(ie. few incremental pulls succeeded and after sometime you hit this error and after that its consistent?
   **Yes, right from the beginning, and each time definitely hit the error on the Spark cluster. But in my local IDEA, I did not hit the error, with only 5 hudi records. So I doubt that the error was caused by a corrupted parquet file. But until now I have not found the reason why it was damaged. https://issues.apache.org/jira/browse/SPARK-11844**
   > * If its later, can you give us the contents of ".hoodie". I am trying to get a sense if this happens just after compaction. If you know upfront, you can answer this one too.
   **Newest conclusion: the same error was raised not only in MOR, but also in COW.**
   
   thanks, I will coninue to focus on the problem.
   


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

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



[GitHub] [hudi] xglv1985 edited a comment on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

Posted by GitBox <gi...@apache.org>.
xglv1985 edited a comment on issue #2812:
URL: https://github.com/apache/hudi/issues/2812#issuecomment-819257340


   > @xglv1985 It looks like you hit this issue -> https://issues.apache.org/jira/browse/SPARK-11844.
   > 
   > The ticket was created as a MINOR and is already resolved by customers explaining that re-try works. Have you tried re-running the job with "hudi" multiple times to see if this problem is repeatable ? if yes, we might have to re-open that Spark ticket to get some help.
   
   Thanks for attention. Yes, the problem is repeatable and can be reproduced each time definitely.


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

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



[GitHub] [hudi] xglv1985 removed a comment on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > While we wait for your response, can you help answer these questions too
   > 
   > * Did you hit this issue right from the beginning when you start incremental query? Or do you see after some time(ie. few incremental pulls succeeded and after sometime you hit this error and after that its consistent?
   > * If its later, can you give us the contents of ".hoodie". I am trying to get a sense if this happens just after compaction. If you know upfront, you can answer this one too.


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

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



[GitHub] [hudi] n3nash commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   @xglv1985 Thanks, were you able to try a different spark version to see if it works for you ?


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

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



[GitHub] [hudi] xglv1985 closed issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   


-- 
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] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > Okay, do you mind re-opening that Spark ticket and asking a question there ? Other options are to try a different Spark build to confirm that this is a spark issue and should probably go away with a different build (may be 2.4)
   
   OK, I've left a message there. And I will try a different Spark version.


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

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



[GitHub] [hudi] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > @xglv1985 Thanks, were you able to try a different spark version to see if it works for you ?
   
   Yes, I am trying Spark 3.0.0 to see if it work for me, and I will feedback once the result comes out.


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

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



[GitHub] [hudi] nsivabalan commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   While we wait for your response, can you help answer these questions too
   - Did you hit this issue right from the beginning when you start incremental query? Or do you see after some time(ie. few incremental pulls succeeded and after sometime you hit this error and after that its consistent? 
   - If its later, can you give us the contents of ".hoodie". I am trying to get a sense if this happens just after compaction. If you know upfront, you can answer this one too. 


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

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



[GitHub] [hudi] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > @xglv1985 It looks like you hit this issue -> https://issues.apache.org/jira/browse/SPARK-11844.
   > 
   > The ticket was created as a MINOR and is already resolved by customers explaining that re-try works. Have you tried re-running the job with "hudi" multiple times to see if this problem is repeatable ? if yes, we might have to re-open that Spark ticket to get some help.
   
   Thanks for attention. Yes, the problem is repeatable and can be reproduce each time definitely.


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

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



[GitHub] [hudi] n3nash commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   @xglv1985 It looks like you hit this issue -> https://issues.apache.org/jira/browse/SPARK-11844. 
   
   The ticket was created as a MINOR and is already resolved by customers explaining that re-try works. Have you tried re-running the job with "hudi" multiple times to see if this problem is repeatable ? if yes, we might have to re-open that Spark ticket to get some help.


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

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



[GitHub] [hudi] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > While we wait for your response, can you help answer these questions too
   > 
   > * Did you hit this issue right from the beginning when you start incremental query? Or do you see after some time(ie. few incremental pulls succeeded and after sometime you hit this error and after that its consistent?
   > * If its later, can you give us the contents of ".hoodie". I am trying to get a sense if this happens just after compaction. If you know upfront, you can answer this one too.


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

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



[GitHub] [hudi] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   I am sorry for the late response. This issue is at last proven to be a particular problem that can only be raised in our inner development environment. It is a bug of the mid-ware we use. Now this bug has been fixed by its owner. The issue is proven to be unrelated to HUDI at all. Thanks again, Everyone!
   
   
   
   
   At 2021-08-25 22:32:43, "Sagar Sumit" ***@***.***> wrote:
   
   @xglv1985 Is this still an issue? Did you get a chance to try the workaround suggested in https://issues.apache.org/jira/browse/SPARK-11844 ?
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   Triage notifications on the go with GitHub Mobile for iOS or Android.


-- 
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] xglv1985 commented on issue #2812: [SUPPORT]Got a parquet related error when incremental querying MOR table, using Spark 2.4

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


   > @xglv1985 Is this still an issue? Did you get a chance to try the workaround suggested in https://issues.apache.org/jira/browse/SPARK-11844 ?
   
   I am sorry for the late response. This issue is at last proven to be a particular problem that can only be raised in our inner development environment. It is a bug of the mid-ware we use. Now this bug has been fixed by its owner. The issue is proven to be unrelated to HUDI at all. Thanks again, Everyone!


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