Skip to content

Commit

Permalink
accessors for custom compression modes
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
  • Loading branch information
sarthakaggarwal97 committed Nov 30, 2023
1 parent 82a4fea commit 07d42d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,13 @@ Lucene95CustomCodec.Mode getMode() {
public int getCompressionLevel() {
return compressionLevel;
}


public CompressionMode getZstdCompressionMode() {
return zstdCompressionMode;
}

public CompressionMode getZstdNoDictCompressionMode() {
return zstdNoDictCompressionMode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ public void testZstdNoDictLucene95CustomCodecModeWithCompressionLevel() {
assertEquals(randomCompressionLevel, lucene95CustomStoredFieldsFormat.getCompressionLevel());
}

public void testCompressionModes(){
Lucene95CustomStoredFieldsFormat lucene95CustomStoredFieldsFormat = new Lucene95CustomStoredFieldsFormat();
assertTrue(lucene95CustomStoredFieldsFormat.getZstdCompressionMode() instanceof ZstdCompressionMode);
assertTrue(lucene95CustomStoredFieldsFormat.getZstdNoDictCompressionMode() instanceof ZstdNoDictCompressionMode);
}
}

0 comments on commit 07d42d8

Please sign in to comment.