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/03/17 17:38:31 UTC

[GitHub] [hudi] stackfun opened a new issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

stackfun opened a new issue #2692:
URL: https://github.com/apache/hudi/issues/2692


   **Describe the problem you faced**
   
   During a delta commit on MOR tables, if hudi generates avro log files that are larger than 16MB on Google Cloud Storage, then hudi always fails to read them due to a corrupted block error. Might be related to this - https://github.com/apache/hudi/pull/2500
   
   **To Reproduce**
   
   ```
   def corrupt_block_defect(spark, database_name, table_name, destination):
       import secrets 
       
       def gen_data(start, stop):
           return [
               {
                   "uuid": str(i),
                   "partitionpath": "partition",
                   "data": secrets.token_hex(1000),
                   "start": start,
                   "stop": stop,
                   "ts": str(i),
               }
               for i in range(start, stop)
           ]
       
       hudi_write_options = {
           "hoodie.table.name": table_name,
           "hoodie.datasource.write.operation": "upsert",
           "hoodie.datasource.write.table.name": table_name,
           "hoodie.datasource.write.table.type": "MERGE_ON_READ",
           "hoodie.compact.inline": True,
           "hoodie.compact.inline.max.delta.commits": 1,
       }
       df = spark.read.json(spark.sparkContext.parallelize(gen_data(0, 100000)))
       df.write.format("hudi").options(**hudi_write_options).mode("overwrite").save(destination)
       df = spark.read.json(spark.sparkContext.parallelize(gen_data(0, 1000)))  # generates log file < 16 MB
       df.write.format("hudi").options(**hudi_write_options).mode("append").save(destination)
       df = spark.read.json(spark.sparkContext.parallelize(gen_data(0, 10000)))  # generates avro file > 16 MB, get corrupted block
       df.write.format("hudi").options(**hudi_write_options).mode("append").save(destination)
   ```
   
   in hudi-cli:
   ```
   hudi:test_hudi_table->show logfile metadata --logFilePathPattern gs://my_bucket/test_hudi_table/partition/.2d471d69-5385-42ed-adf1-2078cf308ccb-0_20210317164945.log.1_0-93-39067
   21/03/17 16:56:54 INFO log.HoodieLogFileReader: Found corrupted block in file HoodieLogFile{pathStr='gs://my_bucket/test_hudi_table/partition/.2d471d69-5385-42ed-adf1-2078cf308ccb-0_20210317164945.log.1_0-93-39067', fileLen=0}. Header block size(7035295) did not match the footer block size(27475)
   ```
   
   In the compaction commit, we also see corrupted blocks.
   
   **Environment Description**
   
   * Hudi version : 0.7.0 (with https://github.com/apache/hudi/pull/2500 merged)
   
   * Spark version : 2.4.7
   
   * Hive version : 2.3.7
   
   * Hadoop version : 2.9.2
   
   * Storage (HDFS/S3/GCS..) : GCS
   
   * Running on Docker? (yes/no) : no
   
   * GCP Dataproc: 1.4
   
   
   **Workaround**
   
   Setting the following settings prevents corrupted blocks, however, we get worse performance.
   ```
   "hoodie.logfile.data.block.max.size": 1024 * 1024 * 8,
   "hoodie.logfile.max.size": 1024 * 1024 * 8,
   ```
   


----------------------------------------------------------------
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] vburenin commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @nsivabalan Nope, but there is a huge data loses with hudi 0.5.0 with MoR. I haven't tried MoR table with 0.7.0, only CoW.


-- 
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] vburenin commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @stackfun What't your config setup to connect to GCS? In my case I use gcs connector.


-- 
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 #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @vburenin : Do you know of any such issues. 


-- 
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] stackfun commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   Yes, I am using the gcs connector. Seems like it is configured automatically when submitting spark jobs through dataproc on GCP.
   
   When using hudi-cli.sh on the master node of a dataproc cluster, I export the following before running the script. `export CLIENT_JAR=/usr/local/share/google/dataproc/lib/gcs-connector.jar:/usr/local/share/gogle/dataproc/lib/gcs-connector-hadoop2-1.9.17.jar`
   
   


-- 
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 #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @vburenin Can you please open a JIRA ticket with the details on "huge data losses with hudi 0.5.0 and EMR" ? I don't want to pollute this thread. 


-- 
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 edited a comment on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @vburenin Can you please open a JIRA ticket with the details on "huge data losses with hudi 0.5.0 and EMR" ? This seems super critical and I would like to know the issues ASAP, don't want to pollute this thread. 


-- 
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] vburenin commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   Hm, you are using 1.x. I am on 2.1.x. 2.2 seems borked a little. In my case gcs-connector is baked into spark image.


-- 
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] vburenin edited a comment on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @nsivabalan Nope, but there are huge data loses with hudi 0.5.0 with MoR. I haven't tried MoR table with 0.7.0, only CoW.


-- 
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] vinothchandar closed issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   


-- 
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] nsivabalan commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   interesting. I will have to try it out locally to reproduce. Will keep you posted. thanks for reporting. 


-- 
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] vburenin commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @n3nash I am not sure the issue is still relevant. That has been happening with Hudi 0.5.0-snapshot. The symptoms were like there are duplicate records, or records were not upserted which could be seen as version field was let say 9, but the current version is like 15. Apparently the compaction is to blame, we had a few intermitent failures when compaction didn't finish and when it eventually finishes things get borked... but it was extremely hard to catch unless we were doing direct data validation that is not that simple to do.


-- 
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] stackfun commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   I'm using GCP dataproc 1.4, the gcs connector version is 1.9.17. The versions of all the libraries can be found here: https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-release-1.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] n3nash commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   @stackfun Can you respond to @vburenin question ? We can try to go from there..


-- 
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] vinothchandar commented on issue #2692: [SUPPORT] Corrupt Blocks in Google Cloud Storage

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


   This I believe is long addressed with 0.8.0 or so. 


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