apache / apache/parquet-java

AvroParquetWriter write to s3 bucket throws data intergrity exception

Open
#2,684 1 comment 0 reactions 0 assignees View on GitHub
Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

 

Hi, we are trying to use [org.apache.parquet.avro](https://www.tabnine.com/code/java/packages/org.apache.parquet.avro).AvroParquetWriter

to write parquet file to s3 bucket. The file is successfully written to s3 bucket but 

get an exception

com.amazonaws.SdkClientException: Unable to verify integrity of data upload.

The purpose is to resolve this exceptions while  The s3 bucket is encrypted with SSE-KMS not SSE-S3. 

 

It appears that the exceptions are thrown because of code blocks in the link below

From amazon doc, the etag is not same as MD5 when s3 bucket is encrypted with SSE-KMS

 

**The possible way is to pass MD5 in request header or set system.property to disable validation in  skipMd5CheckStrategy.skipClientSideValidationPerPutResponse as indicated in link**

 The issue is that I do not find a proper way to inject such configurations into AvroParquetWriter. Is this possible? If yes, can you help to show how to do it? 

 

Thanks

 

Sean

 

**Reporter**: [sean](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ks666)

**Note**: *This issue was originally created as [PARQUET-2146](https://issues.apache.org/jira/browse/PARQUET-2146). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with AvroParquetWriter and trace how its S3 upload configuration reaches AmazonS3Client, especially the validation path linked in the report. Read SkipMd5CheckStrategy and the AWS documentation on SSE-KMS ETags; done means an SSE-KMS upload no longer raises the integrity exception or has a documented configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.