Skip to content

Commit

Permalink
introducing zstd compression codec plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
  • Loading branch information
sarthakaggarwal97 committed Sep 1, 2023
1 parent b300a90 commit 32b4b10
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .idea/runConfigurations/Debug_OpenSearch.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package org.opensearch.index.codec;

import org.apache.lucene.tests.util.LuceneTestCase;
import org.opensearch.action.admin.indices.flush.FlushResponse;
import org.opensearch.action.admin.indices.refresh.RefreshResponse;
import org.opensearch.action.admin.indices.segments.IndicesSegmentsRequest;
Expand Down Expand Up @@ -43,6 +44,7 @@
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;

@LuceneTestCase.AwaitsFix(bugUrl = "")
public class MultiCodecReindexIT extends ReindexTestCase {

@Override
Expand Down
29 changes: 29 additions & 0 deletions plugins/custom-codecs/licenses/zstd-jni-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----------------------------------------------------------------------------
** Beginning of "BSD License" text. **

Zstd-jni: JNI bindings to Zstd Library

Copyright (c) 2015-present, Luben Karavelov/ All rights reserved.

BSD License

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions plugins/custom-codecs/licenses/zstd-jni-NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The code for the JNI bindings to Zstd library was originally authored by Luben Karavelov
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ public Supplier<RetentionLeases> retentionLeasesSupplier() {
case "zlib":
case "lucene_default":
return s;
case "zstd":
case "zstd_no_dict":
if (Codec.availableCodecs().contains("Lucene95CustomCodec")) {
return s;
}
default:
if (("zstd".equals(s) || "zstd_no_dict".equals(s)) && Codec.availableCodecs().contains("Lucene95CustomCodec")) {
return s;
Expand Down

0 comments on commit 32b4b10

Please sign in to comment.