Skip to content

Commit ed63964

Browse files
committed
Refactor custom-codec plugin from core repository
This is the initial commit that refactors (copies) the custom-codec plugin from the core repository into this new downstream opensearch plugin repository. This is largely a rote copy, with some additional work to prepare the build.gradle for standalone building. More work will be needed to onboard the plugin into the official opensearch bundle. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
1 parent f74df3d commit ed63964

29 files changed

+2475
-9
lines changed

.gitignore

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
# intellij files
3+
.idea/
4+
*.iml
5+
*.ipr
6+
*.iws
7+
build-idea/
8+
out/
9+
10+
# include shared intellij config
11+
!.idea/inspectionProfiles/Project_Default.xml
12+
!.idea/runConfigurations/Debug_OpenSearch.xml
13+
!.idea/vcs.xml
14+
!.idea/icon.svg
15+
16+
# These files are generated in the main tree by annotation processors
17+
benchmarks/src/main/generated/*
18+
benchmarks/bin/*
19+
benchmarks/build-eclipse-default/*
20+
server/bin/*
21+
server/build-eclipse-default/*
22+
test/framework/build-eclipse-default/*
23+
24+
# eclipse files
25+
.project
26+
.classpath
27+
.settings
28+
build-eclipse/
29+
30+
# netbeans files
31+
nb-configuration.xml
32+
nbactions.xml
33+
34+
# gradle stuff
35+
.gradle/
36+
build/
37+
38+
# vscode stuff
39+
.vscode/
40+
41+
# testing stuff
42+
**/.local*
43+
.vagrant/
44+
/logs/
45+
46+
# osx stuff
47+
.DS_Store
48+
49+
# default folders in which the create_bwc_index.py expects to find old es versions in
50+
/backwards
51+
/dev-tools/backwards
52+
53+
# needed in case docs build is run...maybe we can configure doc build to generate files under build?
54+
html_docs
55+
56+
# random old stuff that we should look at the necessity of...
57+
/tmp/
58+
eclipse-build
59+
60+
# projects using testfixtures
61+
testfixtures_shared/
62+
63+
# These are generated from .ci/jobs.t
64+
.ci/jobs/
65+
66+
# build files generated
67+
doc-tools/missing-doclet/bin/

MAINTAINERS.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md).
2+
3+
## Current Maintainers
4+
5+
| Maintainer | GitHub ID | Affiliation |
6+
|------------------|-----------------------------------------------------------|-------------|
7+
| Andrew Ross | [andrross](https://github.com/andrross) | Amazon |
8+
| Andriy Redko | [reta](https://github.com/reta) | Aiven |
9+
| Nicholas Knize | [nknize](https://github.com/nknize) | Amazon |
10+
11+
## Emeritus
12+
13+
| Maintainer | GitHub ID | Affiliation |
14+
|-------------| ------------------------------------------ | ----------- |

NOTICE

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
OpenSearch (https://opensearch.org)
2+
Copyright OpenSearch Contributors

README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
## My Project
2-
3-
TODO: Fill this README out!
4-
5-
Be sure to:
6-
7-
* Change the title in this README
8-
* Edit your repository description on GitHub
1+
# Custom Codecs
2+
Custom Codecs plugin makes it possible for users to provide custom Lucene codecs for loading through Apache Lucene's `NamedSPILoader`.
3+
These codecs can be used to customize the on-disk representation of the opensearch indexes. For example, zstd compression can be used for
4+
`StoredField` types through the `ZstdCodec`.
95

106
## Security
117

build.gradle

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*
8+
* Modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
10+
*/
11+
12+
buildscript {
13+
ext {
14+
opensearch_group = "org.opensearch"
15+
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
16+
}
17+
18+
repositories {
19+
mavenLocal()
20+
mavenCentral()
21+
maven { url "https://plugins.gradle.org/m2/" }
22+
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
23+
}
24+
25+
dependencies {
26+
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
27+
classpath "org.jacoco:org.jacoco.agent:0.8.5"
28+
}
29+
}
30+
31+
plugins {
32+
id 'java'
33+
}
34+
35+
repositories {
36+
mavenLocal()
37+
mavenCentral()
38+
maven { url "https://plugins.gradle.org/m2/" }
39+
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
40+
}
41+
42+
apply plugin: 'opensearch.opensearchplugin'
43+
44+
opensearchplugin {
45+
name 'custom-codecs'
46+
description 'A plugin that implements custom compression codecs.'
47+
classname 'org.opensearch.index.codec.customcodecs.CustomCodecPlugin'
48+
licenseFile rootProject.file('LICENSE')
49+
noticeFile rootProject.file('NOTICE')
50+
}
51+
52+
dependencies {
53+
api "com.github.luben:zstd-jni:1.5.5-5"
54+
}
55+
56+
// ignore missing javadocs
57+
tasks.withType(Javadoc).configureEach { Javadoc javadoc ->
58+
// the -quiet here is because of a bug in gradle, in that adding a string option
59+
// by itself is not added to the options. By adding quiet, both this option and
60+
// the "value" -quiet is added, separated by a space. This is ok since the javadoc
61+
// command already adds -quiet, so we are just duplicating it
62+
// see https://discuss.gradle.org/t/add-custom-javadoc-option-that-does-not-take-an-argument/5959
63+
javadoc.options.encoding = 'UTF8'
64+
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet')
65+
boolean failOnJavadocWarning = project.ext.has('failOnJavadocWarning') ? project.ext.get('failOnJavadocWarning') : true
66+
if (failOnJavadocWarning) {
67+
javadoc.options.addStringOption('Xwerror', '-quiet')
68+
}
69+
javadoc.options.tags = ["opensearch.internal", "opensearch.api", "opensearch.experimental"]
70+
javadoc.options.addStringOption("-release", java.targetCompatibility.majorVersion)
71+
}
72+
73+
testingConventions.enabled = false;
74+
loggerUsageCheck.enabled = false
75+
validateNebulaPom.enabled = false

gradle/wrapper/gradle-wrapper.jar

62.2 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)