apache / apache/paimon

[Bug] We should change the default manifest format to parquet.

Open
#7,029 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.

### Paimon version

Manifest compression defaults to zstd, but the avro format still attempts to load snappy.

```
in the class `org.apache.avro.file.CodecFactory` we find :
static {
addCodec("null", nullCodec());
addCodec("deflate", deflateCodec(-1));
addCodec("bzip2", bzip2Codec());
addCodec("xz", xzCodec(6));
addCodec("zstandard", zstandardCodec(3, false));
addCodec("snappy", snappyCodec());
}
```

Could not load 'org-xerial-snappy.properties' from classpath: java.lang.NullPointerException
java.lang.NullPointerException
at org.xerial.snappy.SnappyLoader.getRootClassLoader(SnappyLoader.java:147)
at org.xerial.snappy.SnappyLoader.injectSnappyNativeLoader(SnappyLoader.java:256)
at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:227)
at org.xerial.snappy.Snappy.(Snappy.java:48)
at org.apache.paimon.shade.org.apache.avro.file.SnappyCodec$Option.(SnappyCodec.java:35)
at org.apache.paimon.shade.org.apache.avro.file.CodecFactory.snappyCodec(CodecFactory.java:69)
at org.apache.paimon.shade.org.apache.avro.file.CodecFactory.(CodecFactory.java:140)
at org.apache.paimon.shade.org.apache.avro.file.DataFileStream.resolveCodec(DataFileStream.java:158)
at org.apache.paimon.shade.org.apache.avro.file.DataFileStream.initialize(DataFileStream.java:144)
at org.apache.paimon.shade.org.apache.avro.file.DataFileReader.(DataFileReader.java:143)
at org.apache.paimon.shade.org.apache.avro.file.DataFileReader.(DataFileReader.java:134)
at org.apache.paimon.shade.org.apache.avro.file.DataFileReader.openReader(DataFileReader.java:74)
at org.apache.paimon.format.avro.AvroBulkFormat$AvroReader.createReaderFromPath(AvroBulkFormat.java:84)
at org.apache.paimon.format.avro.AvroBulkFormat$AvroReader.(AvroBulkFormat.java:70)
at org.apache.paimon.format.avro.AvroBulkFormat$AvroReader.(AvroBulkFormat.java:57)
at org.apache.paimon.format.avro.AvroBulkFormat.createReader(AvroBulkFormat.java:54)
at org.apache.paimon.utils.FileUtils.createFormatReader(FileUtils.java:130)
at org.apache.paimon.utils.ObjectsFile.createIterator(ObjectsFile.java:180)
at org.apache.paimon.utils.ObjectsCache.readSegments(ObjectsCache.java:129)
at org.apache.paimon.utils.ObjectsCache.read(ObjectsCache.java:93)
at org.apache.paimon.utils.ObjectsFile.readWithIOException(ObjectsFile.java:149)
at org.apache.paimon.utils.ObjectsFile.read(ObjectsFile.java:134)
at org.apache.paimon.utils.ObjectsFile.read(ObjectsFile.java:105)
at org.apache.paimon.utils.ObjectsFile.read(ObjectsFile.java:101)
at org.apache.paimon.manifest.ManifestList.readDataManifests(ManifestList.java:86)
at org.apache.paimon.operation.ManifestsReader.readManifests(ManifestsReader.java:99)
at org.apache.paimon.operation.ManifestsReader.read(ManifestsReader.java:85)
at org.apache.paimon.operation.AbstractFileStoreScan.readManifests(AbstractFileStoreScan.java:393)
at org.apache.paimon.operation.AbstractFileStoreScan.plan(AbstractFileStoreScan.java:233)
at org.apache.paimon.table.source.snapshot.SnapshotReaderImpl.read(SnapshotReaderImpl.java:296)

### Compute Engine

master

### Minimal reproduce step

none

### What doesn't meet your expectations?

none

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at ManifestList.readDataManifests and the AvroBulkFormat reader shown in the stack trace, then trace where the manifest format and compression defaults are selected. Compare that path with the available Parquet manifest handling and verify the default no longer initializes Avro's Snappy codec. Done means manifest reads use Parquet by default without the reported class-loading failure, with relevant tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.