Repository navigation
Conversation
parquet-java loads org.apache.hadoop.mapreduce.lib.input.FileInputFormat when a reader is built. The jar was only a test dependency, so input.format=parquet failed with NoClassDefFoundError in the released distribution. Fixes Aiven-Open#653. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Only RuntimeException was logged, so an Error such as NoClassDefFoundError surfaced only as 'polling thread has died'. The Error is logged and rethrown. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The input stream wrapped only downloadStream().blockFirst(), silently truncating blobs. The blob is now downloaded to a temporary file that is deleted when the stream is closed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The second argument of listBlobs is an opaque continuation token returned by the service. Listing from an offset now filters by blob name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
@szinczen thank you for this, I will review hopefully later today |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #653 and fixes silent truncation of blobs in the Azure source connector.
Problems
hadoop-mapreduce-client-corewas only a test dependency, so the reader fails withNoClassDefFoundError: org/apache/hadoop/mapreduce/lib/input/FileInputFormat. Because onlyRuntimeExceptionis logged in the polling thread, the connector log shows justpolling thread has died.AzureBlobSourceRecordIteratorwraps onlydownloadStream().blockFirst(). Adding the missing jar alone is therefore not enough: in my test, ~100 MB Parquet files then produced 0 records and the read carried on without failing.getAzureBlobStream(offset)passes a blob name as the second argument oflistBlobs, which is a service continuation token.Changes (one commit each)
hadoop-mapreduce-client-coreas a non-transitiveruntimeOnlydependency ofcommons. This adds the jar to the distributions of all source and sink connectors that depend oncommons.Errors thrown in the source polling thread, then rethrow them.downloadToFile), deleted when the stream is closed, so the blob is not held in memory.Parquet input now needs temporary disk space of roughly twice the file size per task, because
ParquetTransformermakes its own temporary copy.Testing
./gradlew build -x integrationTest(Windows, JDK 21): everything passes exceptS3SinkConfigTest.wrongPartSize(), which also fails for me on unmodifiedmain(c7289ad).openBlob(complete content, temporary file removed after close and after a failed download).AzureBlobSourceRecordIteratorwith the jars from the built distribution (plus Kafka Connect 3.3.1 API/runtime) against Azurite. No Kafka Connect worker, converter or producer, and no real Azure account.-Xmx512mand with-Xmx256m.input.format=bytes: before, larger blobs were cut to about 1.2 KB; after, the reassembled chunks match the SHA-256 of each original.Not addressed
Read failures that are caught inside
Transformer/ParquetTransformerare logged and do not fail the task. For example, a damaged Parquet file produced 0 records in my test without failing. From reading the code, a failure in the middle of a file may also leave it marked as processed. Changing this affects all source connectors, so I left it out of this PR.🤖 Generated with Claude Code