Skip to content

Commit

Permalink
Add comments about the tested codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
gszadovszky committed Mar 4, 2024
1 parent 01ca692 commit e813282
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public void release(ByteBuffer b) {
}

public static void main(String[] args) throws Throwable {
// Codecs supported by the direct codec factory by default (without specific hadoop native libs)
CompressionCodecName[] codecs = {
CompressionCodecName.UNCOMPRESSED,
CompressionCodecName.GZIP,
Expand All @@ -173,6 +174,7 @@ public static void main(String[] args) throws Throwable {
.withAllocator(allocator)
.withCodecFactory(CodecFactory.createDirectCodecFactory(
new Configuration(), allocator, ParquetProperties.DEFAULT_PAGE_SIZE))
// Also validating the different direct codecs which might also have issues if an OOM happens
.withCompressionCodec(codecs[RANDOM.nextInt(codecs.length)])
.build()) {
for (int i = 0; i < 100_000; ++i) {
Expand Down

0 comments on commit e813282

Please sign in to comment.