diff --git a/.ci/bwcVersions b/.ci/bwcVersions index 8503dd364c8d8..245c112356178 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -39,5 +39,6 @@ BWC_VERSION: - "1.3.0" - "1.3.1" - "1.3.2" + - "1.3.3" - "2.0.0" - "2.1.0" diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 7aa77cad0e713..94e649a634c7f 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,4 +1,7 @@ -## Maintainers +- [Current Maintainers](#current-maintainers) +- [Emeritus](#emeritus) + +## Current Maintainers | Maintainer | GitHub ID | Affiliation | | --------------- | --------- | ----------- | @@ -6,14 +9,13 @@ | Anas Alkouz | [anasalkouz](https://github.com/anasalkouz) | Amazon | | Andrew Ross | [andrross](https://github.com/andrross)| Amazon | | Andriy Redko | [reta](https://github.com/reta) | Aiven | +| Bukhtawar Khan | [Bukhtawar](https://github.com/Bukhtawar) | Amazon | | Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon | | Daniel "dB." Doubrovkine | [dblock](https://github.com/dblock) | Amazon | -| Gopala Krishna Ambareesh | [krishna-ggk](https://github.com/krishna-ggk) |Amazon | | Himanshu Setia | [setiah](https://github.com/setiah) | Amazon | -| Itiyama Sadana | [itiyamas](https://github.com/itiyamas) | Amazon | | Kartik Ganesh | [kartg](https://github.com/kartg) | Amazon | +| Kunal Kotwani | [kotwanikunal](https://github.com/kotwanikunal) | Amazon | | Marc Handalian | [mch2](https://github.com/mch2) | Amazon | -| Megha Sai Kavikondala | [meghasaik](https://github.com/meghasaik) | Amazon | | Nick Knize | [nknize](https://github.com/nknize) | Amazon | | Owais Kazi | [owaiskazi19](https://github.com/owaiskazi19) | Amazon | | Rabi Panda | [adnapibar](https://github.com/adnapibar) | Amazon | @@ -23,7 +25,12 @@ | Shweta Thareja |[shwetathareja](https://github.com/shwetathareja) | Amazon | | Tianli Feng | [tlfeng](https://github.com/tlfeng) | Amazon | | Vacha Shah | [VachaShah](https://github.com/VachaShah) | Amazon | -| Vengadanathan Srinivasan | [vengadanathan-s](https://github.com/vengadanathan-s) | Amazon | | Xue Zhou | [xuezhou25](https://github.com/xuezhou25) | Amazon | +## Emeritus + +| Maintainer | GitHub ID | Affiliation | +| --------------- | --------- | ----------- | +| Megha Sai Kavikondala | [meghasaik](https://github.com/meghasaik) | Amazon | + [This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). diff --git a/build.gradle b/build.gradle index ae2247bb865d1..0be90a63adc22 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ plugins { id 'lifecycle-base' id 'opensearch.docker-support' id 'opensearch.global-build-info' - id "com.diffplug.spotless" version "6.4.2" apply false + id "com.diffplug.spotless" version "6.5.2" apply false id "org.gradle.test-retry" version "1.3.2" apply false id "test-report-aggregation" id 'jacoco-report-aggregation' @@ -278,6 +278,7 @@ allprojects { // see https://discuss.gradle.org/t/add-custom-javadoc-option-that-does-not-take-an-argument/5959 javadoc.options.encoding = 'UTF8' javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet') + javadoc.options.tags = ["opensearch.internal", "opensearch.api", "opensearch.experimental"] } // support for reproducible builds @@ -387,7 +388,7 @@ gradle.projectsEvaluated { } } } - + dependencies { subprojects.findAll { it.pluginManager.hasPlugin('java') }.forEach { testReportAggregation it @@ -413,7 +414,7 @@ subprojects { // eclipse configuration allprojects { apply plugin: 'eclipse' - + // Name all the non-root projects after their path so that paths get grouped together when imported into eclipse. if (path != ':') { eclipse.project.name = path @@ -573,12 +574,12 @@ subprojects { reporting { reports { - testAggregateTestReport(AggregateTestReport) { + testAggregateTestReport(AggregateTestReport) { testType = TestSuiteType.UNIT_TEST } } } tasks.named(JavaBasePlugin.CHECK_TASK_NAME) { - dependsOn tasks.named('testAggregateTestReport', TestReport) + dependsOn tasks.named('testAggregateTestReport', TestReport) } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index a8b97a110d19a..6ae4512415345 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -122,7 +122,7 @@ dependencies { testFixturesApi "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${props.getProperty('randomizedrunner')}" testFixturesApi gradleApi() testFixturesApi gradleTestKit() - testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone:2.32.0' + testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone:2.33.2' testImplementation "org.mockito:mockito-core:${props.getProperty('mockito')}" integTestImplementation('org.spockframework:spock-core:2.1-groovy-3.0') { exclude module: "groovy" diff --git a/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java index 2a0521b17d55e..a28015784c4be 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java @@ -135,11 +135,11 @@ public String call() throws Exception { publication.artifact(project.getTasks().getByName("sourcesJar")); publication.artifact(project.getTasks().getByName("javadocJar")); } - - generatePomTask.configure( - t -> t.dependsOn(String.format("generatePomFileFor%sPublication", Util.capitalize(publication.getName()))) - ); } + + generatePomTask.configure( + t -> t.dependsOn(String.format("generatePomFileFor%sPublication", Util.capitalize(publication.getName()))) + ); }); } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java b/buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java index e8b4ecec7a56d..d83384ec7d172 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java @@ -7,17 +7,17 @@ */ package org.opensearch.gradle.pluginzip; -import java.util.*; import org.gradle.api.Plugin; import org.gradle.api.Project; +import org.gradle.api.publish.Publication; import org.gradle.api.publish.PublishingExtension; import org.gradle.api.publish.maven.MavenPublication; import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; + import java.nio.file.Path; +import org.gradle.api.Task; public class Publish implements Plugin { - private Project project; - public final static String EXTENSION_NAME = "zipmavensettings"; public final static String PUBLICATION_NAME = "pluginZip"; public final static String STAGING_REPO = "zipStaging"; @@ -37,7 +37,19 @@ public static void configMaven(Project project) { }); }); publishing.publications(publications -> { - publications.create(PUBLICATION_NAME, MavenPublication.class, mavenZip -> { + final Publication publication = publications.findByName(PUBLICATION_NAME); + if (publication == null) { + publications.create(PUBLICATION_NAME, MavenPublication.class, mavenZip -> { + String zipGroup = "org.opensearch.plugin"; + String zipArtifact = project.getName(); + String zipVersion = getProperty("version", project); + mavenZip.artifact(project.getTasks().named("bundlePlugin")); + mavenZip.setGroupId(zipGroup); + mavenZip.setArtifactId(zipArtifact); + mavenZip.setVersion(zipVersion); + }); + } else { + final MavenPublication mavenZip = (MavenPublication) publication; String zipGroup = "org.opensearch.plugin"; String zipArtifact = project.getName(); String zipVersion = getProperty("version", project); @@ -45,7 +57,7 @@ public static void configMaven(Project project) { mavenZip.setGroupId(zipGroup); mavenZip.setArtifactId(zipArtifact); mavenZip.setVersion(zipVersion); - }); + } }); }); } @@ -62,13 +74,17 @@ static String getProperty(String name, Project project) { @Override public void apply(Project project) { - this.project = project; - project.afterEvaluate(evaluatedProject -> { configMaven(project); }); - project.getGradle().getTaskGraph().whenReady(graph -> { - if (graph.hasTask(LOCALMAVEN)) { - project.getTasks().getByName(PLUGIN_ZIP_PUBLISH_POM_TASK).setEnabled(false); + project.afterEvaluate(evaluatedProject -> { + configMaven(project); + Task validatePluginZipPom = project.getTasks().findByName("validatePluginZipPom"); + if (validatePluginZipPom != null) { + project.getTasks().getByName("validatePluginZipPom").dependsOn("generatePomFileForNebulaPublication"); + } + Task publishPluginZipPublicationToZipStagingRepository = project.getTasks() + .findByName("publishPluginZipPublicationToZipStagingRepository"); + if (publishPluginZipPublicationToZipStagingRepository != null) { + publishPluginZipPublicationToZipStagingRepository.dependsOn("generatePomFileForNebulaPublication"); } - }); } } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java index a77155aacf723..c206860bb0117 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java @@ -77,7 +77,7 @@ public class DistroTestPlugin implements Plugin { private static final String SYSTEM_JDK_VERSION = "8u242+b08"; private static final String SYSTEM_JDK_VENDOR = "adoptopenjdk"; - private static final String GRADLE_JDK_VERSION = "17.0.2+8"; + private static final String GRADLE_JDK_VERSION = "17.0.3+7"; private static final String GRADLE_JDK_VENDOR = "adoptium"; // all distributions used by distro tests. this is temporary until tests are per distribution diff --git a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java index ae94ace55e637..851c450699bd7 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java @@ -13,23 +13,42 @@ import org.gradle.testfixtures.ProjectBuilder; import org.gradle.api.Project; import org.opensearch.gradle.test.GradleUnitTestCase; +import org.junit.After; +import org.junit.Before; import org.junit.Test; +import org.junit.rules.TemporaryFolder; + import java.io.IOException; import org.gradle.api.publish.maven.tasks.PublishToMavenRepository; import java.io.File; -import org.gradle.testkit.runner.BuildResult; import java.io.FileWriter; import java.io.Writer; -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS; -import static org.junit.Assert.assertEquals; import java.nio.file.Files; + +import static org.gradle.testkit.runner.TaskOutcome.SUCCESS; + import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.FileReader; import org.gradle.api.tasks.bundling.Zip; +import java.util.List; +import java.util.ArrayList; + public class PublishTests extends GradleUnitTestCase { + private TemporaryFolder projectDir; + + @Before + public void setUp() throws IOException { + projectDir = new TemporaryFolder(); + projectDir.create(); + } + + @After + public void tearDown() { + projectDir.delete(); + } @Test public void testZipPublish() throws IOException, XmlPullParserException { @@ -48,14 +67,14 @@ public void testZipPublish() throws IOException, XmlPullParserException { assertTrue(project.getTasks().getNames().contains(zipPublishTask)); assertNotNull("Task to generate: ", project.getTasks().getByName(zipPublishTask)); // Run Gradle functional tests, but calling a build.gradle file, that resembles the plugin publish behavior - File projectDir = new File("build/functionalTest"); + // Create a sample plugin zip file - File sampleZip = new File("build/functionalTest/sample-plugin.zip"); - Files.createDirectories(projectDir.toPath()); + File sampleZip = new File(projectDir.getRoot(), "sample-plugin.zip"); Files.createFile(sampleZip.toPath()); - writeString(new File(projectDir, "settings.gradle"), ""); + writeString(projectDir.newFile("settings.gradle"), ""); // Generate the build.gradle file String buildFileContent = "apply plugin: 'maven-publish' \n" + + "apply plugin: 'java' \n" + "publishing {\n" + " repositories {\n" + " maven {\n" @@ -72,25 +91,31 @@ public void testZipPublish() throws IOException, XmlPullParserException { + " }\n" + " }\n" + "}"; - writeString(new File(projectDir, "build.gradle"), buildFileContent); + writeString(projectDir.newFile("build.gradle"), buildFileContent); // Execute the task publishPluginZipPublicationToZipStagingRepository + List allArguments = new ArrayList(); + allArguments.add("build"); + allArguments.add(zipPublishTask); GradleRunner runner = GradleRunner.create(); runner.forwardOutput(); runner.withPluginClasspath(); - runner.withArguments(zipPublishTask); - runner.withProjectDir(projectDir); + runner.withArguments(allArguments); + runner.withProjectDir(projectDir.getRoot()); BuildResult result = runner.build(); // Check if task publishMavenzipPublicationToZipstagingRepository has ran well assertEquals(SUCCESS, result.task(":" + zipPublishTask).getOutcome()); // check if the zip has been published to local staging repo assertTrue( - new File("build/functionalTest/local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.zip") + new File(projectDir.getRoot(), "local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.zip") .exists() ); + assertEquals(SUCCESS, result.task(":" + "build").getOutcome()); // Parse the maven file and validate the groupID to org.opensearch.plugin MavenXpp3Reader reader = new MavenXpp3Reader(); Model model = reader.read( - new FileReader("build/functionalTest/local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.pom") + new FileReader( + new File(projectDir.getRoot(), "local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.pom") + ) ); assertEquals(model.getGroupId(), "org.opensearch.plugin"); } diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 3ade56a6cab21..121f88dd0aac0 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -2,7 +2,7 @@ opensearch = 3.0.0 lucene = 9.2.0-snapshot-f4f1f70 bundled_jdk_vendor = adoptium -bundled_jdk = 17.0.2+8 +bundled_jdk = 17.0.3+7 diff --git a/client/rest-high-level/src/main/java/org/opensearch/client/RequestConverters.java b/client/rest-high-level/src/main/java/org/opensearch/client/RequestConverters.java index 969f6e34b8e51..277759c921fbf 100644 --- a/client/rest-high-level/src/main/java/org/opensearch/client/RequestConverters.java +++ b/client/rest-high-level/src/main/java/org/opensearch/client/RequestConverters.java @@ -439,7 +439,9 @@ static void addSearchRequestParams(Params params, SearchRequest searchRequest) { params.withIndicesOptions(searchRequest.indicesOptions()); } params.withSearchType(searchRequest.searchType().name().toLowerCase(Locale.ROOT)); - if (searchRequest.pointInTimeBuilder() == null) { + if (searchRequest.pointInTimeBuilder() != null) { + params.putParam("ccs_minimize_roundtrips", "false"); + } else { params.putParam("ccs_minimize_roundtrips", Boolean.toString(searchRequest.isCcsMinimizeRoundtrips())); } if (searchRequest.getPreFilterShardSize() != null) { @@ -466,9 +468,8 @@ static Request searchScroll(SearchScrollRequest searchScrollRequest) throws IOEx static Request createPit(CreatePitRequest createPitRequest) throws IOException { Params params = new Params(); - - params.putParam(RestCreatePitAction.ALLOW_PARTIAL_PIT_CREATION, "true"); - params.putParam(RestCreatePitAction.KEEP_ALIVE, "1d"); + params.putParam(RestCreatePitAction.ALLOW_PARTIAL_PIT_CREATION, Boolean.toString(createPitRequest.shouldAllowPartialPitCreation())); + params.putParam(RestCreatePitAction.KEEP_ALIVE, createPitRequest.getKeepAlive()); params.withIndicesOptions(createPitRequest.indicesOptions()); Request request = new Request(HttpPost.METHOD_NAME, endpoint(createPitRequest.indices(), "_search/point_in_time")); request.addParameters(params.asMap()); diff --git a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/InstallPluginCommand.java b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/InstallPluginCommand.java index 86b44799eba68..c2db39ecea072 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/InstallPluginCommand.java +++ b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/InstallPluginCommand.java @@ -374,7 +374,12 @@ private String getOpenSearchUrl( stagingHash ); } else { - baseUrl = String.format(Locale.ROOT, "https://artifacts.opensearch.org/releases/plugins/%s/%s", pluginId, version); + baseUrl = String.format( + Locale.ROOT, + "https://artifacts.opensearch.org/releases/plugins/%s/%s", + pluginId, + Build.CURRENT.getQualifiedVersion() + ); } final String platformUrl = String.format( Locale.ROOT, diff --git a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java index e4f477d78c16b..dc2dc527ae23a 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java @@ -1049,7 +1049,7 @@ public void assertInstallPluginFromUrl( public void testOfficialPlugin() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1093,7 +1093,7 @@ public void testOfficialPluginStaging() throws Exception { public void testOfficialPlatformPlugin() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Platforms.PLATFORM_NAME + "-" @@ -1159,7 +1159,7 @@ public void testMavenChecksumWithoutFilename() throws Exception { public void testOfficialChecksumWithoutFilename() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1184,7 +1184,7 @@ public void testOfficialChecksumWithoutFilename() throws Exception { public void testOfficialShaMissing() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1229,7 +1229,7 @@ public void testMavenShaMissing() throws Exception { public void testInvalidShaFileMissingFilename() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1254,7 +1254,7 @@ public void testInvalidShaFileMissingFilename() throws Exception { public void testInvalidShaFileMismatchFilename() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1279,7 +1279,7 @@ public void testInvalidShaFileMismatchFilename() throws Exception { public void testInvalidShaFileContainingExtraLine() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1304,7 +1304,7 @@ public void testInvalidShaFileContainingExtraLine() throws Exception { public void testSha512Mismatch() throws Exception { String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/analysis-icu-" + Build.CURRENT.getQualifiedVersion() + ".zip"; @@ -1349,7 +1349,7 @@ public void testSha1Mismatch() throws Exception { public void testPublicKeyIdMismatchToExpectedPublicKeyId() throws Exception { final String icu = "analysis-icu"; final String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/" + icu + "-" @@ -1386,7 +1386,7 @@ public void testPublicKeyIdMismatchToExpectedPublicKeyId() throws Exception { public void testFailedSignatureVerification() throws Exception { final String icu = "analysis-icu"; final String url = "https://artifacts.opensearch.org/releases/plugins/analysis-icu/" - + Version.CURRENT + + Build.CURRENT.getQualifiedVersion() + "/" + icu + "-" diff --git a/gradle/missing-javadoc.gradle b/gradle/missing-javadoc.gradle index 05531487f35f3..29fede8967a59 100644 --- a/gradle/missing-javadoc.gradle +++ b/gradle/missing-javadoc.gradle @@ -162,7 +162,6 @@ configure([ project(":qa:os"), project(":qa:wildfly"), project(":rest-api-spec"), - project(":server"), project(":test:external-modules:test-delayed-aggs"), project(":test:fixtures:azure-fixture"), project(":test:fixtures:gcs-fixture"), @@ -177,6 +176,14 @@ configure([ } } +configure(project(":server")) { + project.tasks.withType(MissingJavadocTask) { + isExcluded = true + // TODO: reenable after fixing missing javadocs + javadocMissingLevel = "class" + } +} + class MissingJavadocTask extends DefaultTask { @InputFiles @SkipWhenEmpty @@ -274,6 +281,10 @@ class MissingJavadocTask extends DefaultTask { if (!classpath.isEmpty()) { opts << [ '-classpath', classpath.asPath ] } + + opts << [ '-tag', 'opensearch.experimental:a:WARNING: This API is experimental and might change in incompatible ways in the next release.' ] + opts << [ '-tag', 'opensearch.internal:a:NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.' ] + opts << [ '-doclet', "org.opensearch.missingdoclet.MissingDoclet" ] opts << [ '-docletpath', docletpath.asPath ] opts << [ '--missing-level', javadocMissingLevel ] diff --git a/plugins/analysis-ukrainian/build.gradle b/plugins/analysis-ukrainian/build.gradle index 386452fcf8aeb..6122c055c788e 100644 --- a/plugins/analysis-ukrainian/build.gradle +++ b/plugins/analysis-ukrainian/build.gradle @@ -36,8 +36,8 @@ opensearchplugin { dependencies { api "org.apache.lucene:lucene-analysis-morfologik:${versions.lucene}" - api "org.carrot2:morfologik-stemming:2.1.8" - api "org.carrot2:morfologik-fsa:2.1.8" + api "org.carrot2:morfologik-stemming:2.1.9" + api "org.carrot2:morfologik-fsa:2.1.9" api "ua.net.nlp:morfologik-ukrainian-search:4.9.1" } diff --git a/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.8.jar.sha1 b/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.8.jar.sha1 deleted file mode 100644 index 0b81b8051a3ba..0000000000000 --- a/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -68e23e2c57fe5699d511b3a7a2f202f90020e214 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.9.jar.sha1 b/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.9.jar.sha1 new file mode 100644 index 0000000000000..117ce2e14c3a2 --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/morfologik-fsa-2.1.9.jar.sha1 @@ -0,0 +1 @@ +a12005eacfbbbe256fd4d41f80f6e3675d7e314e \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.8.jar.sha1 b/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.8.jar.sha1 deleted file mode 100644 index 6dfcc82f05b39..0000000000000 --- a/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -409fa92db4cfb0f90a33d303732a4882cee3d1e7 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.9.jar.sha1 b/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.9.jar.sha1 new file mode 100644 index 0000000000000..1e9b11e91ed45 --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/morfologik-stemming-2.1.9.jar.sha1 @@ -0,0 +1 @@ +c3a590409efce30f84154044eaea49a4313535bd \ No newline at end of file diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 231ce40f3f38c..4a81489e96d5e 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -38,19 +38,26 @@ opensearchplugin { } versions << [ - 'tika' : '1.24.1', - 'pdfbox': '2.0.24', - 'poi' : '4.1.2', + 'tika' : '2.4.0', + 'pdfbox': '2.0.25', + 'poi' : '5.2.2', 'mime4j': '0.8.3' ] dependencies { // mandatory for tika api "org.apache.tika:tika-core:${versions.tika}" - // build against Jackson 2.9.5, but still works on our current version api "org.apache.tika:tika-parsers:${versions.tika}" - api 'org.tukaani:xz:1.8' - api 'commons-io:commons-io:2.7' + // Required for the various document parsers + api "org.apache.tika:tika-parsers-standard-package:${versions.tika}" + // Required for language detection + api "org.apache.tika:tika-langdetect-optimaize:${versions.tika}" + // Optimaize libraries/dependencies + runtimeOnly "com.optimaize.languagedetector:language-detector:0.6" + runtimeOnly 'com.google.guava:guava:18.0' + // Other dependencies + api 'org.tukaani:xz:1.9' + api 'commons-io:commons-io:2.11.0' api "org.slf4j:slf4j-api:${versions.slf4j}" // character set detection @@ -70,9 +77,9 @@ dependencies { // OpenOffice api "org.apache.poi:poi-ooxml:${versions.poi}" api "org.apache.poi:poi:${versions.poi}" - api "org.apache.poi:poi-ooxml-schemas:${versions.poi}" + api "org.apache.poi:poi-ooxml-lite:${versions.poi}" api "commons-codec:commons-codec:${versions.commonscodec}" - api 'org.apache.xmlbeans:xmlbeans:3.0.1' + api 'org.apache.xmlbeans:xmlbeans:5.0.3' api 'org.apache.commons:commons-collections4:4.1' // MS Office api "org.apache.poi:poi-scratchpad:${versions.poi}" @@ -82,7 +89,7 @@ dependencies { api "org.apache.james:apache-mime4j-core:${versions.mime4j}" api "org.apache.james:apache-mime4j-dom:${versions.mime4j}" // EPUB books - api 'org.apache.commons:commons-lang3:3.9' + api 'org.apache.commons:commons-lang3:3.12.0' // Microsoft Word files with visio diagrams api 'org.apache.commons:commons-math3:3.6.1' // POIs dependency @@ -97,6 +104,8 @@ restResources { tasks.named("dependencyLicenses").configure { mapping from: /apache-mime4j-.*/, to: 'apache-mime4j' + mapping from: /tika-.*/, to: 'tika-parsers' + mapping from: /poi-ooxml-.*/, to: 'poi-ooxml' } forbiddenPatterns { @@ -109,6 +118,13 @@ forbiddenPatterns { thirdPartyAudit { ignoreMissingClasses() + ignoreViolations( + 'com.google.common.cache.Striped64', + 'com.google.common.cache.Striped64$1', + 'com.google.common.cache.Striped64$Cell', + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator', + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1' + ) } if (BuildParams.inFipsJvm) { diff --git a/plugins/ingest-attachment/licenses/commons-io-2.11.0.jar.sha1 b/plugins/ingest-attachment/licenses/commons-io-2.11.0.jar.sha1 new file mode 100644 index 0000000000000..8adec30bade49 --- /dev/null +++ b/plugins/ingest-attachment/licenses/commons-io-2.11.0.jar.sha1 @@ -0,0 +1 @@ +a2503f302b11ebde7ebc3df41daebe0e4eea3689 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/commons-io-2.7.jar.sha1 b/plugins/ingest-attachment/licenses/commons-io-2.7.jar.sha1 deleted file mode 100644 index bbb1b15dd1e1e..0000000000000 --- a/plugins/ingest-attachment/licenses/commons-io-2.7.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3f2bd4ba11c4162733c13cc90ca7c7ea09967102 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/commons-lang3-3.12.0.jar.sha1 b/plugins/ingest-attachment/licenses/commons-lang3-3.12.0.jar.sha1 new file mode 100644 index 0000000000000..9273d8c01aaba --- /dev/null +++ b/plugins/ingest-attachment/licenses/commons-lang3-3.12.0.jar.sha1 @@ -0,0 +1 @@ +c6842c86792ff03b9f1d1fe2aab8dc23aa6c6f0e \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/commons-lang3-3.9.jar.sha1 b/plugins/ingest-attachment/licenses/commons-lang3-3.9.jar.sha1 deleted file mode 100644 index 2adcfd377f87c..0000000000000 --- a/plugins/ingest-attachment/licenses/commons-lang3-3.9.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0122c7cee69b53ed4a7681c03d4ee4c0e2765da5 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/fontbox-2.0.24.jar.sha1 b/plugins/ingest-attachment/licenses/fontbox-2.0.24.jar.sha1 deleted file mode 100644 index 1f6388867917a..0000000000000 --- a/plugins/ingest-attachment/licenses/fontbox-2.0.24.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -df8ecb3006dfcd52355a5902096e5ec34f06112e \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/fontbox-2.0.25.jar.sha1 b/plugins/ingest-attachment/licenses/fontbox-2.0.25.jar.sha1 new file mode 100644 index 0000000000000..3191976e949f8 --- /dev/null +++ b/plugins/ingest-attachment/licenses/fontbox-2.0.25.jar.sha1 @@ -0,0 +1 @@ +f6644a1eb1d165eded719a88bf7bdcff91740b98 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/guava-18.0.jar.sha1 b/plugins/ingest-attachment/licenses/guava-18.0.jar.sha1 new file mode 100644 index 0000000000000..87f7acb8158ec --- /dev/null +++ b/plugins/ingest-attachment/licenses/guava-18.0.jar.sha1 @@ -0,0 +1 @@ +cce0823396aa693798f8882e64213b1772032b09 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/guava-LICENSE.txt b/plugins/ingest-attachment/licenses/guava-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/plugins/ingest-attachment/licenses/guava-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/ingest-attachment/licenses/guava-NOTICE.txt b/plugins/ingest-attachment/licenses/guava-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/plugins/ingest-attachment/licenses/language-detector-0.6.jar.sha1 b/plugins/ingest-attachment/licenses/language-detector-0.6.jar.sha1 new file mode 100644 index 0000000000000..5c069b9095db6 --- /dev/null +++ b/plugins/ingest-attachment/licenses/language-detector-0.6.jar.sha1 @@ -0,0 +1 @@ +52fee1eaa101f8d3e30b7095e1b6e0054d514dde \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/language-detector-LICENSE.txt b/plugins/ingest-attachment/licenses/language-detector-LICENSE.txt new file mode 100644 index 0000000000000..a62d849a22618 --- /dev/null +++ b/plugins/ingest-attachment/licenses/language-detector-LICENSE.txt @@ -0,0 +1,88 @@ +Apache License, Version 2.0 + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + + To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/ingest-attachment/licenses/language-detector-NOTICE.txt b/plugins/ingest-attachment/licenses/language-detector-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/plugins/ingest-attachment/licenses/pdfbox-2.0.24.jar.sha1 b/plugins/ingest-attachment/licenses/pdfbox-2.0.24.jar.sha1 deleted file mode 100644 index 2eb2e357cbf1c..0000000000000 --- a/plugins/ingest-attachment/licenses/pdfbox-2.0.24.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cb562ee5f43e29415af4477e62fbe668ef88d18b \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/pdfbox-2.0.25.jar.sha1 b/plugins/ingest-attachment/licenses/pdfbox-2.0.25.jar.sha1 new file mode 100644 index 0000000000000..165b3649e80bf --- /dev/null +++ b/plugins/ingest-attachment/licenses/pdfbox-2.0.25.jar.sha1 @@ -0,0 +1 @@ +c18cd03ff3a2dfc3c4a30d3a35173bd2690bcb92 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-4.1.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-4.1.2.jar.sha1 deleted file mode 100644 index dae936314bde1..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-4.1.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -964bf41cf68bce08e4ef6b2279b559fdf8d454f4 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-5.2.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-5.2.2.jar.sha1 new file mode 100644 index 0000000000000..d9f58e72c9200 --- /dev/null +++ b/plugins/ingest-attachment/licenses/poi-5.2.2.jar.sha1 @@ -0,0 +1 @@ +5513d31545085c33809c4b6553c2009fd19a6016 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-4.1.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-ooxml-4.1.2.jar.sha1 deleted file mode 100644 index b42c94ac3b33e..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-ooxml-4.1.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -87d9a22aa9a7dd26e80c360e709f7ee02e32ab3b \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-5.2.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-ooxml-5.2.2.jar.sha1 new file mode 100644 index 0000000000000..7b3abffc1abd5 --- /dev/null +++ b/plugins/ingest-attachment/licenses/poi-ooxml-5.2.2.jar.sha1 @@ -0,0 +1 @@ +a201b5bdc92c0fae4bed4b8e5546388c4c2f9eb0 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-lite-5.2.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-ooxml-lite-5.2.2.jar.sha1 new file mode 100644 index 0000000000000..f5137b1e5223e --- /dev/null +++ b/plugins/ingest-attachment/licenses/poi-ooxml-lite-5.2.2.jar.sha1 @@ -0,0 +1 @@ +5df31b69375131fc2163a5557093cb112be90ce1 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-4.1.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-ooxml-schemas-4.1.2.jar.sha1 deleted file mode 100644 index 852e018a5970d..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-4.1.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -550cc22a598c0b0a51d1f55f8371e83c1229802d \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-LICENSE.txt b/plugins/ingest-attachment/licenses/poi-ooxml-schemas-LICENSE.txt deleted file mode 100644 index dd2cbd5fbc180..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-LICENSE.txt +++ /dev/null @@ -1,463 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -APACHE POI SUBCOMPONENTS: - -Apache POI includes subcomponents with separate copyright notices and -license terms. Your use of these subcomponents is subject to the terms -and conditions of the following licenses: - - -Office Open XML schemas (ooxml-schemas-1.1.jar) - - The Office Open XML schema definitions used by Apache POI are - a part of the Office Open XML ECMA Specification (ECMA-376, [1]). - As defined in section 9.4 of the ECMA bylaws [2], this specification - is available to all interested parties without restriction: - - 9.4 All documents when approved shall be made available to - all interested parties without restriction. - - Furthermore, both Microsoft and Adobe have granted patent licenses - to this work [3,4,5]. - - [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm - [2] http://www.ecma-international.org/memento/Ecmabylaws.htm - [3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx - [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf - [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf - - -JUnit test library (junit-4.11.jar) - - Common Public License - v 1.0 - - THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON - PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION - OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - - 1. DEFINITIONS - - "Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from - and are distributed by that particular Contributor. A Contribution - 'originates' from a Contributor if it was added to the Program by - such Contributor itself or anyone acting on such Contributor's behalf. - Contributions do not include additions to the Program which: (i) are - separate modules of software distributed in conjunction with the - Program under their own license agreement, and (ii) are not derivative - works of the Program. - - "Contributor" means any person or entity that distributes the Program. - - "Licensed Patents " mean patent claims licensable by a Contributor which - are necessarily infringed by the use or sale of its Contribution alone - or when combined with the Program. - - "Program" means the Contributions distributed in accordance with this - Agreement. - - "Recipient" means anyone who receives the Program under this Agreement, - including all Contributors. - - 2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license - to reproduce, prepare derivative works of, publicly display, publicly - perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and - otherwise transfer the Contribution of such Contributor, if any, in - source code and object code form. This patent license shall apply to - the combination of the Contribution and the Program if, at the time - the Contribution is added by the Contributor, such addition of the - Contribution causes such combination to be covered by the Licensed - Patents. The patent license shall not apply to any other combinations - which include the Contribution. No hardware per se is licensed - hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. - Each Contributor disclaims any liability to Recipient for claims - brought by any other entity based on infringement of intellectual - property rights or otherwise. As a condition to exercising the rights - and licenses granted hereunder, each Recipient hereby assumes sole - responsibility to secure any other intellectual property rights - needed, if any. For example, if a third party patent license is - required to allow Recipient to distribute the Program, it is - Recipient's responsibility to acquire that license before - distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - - 3. REQUIREMENTS - - A Contributor may choose to distribute the Program in object code form - under its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties - and conditions, express and implied, including warranties or - conditions of title and non-infringement, and implied warranties - or conditions of merchantability and fitness for a particular - purpose; - - ii) effectively excludes on behalf of all Contributors all liability - for damages, including direct, indirect, special, incidental and - consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are - offered by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - - When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of - the Program. - - Contributors may not remove or alter any copyright notices contained - within the Program. - - Each Contributor must identify itself as the originator of its - Contribution, if any, in a manner that reasonably allows subsequent - Recipients to identify the originator of the Contribution. - - 4. COMMERCIAL DISTRIBUTION - - Commercial distributors of software may accept certain responsibilities - with respect to end users, business partners and the like. While this - license is intended to facilitate the commercial use of the Program, - the Contributor who includes the Program in a commercial product offering - should do so in a manner which does not create potential liability for - other Contributors. Therefore, if a Contributor includes the Program - in a commercial product offering, such Contributor ("Commercial - Contributor") hereby agrees to defend and indemnify every other - Contributor ("Indemnified Contributor") against any losses, damages - and costs (collectively "Losses") arising from claims, lawsuits and - other legal actions brought by a third party against the Indemnified - Contributor to the extent caused by the acts or omissions of such - Commercial Contributor in connection with its distribution of the - Program in a commercial product offering. The obligations in this - section do not apply to any claims or Losses relating to any actual - or alleged intellectual property infringement. In order to qualify, - an Indemnified Contributor must: a) promptly notify the Commercial - Contributor in writing of such claim, and b) allow the Commercial - Contributor to control, and cooperate with the Commercial Contributor - in, the defense and any related settlement negotiations. The Indemnified - Contributor may participate in any such claim at its own expense. - - For example, a Contributor might include the Program in a commercial - product offering, Product X. That Contributor is then a Commercial - Contributor. If that Commercial Contributor then makes performance - claims, or offers warranties related to Product X, those performance - claims and warranties are such Commercial Contributor's responsibility - alone. Under this section, the Commercial Contributor would have to - defend claims against the other Contributors related to those - performance claims and warranties, and if a court requires any other - Contributor to pay any damages as a result, the Commercial Contributor - must pay those damages. - - 5. NO WARRANTY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED - ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER - EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR - CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR - A PARTICULAR PURPOSE. Each Recipient is solely responsible for - determining the appropriateness of using and distributing the Program - and assumes all risks associated with its exercise of rights under this - Agreement, including but not limited to the risks and costs of program - errors, compliance with applicable laws, damage to or loss of data, - programs or equipment, and unavailability or interruption of operations. - - 6. DISCLAIMER OF LIABILITY - - EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR - ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING - WITHOUT LIMITATION LOST PROFITS), 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 OR - DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED - HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 7. GENERAL - - If any provision of this Agreement is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this Agreement, and without further - action by the parties hereto, such provision shall be reformed to the - minimum extent necessary to make such provision valid and enforceable. - - If Recipient institutes patent litigation against a Contributor with - respect to a patent applicable to software (including a cross-claim or - counterclaim in a lawsuit), then any patent licenses granted by that - Contributor to such Recipient under this Agreement shall terminate as of - the date such litigation is filed. In addition, if Recipient institutes - patent litigation against any entity (including a cross-claim or - counterclaim in a lawsuit) alleging that the Program itself (excluding - combinations of the Program with other software or hardware) infringes - such Recipient's patent(s), then such Recipient's rights granted under - Section 2(b) shall terminate as of the date such litigation is filed. - - All Recipient's rights under this Agreement shall terminate if it fails - to comply with any of the material terms or conditions of this Agreement - and does not cure such failure in a reasonable period of time after - becoming aware of such noncompliance. If all Recipient's rights under - this Agreement terminate, Recipient agrees to cease use and distribution - of the Program as soon as reasonably practicable. However, Recipient's - obligations under this Agreement and any licenses granted by Recipient - relating to the Program shall continue and survive. - - Everyone is permitted to copy and distribute copies of this Agreement, - but in order to avoid inconsistency the Agreement is copyrighted and may - only be modified in the following manner. The Agreement Steward reserves - the right to publish new versions (including revisions) of this Agreement - from time to time. No one other than the Agreement Steward has the right - to modify this Agreement. IBM is the initial Agreement Steward. IBM may - assign the responsibility to serve as the Agreement Steward to a suitable - separate entity. Each new version of the Agreement will be given a - distinguishing version number. The Program (including Contributions) may - always be distributed subject to the version of the Agreement under which - it was received. In addition, after a new version of the Agreement is - published, Contributor may elect to distribute the Program (including - its Contributions) under the new version. Except as expressly stated in - Sections 2(a) and 2(b) above, Recipient receives no rights or licenses - to the intellectual property of any Contributor under this Agreement, - whether expressly, by implication, estoppel or otherwise. All rights in - the Program not expressly granted under this Agreement are reserved. - - This Agreement is governed by the laws of the State of New York and the - intellectual property laws of the United States of America. No party to - this Agreement will bring a legal action under this Agreement more than - one year after the cause of action arose. Each party waives its rights - to a jury trial in any resulting litigation. diff --git a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-NOTICE.txt b/plugins/ingest-attachment/licenses/poi-ooxml-schemas-NOTICE.txt deleted file mode 100644 index 12ff265290de1..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-ooxml-schemas-NOTICE.txt +++ /dev/null @@ -1,23 +0,0 @@ -Apache POI -Copyright 2003-2015 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product contains parts that were originally based on software from BEA. -Copyright (c) 2000-2003, BEA Systems, . - -This product contains W3C XML Schema documents. Copyright 2001-2003 (c) -World Wide Web Consortium (Massachusetts Institute of Technology, European -Research Consortium for Informatics and Mathematics, Keio University) - -This product contains the Piccolo XML Parser for Java -(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren. - -This product contains the chunks_parse_cmds.tbl file from the vsdump program. -Copyright (C) 2006-2007 Valek Filippov (frob@df.ru) - -This product contains parts of the eID Applet project -(http://eid-applet.googlecode.com). Copyright (c) 2009-2014 -FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be), -Bart Hanssens from FedICT diff --git a/plugins/ingest-attachment/licenses/poi-scratchpad-4.1.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-scratchpad-4.1.2.jar.sha1 deleted file mode 100644 index ed3d36c955a9e..0000000000000 --- a/plugins/ingest-attachment/licenses/poi-scratchpad-4.1.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1be379e91d3d3fb0cd11425451acdbfb0d2264e7 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/poi-scratchpad-5.2.2.jar.sha1 b/plugins/ingest-attachment/licenses/poi-scratchpad-5.2.2.jar.sha1 new file mode 100644 index 0000000000000..568dde5125c3f --- /dev/null +++ b/plugins/ingest-attachment/licenses/poi-scratchpad-5.2.2.jar.sha1 @@ -0,0 +1 @@ +8c5cd5f1b3e7b3656ab983b73bbbf8bf5f14f793 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/tika-core-1.24.1.jar.sha1 b/plugins/ingest-attachment/licenses/tika-core-1.24.1.jar.sha1 deleted file mode 100644 index ba4f64ff8f078..0000000000000 --- a/plugins/ingest-attachment/licenses/tika-core-1.24.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -703e65fb300d1425d4ad7b68c21c7795bb7a95c3 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/tika-core-2.4.0.jar.sha1 b/plugins/ingest-attachment/licenses/tika-core-2.4.0.jar.sha1 new file mode 100644 index 0000000000000..373b7ec63138a --- /dev/null +++ b/plugins/ingest-attachment/licenses/tika-core-2.4.0.jar.sha1 @@ -0,0 +1 @@ +97b2454943127857a8304319be658d6d7ff4fff1 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/tika-core-LICENSE.txt b/plugins/ingest-attachment/licenses/tika-core-LICENSE.txt deleted file mode 100644 index 9537d733ea9bf..0000000000000 --- a/plugins/ingest-attachment/licenses/tika-core-LICENSE.txt +++ /dev/null @@ -1,372 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -APACHE TIKA SUBCOMPONENTS - -Apache Tika includes a number of subcomponents with separate copyright notices -and license terms. Your use of these subcomponents is subject to the terms and -conditions of the following licenses. - -MIME type information from file-4.26.tar.gz (http://www.darwinsys.com/file/) - - Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. - Software written by Ian F. Darwin and others; - maintained 1994- Christos Zoulas. - - This software is not subject to any export provision of the United States - Department of Commerce, and may be exported to any country or planet. - - 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 immediately at the beginning of the file, without modification, - 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 AUTHOR 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 AUTHOR 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. - -Charset detection code from ICU4J (http://site.icu-project.org/) - - Copyright (c) 1995-2009 International Business Machines Corporation - and others - - All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, provided that the above - copyright notice(s) and this permission notice appear in all copies - of the Software and that both the above copyright notice(s) and this - permission notice appear in supporting documentation. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE - BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, - OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - SOFTWARE. - - Except as contained in this notice, the name of a copyright holder shall - not be used in advertising or otherwise to promote the sale, use or other - dealings in this Software without prior written authorization of the - copyright holder. - - -Parsing functionality provided by the NetCDF Java Library (http://www.unidata.ucar.edu/software/netcdf-java/) - - Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata - - Portions of this software were developed by the Unidata Program at the University - Corporation for Atmospheric Research. - - Access and use of this software shall impose the following obligations and understandings - on the user. The user is granted the right, without any fee or cost, to use, copy, modify, - alter, enhance and distribute this software, and any derivative works thereof, and its - supporting documentation for any purpose whatsoever, provided that this entire notice - appears in all copies of the software, derivative works and supporting documentation. Further, - UCAR requests that the user credit UCAR/Unidata in any publications that result from the use - of this software or in any product that includes this software, although this is not an obligation. - The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse - or promote any products or commercial entity unless specific written permission is obtained from - UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with - any support, consulting, training or assistance of any kind with regard to the use, operation and - performance of this software nor to provide the user with any updates, revisions, new versions or - "bug fixes." - - THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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 UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, - USE OR PERFORMANCE OF THIS SOFTWARE. - - -IPTC Photo Metadata descriptions are taken from the IPTC Photo Metadata -Standard, July 2010, Copyright 2010 International Press Telecommunications -Council. - - 1. The Specifications and Materials are licensed for use only on the condition that you agree to be bound by the terms of this license. Subject to this and other licensing requirements contained herein, you may, on a non-exclusive basis, use the Specifications and Materials. - 2. The IPTC openly provides the Specifications and Materials for voluntary use by individuals, partnerships, companies, corporations, organizations and any other entity for use at the entity's own risk. This disclaimer, license and release is intended to apply to the IPTC, its officers, directors, agents, representatives, members, contributors, affiliates, contractors, or co-venturers acting jointly or severally. - 3. The Document and translations thereof may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the copyright and license notices and references to the IPTC appearing in the Document and the terms of this Specifications License Agreement are included on all such copies and derivative works. Further, upon the receipt of written permission from the IPTC, the Document may be modified for the purpose of developing applications that use IPTC Specifications or as required to translate the Document into languages other than English. - 4. Any use, duplication, distribution, or exploitation of the Document and Specifications and Materials in any manner is at your own risk. - 5. NO WARRANTY, EXPRESSED OR IMPLIED, IS MADE REGARDING THE ACCURACY, ADEQUACY, COMPLETENESS, LEGALITY, RELIABILITY OR USEFULNESS OF ANY INFORMATION CONTAINED IN THE DOCUMENT OR IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE PRODUCED OR SPONSORED BY THE IPTC. THE DOCUMENT AND THE INFORMATION CONTAINED HEREIN AND INCLUDED IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE OF THE IPTC IS PROVIDED ON AN "AS IS" BASIS. THE IPTC DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY ACTUAL OR ASSERTED WARRANTY OF NON-INFRINGEMENT OF PROPRIETARY RIGHTS, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. NEITHER THE IPTC NOR ITS CONTRIBUTORS SHALL BE HELD LIABLE FOR ANY IMPROPER OR INCORRECT USE OF INFORMATION. NEITHER THE IPTC NOR ITS CONTRIBUTORS ASSUME ANY RESPONSIBILITY FOR ANYONE'S USE OF INFORMATION PROVIDED BY THE IPTC. IN NO EVENT SHALL THE IPTC OR ITS CONTRIBUTORS BE LIABLE TO ANYONE FOR DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, COMPENSATORY DAMAGES, LOST PROFITS, LOST DATA OR ANY FORM OF SPECIAL, INCIDENTAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES OF ANY KIND WHETHER BASED ON BREACH OF CONTRACT OR WARRANTY, TORT, PRODUCT LIABILITY OR OTHERWISE. - 6. The IPTC takes no position regarding the validity or scope of any Intellectual Property or other rights that might be claimed to pertain to the implementation or use of the technology described in the Document or the extent to which any license under such rights might or might not be available. The IPTC does not represent that it has made any effort to identify any such rights. Copies of claims of rights made available for publication, assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of the Specifications and Materials, can be obtained from the Managing Director of the IPTC. - 7. By using the Specifications and Materials including the Document in any manner or for any purpose, you release the IPTC from all liabilities, claims, causes of action, allegations, losses, injuries, damages, or detriments of any nature arising from or relating to the use of the Specifications, Materials or any portion thereof. You further agree not to file a lawsuit, make a claim, or take any other formal or informal legal action against the IPTC, resulting from your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof. Finally, you hereby agree that the IPTC is not liable for any direct, indirect, special or consequential damages arising from or relating to your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof. - 8. Specifications and Materials may be downloaded or copied provided that ALL copies retain the ownership, copyright and license notices. - 9. Materials may not be edited, modified, or presented in a context that creates a misleading or false impression or statement as to the positions, actions, or statements of the IPTC. - 10. The name and trademarks of the IPTC may not be used in advertising, publicity, or in relation to products or services and their names without the specific, written prior permission of the IPTC. Any permitted use of the trademarks of the IPTC, whether registered or not, shall be accompanied by an appropriate mark and attribution, as agreed with the IPTC. - 11. Specifications may be extended by both members and non-members to provide additional functionality (Extension Specifications) provided that there is a clear recognition of the IPTC IP and its ownership in the Extension Specifications and the related documentation and provided that the extensions are clearly identified and provided that a perpetual license is granted by the creator of the Extension Specifications for other members and non-members to use the Extension Specifications and to continue extensions of the Extension Specifications. The IPTC does not waive any of its rights in the Specifications and Materials in this context. The Extension Specifications may be considered the intellectual property of their creator. The IPTC expressly disclaims any responsibility for damage caused by an extension to the Specifications. - 12. Specifications and Materials may be included in derivative work of both members and non-members provided that there is a clear recognition of the IPTC IP and its ownership in the derivative work and its related documentation. The IPTC does not waive any of its rights in the Specifications and Materials in this context. Derivative work in its entirety may be considered the intellectual property of the creator of the work .The IPTC expressly disclaims any responsibility for damage caused when its IP is used in a derivative context. - 13. This Specifications License Agreement is perpetual subject to your conformance to the terms of this Agreement. The IPTC may terminate this Specifications License Agreement immediately upon your breach of this Agreement and, upon such termination you will cease all use, duplication, distribution, and/or exploitation in any manner of the Specifications and Materials. - 14. This Specifications License Agreement reflects the entire agreement of the parties regarding the subject matter hereof and supersedes all prior agreements or representations regarding such matters, whether written or oral. To the extent any portion or provision of this Specifications License Agreement is found to be illegal or unenforceable, then the remaining provisions of this Specifications License Agreement will remain in full force and effect and the illegal or unenforceable provision will be construed to give it such effect as it may properly have that is consistent with the intentions of the parties. - 15. This Specifications License Agreement may only be modified in writing signed by an authorized representative of the IPTC. - 16. This Specifications License Agreement is governed by the law of United Kingdom, as such law is applied to contracts made and fully performed in the United Kingdom. Any disputes arising from or relating to this Specifications License Agreement will be resolved in the courts of the United Kingdom. You consent to the jurisdiction of such courts over you and covenant not to assert before such courts any objection to proceeding in such forums. - - -JUnRAR (https://github.com/edmund-wagner/junrar/) - - JUnRAR is based on the UnRAR tool, and covered by the same license - It was formerly available from http://java-unrar.svn.sourceforge.net/ - - ****** ***** ****** UnRAR - free utility for RAR archives - ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ****** ******* ****** License for use and distribution of - ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ** ** ** ** ** ** FREE portable version - ~~~~~~~~~~~~~~~~~~~~~ - - The source code of UnRAR utility is freeware. This means: - - 1. All copyrights to RAR and the utility UnRAR are exclusively - owned by the author - Alexander Roshal. - - 2. The UnRAR sources may be used in any software to handle RAR - archives without limitations free of charge, but cannot be used - to re-create the RAR compression algorithm, which is proprietary. - Distribution of modified UnRAR sources in separate form or as a - part of other software is permitted, provided that it is clearly - stated in the documentation and source comments that the code may - not be used to develop a RAR (WinRAR) compatible archiver. - - 3. The UnRAR utility may be freely distributed. It is allowed - to distribute UnRAR inside of other software packages. - - 4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS". - NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT - YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, - DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING - OR MISUSING THIS SOFTWARE. - - 5. Installing and using the UnRAR utility signifies acceptance of - these terms and conditions of the license. - - 6. If you don't agree with terms of the license you must remove - UnRAR files from your storage devices and cease to use the - utility. - - Thank you for your interest in RAR and UnRAR. Alexander L. Roshal - -Sqlite (bundled in org.xerial's sqlite-jdbc) - This product bundles Sqlite, which is in the Public Domain. For details - see: https://www.sqlite.org/copyright.html diff --git a/plugins/ingest-attachment/licenses/tika-core-NOTICE.txt b/plugins/ingest-attachment/licenses/tika-core-NOTICE.txt deleted file mode 100644 index 8e94f644b8112..0000000000000 --- a/plugins/ingest-attachment/licenses/tika-core-NOTICE.txt +++ /dev/null @@ -1,17 +0,0 @@ -Apache Tika -Copyright 2015 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata -This software contains code derived from UCAR/Unidata's NetCDF library. - -Tika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and -Grizzly (http://grizzly.java.net/) - -Tika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight) - -OpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0 - -IPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council. diff --git a/plugins/ingest-attachment/licenses/tika-langdetect-optimaize-2.4.0.jar.sha1 b/plugins/ingest-attachment/licenses/tika-langdetect-optimaize-2.4.0.jar.sha1 new file mode 100644 index 0000000000000..cf724f4ee1de4 --- /dev/null +++ b/plugins/ingest-attachment/licenses/tika-langdetect-optimaize-2.4.0.jar.sha1 @@ -0,0 +1 @@ +57901d6088b0e34999e25af6b363ccec959b5e61 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/tika-parsers-1.24.1.jar.sha1 b/plugins/ingest-attachment/licenses/tika-parsers-1.24.1.jar.sha1 deleted file mode 100644 index 6ad33ac8eca37..0000000000000 --- a/plugins/ingest-attachment/licenses/tika-parsers-1.24.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -02ce8d709cef4ed6a1a51ff14ba15b2ba2e76f09 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/tika-parsers-standard-package-2.4.0.jar.sha1 b/plugins/ingest-attachment/licenses/tika-parsers-standard-package-2.4.0.jar.sha1 new file mode 100644 index 0000000000000..ec03a055a6f6d --- /dev/null +++ b/plugins/ingest-attachment/licenses/tika-parsers-standard-package-2.4.0.jar.sha1 @@ -0,0 +1 @@ +83522360364a93e819eaec74f393bc56ed1d466a \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/xmlbeans-3.0.1.jar.sha1 b/plugins/ingest-attachment/licenses/xmlbeans-3.0.1.jar.sha1 deleted file mode 100644 index e1c74c67f214d..0000000000000 --- a/plugins/ingest-attachment/licenses/xmlbeans-3.0.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -50d94da791ab1e799a11d6f82410fd7d49f402ca \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/xmlbeans-5.0.3.jar.sha1 b/plugins/ingest-attachment/licenses/xmlbeans-5.0.3.jar.sha1 new file mode 100644 index 0000000000000..7451ee17640d6 --- /dev/null +++ b/plugins/ingest-attachment/licenses/xmlbeans-5.0.3.jar.sha1 @@ -0,0 +1 @@ +e1ef1382ae9dfb2438b82b6dd575566355c2f30f \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/xz-1.8.jar.sha1 b/plugins/ingest-attachment/licenses/xz-1.8.jar.sha1 deleted file mode 100644 index 7455feac7983b..0000000000000 --- a/plugins/ingest-attachment/licenses/xz-1.8.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c4f7d054303948eb6a4066194253886c8af07128 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/xz-1.9.jar.sha1 b/plugins/ingest-attachment/licenses/xz-1.9.jar.sha1 new file mode 100644 index 0000000000000..c3e22d167212f --- /dev/null +++ b/plugins/ingest-attachment/licenses/xz-1.9.jar.sha1 @@ -0,0 +1 @@ +1ea4bec1a921180164852c65006d928617bd2caf \ No newline at end of file diff --git a/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/AttachmentProcessor.java b/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/AttachmentProcessor.java index 0eb864a2d9ac0..b8e8300755686 100644 --- a/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/AttachmentProcessor.java +++ b/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/AttachmentProcessor.java @@ -33,7 +33,8 @@ package org.opensearch.ingest.attachment; import org.apache.tika.exception.ZeroByteFileException; -import org.apache.tika.language.LanguageIdentifier; +import org.apache.tika.langdetect.optimaize.OptimaizeLangDetector; +import org.apache.tika.language.detect.LanguageResult; import org.apache.tika.metadata.Metadata; import org.apache.tika.metadata.TikaCoreProperties; @@ -134,9 +135,10 @@ public IngestDocument execute(IngestDocument ingestDocument) { } if (properties.contains(Property.LANGUAGE) && Strings.hasLength(parsedContent)) { - // TODO: stop using LanguageIdentifier... - LanguageIdentifier identifier = new LanguageIdentifier(parsedContent); - String language = identifier.getLanguage(); + OptimaizeLangDetector langDetector = new OptimaizeLangDetector(); + langDetector.loadModels(); + LanguageResult result = langDetector.detect(parsedContent); + String language = result.getLanguage(); additionalFields.put(Property.LANGUAGE.toLowerCase(), language); } @@ -158,6 +160,12 @@ public IngestDocument execute(IngestDocument ingestDocument) { String author = metadata.get("Author"); if (Strings.hasLength(author)) { additionalFields.put(Property.AUTHOR.toLowerCase(), author); + } else { + // The MSOffice parser has deprecated "Author" in favor of "Creator" + author = metadata.get(TikaCoreProperties.CREATOR); + if (Strings.hasLength(author)) { + additionalFields.put(Property.AUTHOR.toLowerCase(), author); + } } } @@ -165,6 +173,12 @@ public IngestDocument execute(IngestDocument ingestDocument) { String keywords = metadata.get("Keywords"); if (Strings.hasLength(keywords)) { additionalFields.put(Property.KEYWORDS.toLowerCase(), keywords); + } else { + // Fallback - EPUBs put their keywords as multiple subject fields by convention + keywords = metadata.get(TikaCoreProperties.SUBJECT); + if (Strings.hasLength(keywords)) { + additionalFields.put(Property.KEYWORDS.toLowerCase(), keywords); + } } } diff --git a/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/TikaImpl.java b/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/TikaImpl.java index aad490924d311..ce7ceb5e3d776 100644 --- a/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/TikaImpl.java +++ b/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/TikaImpl.java @@ -92,9 +92,9 @@ final class TikaImpl { private static final Parser PARSERS[] = new Parser[] { // documents new org.apache.tika.parser.html.HtmlParser(), - new org.apache.tika.parser.rtf.RTFParser(), new org.apache.tika.parser.pdf.PDFParser(), new org.apache.tika.parser.txt.TXTParser(), + new org.apache.tika.parser.microsoft.rtf.RTFParser(), new org.apache.tika.parser.microsoft.OfficeParser(), new org.apache.tika.parser.microsoft.OldExcelParser(), ParserDecorator.withoutTypes(new org.apache.tika.parser.microsoft.ooxml.OOXMLParser(), EXCLUDES), diff --git a/plugins/ingest-attachment/src/test/java/org/opensearch/ingest/attachment/AttachmentProcessorTests.java b/plugins/ingest-attachment/src/test/java/org/opensearch/ingest/attachment/AttachmentProcessorTests.java index e9c87ae3a6109..2fd29d5bfdeae 100644 --- a/plugins/ingest-attachment/src/test/java/org/opensearch/ingest/attachment/AttachmentProcessorTests.java +++ b/plugins/ingest-attachment/src/test/java/org/opensearch/ingest/attachment/AttachmentProcessorTests.java @@ -138,8 +138,8 @@ public void testUnknownLanguageDocument() throws Exception { Map attachmentData = parseDocument("text-gibberish.txt", processor); assertThat(attachmentData.keySet(), hasItem("language")); - // lt seems some standard for not detected - assertThat(attachmentData.get("language"), is("lt")); + // Note - this output is non-deterministic across library versions + assertThat(attachmentData.get("language"), is("sl")); } public void testEmptyTextDocument() throws Exception { @@ -378,8 +378,9 @@ public void testIndexedChars() throws Exception { attachmentData = parseDocument("text-in-english.txt", processor, Collections.singletonMap("max_length", 10)); + // Language detection is not accurate when the text to analyze is short assertThat(attachmentData.keySet(), containsInAnyOrder("language", "content", "content_type", "content_length")); - assertThat(attachmentData.get("language"), is("sk")); + assertThat(attachmentData.get("language"), not(is("en"))); assertThat(attachmentData.get("content"), is("\"God Save")); assertThat(attachmentData.get("content_type").toString(), containsString("text/plain")); assertThat(attachmentData.get("content_length"), is(10L)); diff --git a/plugins/ingest-attachment/src/yamlRestTest/resources/rest-api-spec/test/ingest_attachment/30_files_supported.yml b/plugins/ingest-attachment/src/yamlRestTest/resources/rest-api-spec/test/ingest_attachment/30_files_supported.yml index 7407c2a9326f6..58833b037b8cc 100644 --- a/plugins/ingest-attachment/src/yamlRestTest/resources/rest-api-spec/test/ingest_attachment/30_files_supported.yml +++ b/plugins/ingest-attachment/src/yamlRestTest/resources/rest-api-spec/test/ingest_attachment/30_files_supported.yml @@ -29,7 +29,7 @@ id: 1 - length: { _source.attachment: 6 } - match: { _source.attachment.content: "Test opensearch" } - - match: { _source.attachment.language: "pl" } + - match: { _source.attachment.language: "en" } - match: { _source.attachment.author: "OpenSearch" } - match: { _source.attachment.date: "2021-03-27T04:12:00Z" } - match: { _source.attachment.content_length: 16 } @@ -67,7 +67,7 @@ id: 1 - length: { _source.attachment: 6 } - match: { _source.attachment.content: "Test opensearch" } - - match: { _source.attachment.language: "pl" } + - match: { _source.attachment.language: "en" } - match: { _source.attachment.author: "OpenSearch" } - match: { _source.attachment.date: "2021-03-27T04:12:00Z" } - match: { _source.attachment.content_length: 16 } diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index d5bbd23325cd0..fc5ac0d0aafc0 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -54,10 +54,10 @@ dependencies { api "io.netty:netty-resolver-dns:${versions.netty}" api "io.netty:netty-transport-native-unix-common:${versions.netty}" implementation project(':modules:transport-netty4') - api 'com.azure:azure-storage-blob:12.15.0' + api 'com.azure:azure-storage-blob:12.16.0' api 'org.reactivestreams:reactive-streams:1.0.3' api 'io.projectreactor:reactor-core:3.4.17' - api 'io.projectreactor.netty:reactor-netty:1.0.17' + api 'io.projectreactor.netty:reactor-netty:1.0.18' api 'io.projectreactor.netty:reactor-netty-core:1.0.16' api 'io.projectreactor.netty:reactor-netty-http:1.0.18' api "org.slf4j:slf4j-api:${versions.slf4j}" diff --git a/plugins/repository-azure/licenses/azure-storage-blob-12.15.0.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-blob-12.15.0.jar.sha1 deleted file mode 100644 index 513cb017f798d..0000000000000 --- a/plugins/repository-azure/licenses/azure-storage-blob-12.15.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a53a6bdf7564f4e3a7b0b93cd96b7f5f95c03d36 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/azure-storage-blob-12.16.0.jar.sha1 b/plugins/repository-azure/licenses/azure-storage-blob-12.16.0.jar.sha1 new file mode 100644 index 0000000000000..349d190bbbac3 --- /dev/null +++ b/plugins/repository-azure/licenses/azure-storage-blob-12.16.0.jar.sha1 @@ -0,0 +1 @@ +74b92065815f7affb0cd7897b683369b9ed982fd \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-1.0.17.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-1.0.17.jar.sha1 deleted file mode 100644 index a1f6aa3686692..0000000000000 --- a/plugins/repository-azure/licenses/reactor-netty-1.0.17.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7720beb4f58a4379e6294d62766d2e9e1bfaf646 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-1.0.18.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-1.0.18.jar.sha1 new file mode 100644 index 0000000000000..74e672b1d52c4 --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-netty-1.0.18.jar.sha1 @@ -0,0 +1 @@ +8900bb8dcfc69f91f7c8f91a4b2a3ad9b56830d0 \ No newline at end of file diff --git a/plugins/repository-gcs/build.gradle b/plugins/repository-gcs/build.gradle index 241cd70eba071..eb770d4ea00e5 100644 --- a/plugins/repository-gcs/build.gradle +++ b/plugins/repository-gcs/build.gradle @@ -70,11 +70,11 @@ dependencies { api 'com.google.auth:google-auth-library-credentials:0.20.0' api 'com.google.auth:google-auth-library-oauth2-http:0.20.0' api 'com.google.oauth-client:google-oauth-client:1.33.1' - api 'com.google.api-client:google-api-client:1.30.10' - api 'com.google.http-client:google-http-client-appengine:1.35.0' + api 'com.google.api-client:google-api-client:1.34.0' + api 'com.google.http-client:google-http-client-appengine:1.41.8' api 'com.google.http-client:google-http-client-jackson2:1.35.0' api 'com.google.http-client:google-http-client-gson:1.41.4' - api 'com.google.api:gax-httpjson:0.62.0' + api 'com.google.api:gax-httpjson:0.101.0' api 'io.grpc:grpc-context:1.45.1' api 'io.opencensus:opencensus-api:0.18.0' api 'io.opencensus:opencensus-contrib-http-util:0.18.0' @@ -126,6 +126,7 @@ thirdPartyAudit { ) ignoreMissingClasses( + 'com.google.api.client.http.apache.v2.ApacheHttpTransport', 'com.google.appengine.api.datastore.Blob', 'com.google.appengine.api.datastore.DatastoreService', 'com.google.appengine.api.datastore.DatastoreServiceFactory', @@ -145,6 +146,10 @@ thirdPartyAudit { 'com.google.appengine.api.urlfetch.HTTPResponse', 'com.google.appengine.api.urlfetch.URLFetchService', 'com.google.appengine.api.urlfetch.URLFetchServiceFactory', + 'com.google.api.gax.rpc.ApiCallContext$Key', + 'com.google.api.gax.rpc.internal.ApiCallContextOptions', + 'com.google.api.gax.rpc.mtls.MtlsProvider', + 'com.google.api.gax.tracing.BaseApiTracer', // commons-logging optional dependencies 'org.apache.avalon.framework.logger.Logger', 'org.apache.log.Hierarchy', @@ -168,6 +173,8 @@ thirdPartyAudit { 'org.apache.http.client.UserTokenHandler', 'org.apache.http.client.methods.HttpEntityEnclosingRequestBase', 'org.apache.http.client.methods.HttpRequestBase', + 'org.apache.http.config.Registry', + 'org.apache.http.config.RegistryBuilder', 'org.apache.http.config.SocketConfig', 'org.apache.http.config.SocketConfig$Builder', 'org.apache.http.conn.ClientConnectionManager', @@ -177,6 +184,7 @@ thirdPartyAudit { 'org.apache.http.conn.routing.HttpRoutePlanner', 'org.apache.http.conn.scheme.PlainSocketFactory', 'org.apache.http.conn.scheme.SchemeRegistry', + 'org.apache.http.conn.socket.PlainConnectionSocketFactory', 'org.apache.http.conn.ssl.SSLSocketFactory', 'org.apache.http.conn.ssl.X509HostnameVerifier', 'org.apache.http.entity.AbstractHttpEntity', diff --git a/plugins/repository-gcs/licenses/gax-httpjson-0.101.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-httpjson-0.101.0.jar.sha1 new file mode 100644 index 0000000000000..f722ccbd86c54 --- /dev/null +++ b/plugins/repository-gcs/licenses/gax-httpjson-0.101.0.jar.sha1 @@ -0,0 +1 @@ +e056920e5df4086270e6c3d2e3a16d8a7585fd13 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 b/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 deleted file mode 100644 index 161ca85ccfc0c..0000000000000 --- a/plugins/repository-gcs/licenses/gax-httpjson-0.62.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -05a1a4736acd1c4f30304be953532be6aecdc2c9 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 b/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 deleted file mode 100644 index 62c51887ee1ea..0000000000000 --- a/plugins/repository-gcs/licenses/google-api-client-1.30.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2de98417199785982e1f037fb8b52613f57175ae \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-api-client-1.34.0.jar.sha1 b/plugins/repository-gcs/licenses/google-api-client-1.34.0.jar.sha1 new file mode 100644 index 0000000000000..9be9480435085 --- /dev/null +++ b/plugins/repository-gcs/licenses/google-api-client-1.34.0.jar.sha1 @@ -0,0 +1 @@ +af2586412cabeee49c9db6d736e75b745bc467f8 \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 deleted file mode 100644 index 8bf444887d30f..0000000000000 --- a/plugins/repository-gcs/licenses/google-http-client-appengine-1.35.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -394d1e1376538931ec3d4eeed654f9da911b95eb \ No newline at end of file diff --git a/plugins/repository-gcs/licenses/google-http-client-appengine-1.41.8.jar.sha1 b/plugins/repository-gcs/licenses/google-http-client-appengine-1.41.8.jar.sha1 new file mode 100644 index 0000000000000..052fdd3df85be --- /dev/null +++ b/plugins/repository-gcs/licenses/google-http-client-appengine-1.41.8.jar.sha1 @@ -0,0 +1 @@ +785f175ead3ccee43ded9ad0d7c0dbe4606d3230 \ No newline at end of file diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index 0a1e0bde3af2f..81c160881790b 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -69,7 +69,7 @@ dependencies { runtimeOnly 'com.google.guava:guava:31.1-jre' api 'com.google.protobuf:protobuf-java:3.20.1' api "commons-logging:commons-logging:${versions.commonslogging}" - api 'commons-cli:commons-cli:1.2' + api 'commons-cli:commons-cli:1.5.0' api "commons-codec:commons-codec:${versions.commonscodec}" api 'commons-collections:commons-collections:3.2.2' api 'org.apache.commons:commons-compress:1.21' @@ -81,7 +81,7 @@ dependencies { api "org.slf4j:slf4j-api:${versions.slf4j}" api "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" api 'net.minidev:json-smart:2.4.8' - api 'org.apache.zookeeper:zookeeper:3.7.0' + api 'org.apache.zookeeper:zookeeper:3.8.0' api "io.netty:netty-all:${versions.netty}" implementation 'com.fasterxml.woodstox:woodstox-core:6.2.8' implementation 'org.codehaus.woodstox:stax2-api:4.2.1' diff --git a/plugins/repository-hdfs/licenses/commons-cli-1.2.jar.sha1 b/plugins/repository-hdfs/licenses/commons-cli-1.2.jar.sha1 deleted file mode 100644 index d38d00127e8cd..0000000000000 --- a/plugins/repository-hdfs/licenses/commons-cli-1.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2bf96b7aa8b611c177d329452af1dc933e14501c \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/commons-cli-1.5.0.jar.sha1 b/plugins/repository-hdfs/licenses/commons-cli-1.5.0.jar.sha1 new file mode 100644 index 0000000000000..8f9e064eda2d0 --- /dev/null +++ b/plugins/repository-hdfs/licenses/commons-cli-1.5.0.jar.sha1 @@ -0,0 +1 @@ +dc98be5d5390230684a092589d70ea76a147925c \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/zookeeper-3.7.0.jar.sha1 b/plugins/repository-hdfs/licenses/zookeeper-3.7.0.jar.sha1 deleted file mode 100644 index 88a6106a68710..0000000000000 --- a/plugins/repository-hdfs/licenses/zookeeper-3.7.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1360048c7ca057df627b7267ff7360870e987ab0 \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/zookeeper-3.8.0.jar.sha1 b/plugins/repository-hdfs/licenses/zookeeper-3.8.0.jar.sha1 new file mode 100644 index 0000000000000..b8ae2acd4bde9 --- /dev/null +++ b/plugins/repository-hdfs/licenses/zookeeper-3.8.0.jar.sha1 @@ -0,0 +1 @@ +e395c1d8a71557b7569cc6a83487b2e30e2e58fe \ No newline at end of file diff --git a/release-notes/opensearch.release-notes-1.3.2.md b/release-notes/opensearch.release-notes-1.3.2.md new file mode 100644 index 0000000000000..926ac01c414f5 --- /dev/null +++ b/release-notes/opensearch.release-notes-1.3.2.md @@ -0,0 +1,16 @@ +## Version 1.3.2 Release Notes + +### Upgrades + +* Update bundled JDK to 11.0.15+10 ([#3134](https://github.com/opensearch-project/OpenSearch/pull/3134)) +* [CVE-2020-36518] Update jackson-databind to 2.12.6.1 ([#2706](https://github.com/opensearch-project/OpenSearch/pull/2706)) + +### Enhancements + +* Use G1GC on JDK11+ ([#2971](https://github.com/opensearch-project/OpenSearch/pull/2971)) + +### Infrastructure + +* Fix opensearch-env always sources the environment from hardcoded file ([#2909](https://github.com/opensearch-project/OpenSearch/pull/2909)) +* Backporting changes for version workflow ([#2676](https://github.com/opensearch-project/OpenSearch/pull/2676)) +* Bump the version to 1.3.2 ([#2675](https://github.com/opensearch-project/OpenSearch/pull/2675)) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml index 32c349c5e46b6..fd7e17306abd9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml @@ -160,6 +160,16 @@ setup: --- "Filtered test": + - do: + bulk: + refresh: true + body: + - index: + _index: test_1 + _id: 5 + - int_field: 126 + double_field: 126.0 + string_field: foo - do: search: rest_total_hits_as_int: true @@ -180,14 +190,14 @@ setup: field: double_field hdr: {} - - match: { hits.total: 3 } - - length: { hits.hits: 3 } + - match: { hits.total: 4 } + - length: { hits.hits: 4 } - match: { aggregations.percentiles_int.values.1\.0: 51.0 } - match: { aggregations.percentiles_int.values.5\.0: 51.0 } - match: { aggregations.percentiles_int.values.25\.0: 51.0 } - match: { aggregations.percentiles_int.values.50\.0: 101.03125 } - - match: { aggregations.percentiles_int.values.75\.0: 101.03125 } + - match: { aggregations.percentiles_int.values.75\.0: 126.03125 } - match: { aggregations.percentiles_int.values.95\.0: 151.09375 } - match: { aggregations.percentiles_int.values.99\.0: 151.09375 } @@ -195,7 +205,7 @@ setup: - match: { aggregations.percentiles_double.values.5\.0: 51.0 } - match: { aggregations.percentiles_double.values.25\.0: 51.0 } - match: { aggregations.percentiles_double.values.50\.0: 101.03125 } - - match: { aggregations.percentiles_double.values.75\.0: 101.03125 } + - match: { aggregations.percentiles_double.values.75\.0: 126.03125 } - match: { aggregations.percentiles_double.values.95\.0: 151.09375 } - match: { aggregations.percentiles_double.values.99\.0: 151.09375 } diff --git a/server/build.gradle b/server/build.gradle index 45ec2300008f2..4490b2ea170cf 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -121,7 +121,7 @@ dependencies { // percentiles aggregation api 'com.tdunning:t-digest:3.2' // precentil ranks aggregation - api 'org.hdrhistogram:HdrHistogram:2.1.9' + api 'org.hdrhistogram:HdrHistogram:2.1.12' // lucene spatial api "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional @@ -317,10 +317,6 @@ tasks.named("thirdPartyAudit").configure { 'com.google.common.geometry.S2$Metric', 'com.google.common.geometry.S2LatLng' ) - - if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_1_8) { - ignoreMissingClasses 'javax.xml.bind.DatatypeConverter' - } } tasks.named("dependencyLicenses").configure { diff --git a/server/licenses/HdrHistogram-2.1.12.jar.sha1 b/server/licenses/HdrHistogram-2.1.12.jar.sha1 new file mode 100644 index 0000000000000..9d20fa0e5f22d --- /dev/null +++ b/server/licenses/HdrHistogram-2.1.12.jar.sha1 @@ -0,0 +1 @@ +6eb7552156e0d517ae80cc2247be1427c8d90452 \ No newline at end of file diff --git a/server/licenses/HdrHistogram-2.1.9.jar.sha1 b/server/licenses/HdrHistogram-2.1.9.jar.sha1 deleted file mode 100644 index 2378df07b2c0c..0000000000000 --- a/server/licenses/HdrHistogram-2.1.9.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e4631ce165eb400edecfa32e03d3f1be53dee754 \ No newline at end of file diff --git a/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java index 60243bd52ded3..bcbc93b5500bc 100644 --- a/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java @@ -33,7 +33,6 @@ package org.opensearch.action.admin.indices.alias; import org.opensearch.action.RequestValidators; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; import org.opensearch.cluster.metadata.AliasMetadata; @@ -143,8 +142,6 @@ public void testSomeAllowed() { final Exception e = expectThrows(IllegalStateException.class, () -> client().admin().indices().aliases(request).actionGet()); final String index = "foo_allowed".equals(origin) ? "bar" : "foo"; assertThat(e, hasToString(containsString("origin [" + origin + "] not allowed for index [" + index + "]"))); - final AliasesExistResponse response = client().admin().indices().aliasesExist(new GetAliasesRequest("alias")).actionGet(); - assertFalse(response.exists()); + assertTrue(client().admin().indices().getAliases(new GetAliasesRequest("alias")).actionGet().getAliases().isEmpty()); } - } diff --git a/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java b/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java index ff64a2cd90cb8..574046509de75 100644 --- a/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java @@ -35,7 +35,6 @@ import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; import org.opensearch.action.delete.DeleteResponse; @@ -684,8 +683,9 @@ public void testDeleteAliases() throws Exception { assertAliasesVersionIncreases(indices, () -> admin().indices().prepareAliases().removeAlias(indices, aliases).get()); - AliasesExistResponse response = admin().indices().prepareAliasesExist(aliases).get(); - assertThat(response.exists(), equalTo(false)); + for (String alias : aliases) { + assertTrue(admin().indices().prepareGetAliases(alias).get().getAliases().isEmpty()); + } logger.info("--> creating index [foo_foo] and [bar_bar]"); assertAcked(prepareCreate("foo_foo")); @@ -701,9 +701,9 @@ public void testDeleteAliases() throws Exception { () -> assertAcked(admin().indices().prepareAliases().addAliasAction(AliasActions.remove().index("foo*").alias("foo"))) ); - assertTrue(admin().indices().prepareAliasesExist("foo").get().exists()); - assertFalse(admin().indices().prepareAliasesExist("foo").setIndices("foo_foo").get().exists()); - assertTrue(admin().indices().prepareAliasesExist("foo").setIndices("bar_bar").get().exists()); + assertFalse(admin().indices().prepareGetAliases("foo").get().getAliases().isEmpty()); + assertTrue(admin().indices().prepareGetAliases("foo").setIndices("foo_foo").get().getAliases().isEmpty()); + assertFalse(admin().indices().prepareGetAliases("foo").setIndices("bar_bar").get().getAliases().isEmpty()); IllegalArgumentException iae = expectThrows( IllegalArgumentException.class, () -> admin().indices().prepareAliases().addAliasAction(AliasActions.remove().index("foo").alias("foo")).execute().actionGet() @@ -880,8 +880,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - AliasesExistResponse existsResponse = admin().indices().prepareAliasesExist("alias1").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("alias1").get().getAliases().isEmpty()); logger.info("--> getting all aliases that start with alias*"); getResponse = admin().indices().prepareGetAliases("alias*").get(); @@ -898,8 +897,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(1).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("alias*").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("alias*").get().getAliases().isEmpty()); logger.info("--> creating aliases [bar, baz, foo]"); assertAliasesVersionIncreases( @@ -937,8 +935,10 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("bazbar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("bar", "bac").addIndices("bazbar").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("bar").get().getAliases().isEmpty()); + assertFalse(admin().indices().prepareGetAliases("bac").get().getAliases().isEmpty()); + assertFalse(admin().indices().prepareGetAliases("bar").addIndices("bazbar").get().getAliases().isEmpty()); + assertFalse(admin().indices().prepareGetAliases("bac").addIndices("bazbar").get().getAliases().isEmpty()); logger.info("--> getting *b* for index baz*"); getResponse = admin().indices().prepareGetAliases("*b*").addIndices("baz*").get(); @@ -957,8 +957,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("bazbar").get(1).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("bazbar").get(1).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("*b*").addIndices("baz*").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("*b*").addIndices("baz*").get().getAliases().isEmpty()); logger.info("--> getting *b* for index *bar"); getResponse = admin().indices().prepareGetAliases("b*").addIndices("*bar").get(); @@ -982,8 +981,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), equalTo("bla")); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), equalTo("bla")); - existsResponse = admin().indices().prepareAliasesExist("b*").addIndices("*bar").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("b*").addIndices("*bar").get().getAliases().isEmpty()); logger.info("--> getting f* for index *bar"); getResponse = admin().indices().prepareGetAliases("f*").addIndices("*bar").get(); @@ -994,8 +992,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("f*").addIndices("*bar").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("f*").addIndices("*bar").get().getAliases().isEmpty()); // alias at work logger.info("--> getting f* for index *bac"); @@ -1008,8 +1005,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("foo").addIndices("*bac").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("foo").addIndices("*bac").get().getAliases().isEmpty()); logger.info("--> getting foo for index foobar"); getResponse = admin().indices().prepareGetAliases("foo").addIndices("foobar").get(); @@ -1020,8 +1016,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().get("foobar").get(0).getFilter(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getIndexRouting(), nullValue()); assertThat(getResponse.getAliases().get("foobar").get(0).getSearchRouting(), nullValue()); - existsResponse = admin().indices().prepareAliasesExist("foo").addIndices("foobar").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("foo").addIndices("foobar").get().getAliases().isEmpty()); for (String aliasName : new String[] { null, "_all", "*" }) { logger.info("--> getting {} alias for index foobar", aliasName); @@ -1044,8 +1039,7 @@ public void testIndicesGetAliases() throws Exception { assertThat(getResponse.getAliases().size(), equalTo(2)); assertThat(getResponse.getAliases().get("foobar").size(), equalTo(4)); assertThat(getResponse.getAliases().get("bazbar").size(), equalTo(2)); - existsResponse = admin().indices().prepareAliasesExist("*").addIndices("*bac").get(); - assertThat(existsResponse.exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("*").addIndices("*bac").get().getAliases().isEmpty()); assertAcked(admin().indices().prepareAliases().removeAlias("foobar", "foo")); @@ -1053,8 +1047,7 @@ public void testIndicesGetAliases() throws Exception { for (final ObjectObjectCursor> entry : getResponse.getAliases()) { assertTrue(entry.value.isEmpty()); } - existsResponse = admin().indices().prepareAliasesExist("foo").addIndices("foobar").get(); - assertThat(existsResponse.exists(), equalTo(false)); + assertTrue(admin().indices().prepareGetAliases("foo").addIndices("foobar").get().getAliases().isEmpty()); } public void testGetAllAliasesWorks() { @@ -1226,7 +1219,7 @@ public void testAliasesWithBlocks() { ); assertAliasesVersionIncreases("test", () -> assertAcked(admin().indices().prepareAliases().removeAlias("test", "alias1"))); assertThat(admin().indices().prepareGetAliases("alias2").execute().actionGet().getAliases().get("test").size(), equalTo(1)); - assertThat(admin().indices().prepareAliasesExist("alias2").get().exists(), equalTo(true)); + assertFalse(admin().indices().prepareGetAliases("alias2").get().getAliases().isEmpty()); } finally { disableIndexBlock("test", block); } @@ -1244,8 +1237,7 @@ public void testAliasesWithBlocks() { () -> assertBlocked(admin().indices().prepareAliases().removeAlias("test", "alias2"), INDEX_READ_ONLY_BLOCK) ); assertThat(admin().indices().prepareGetAliases("alias2").execute().actionGet().getAliases().get("test").size(), equalTo(1)); - assertThat(admin().indices().prepareAliasesExist("alias2").get().exists(), equalTo(true)); - + assertFalse(admin().indices().prepareGetAliases("alias2").get().getAliases().isEmpty()); } finally { disableIndexBlock("test", SETTING_READ_ONLY); } @@ -1262,8 +1254,7 @@ public void testAliasesWithBlocks() { () -> assertBlocked(admin().indices().prepareAliases().removeAlias("test", "alias2"), INDEX_METADATA_BLOCK) ); assertBlocked(admin().indices().prepareGetAliases("alias2"), INDEX_METADATA_BLOCK); - assertBlocked(admin().indices().prepareAliasesExist("alias2"), INDEX_METADATA_BLOCK); - + assertBlocked(admin().indices().prepareGetAliases("alias2"), INDEX_METADATA_BLOCK); } finally { disableIndexBlock("test", SETTING_BLOCKS_METADATA); } @@ -1288,12 +1279,12 @@ public void testAliasActionRemoveIndex() throws InterruptedException, ExecutionE assertAcked(client().admin().indices().prepareAliases().removeIndex("foo*")); assertFalse(client().admin().indices().prepareExists("foo_foo").execute().actionGet().isExists()); - assertTrue(admin().indices().prepareAliasesExist("foo").get().exists()); + assertFalse(admin().indices().prepareGetAliases("foo").get().getAliases().isEmpty()); assertTrue(client().admin().indices().prepareExists("bar_bar").execute().actionGet().isExists()); - assertTrue(admin().indices().prepareAliasesExist("foo").setIndices("bar_bar").get().exists()); + assertFalse(admin().indices().prepareGetAliases("foo").setIndices("bar_bar").get().getAliases().isEmpty()); assertAcked(client().admin().indices().prepareAliases().removeIndex("bar_bar")); - assertFalse(admin().indices().prepareAliasesExist("foo").get().exists()); + assertTrue(admin().indices().prepareGetAliases("foo").get().getAliases().isEmpty()); assertFalse(client().admin().indices().prepareExists("bar_bar").execute().actionGet().isExists()); } diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java index c3dc686921eb6..32899690799d3 100644 --- a/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java @@ -91,7 +91,7 @@ public void testTwoNodesNoMasterBlock() throws Exception { logger.info("--> start first node"); String node1Name = internalCluster().startNode(settings); - logger.info("--> should be blocked, no master..."); + logger.info("--> should be blocked, no cluster-manager..."); ClusterState state = client().admin().cluster().prepareState().setLocal(true).execute().actionGet().getState(); assertThat(state.blocks().hasGlobalBlockWithId(NoMasterBlockService.NO_MASTER_BLOCK_ID), equalTo(true)); assertThat(state.nodes().getSize(), equalTo(1)); // verify that we still see the local node in the cluster state @@ -155,7 +155,7 @@ public void testTwoNodesNoMasterBlock() throws Exception { String otherNode = node1Name.equals(masterNode) ? node2Name : node1Name; logger.info("--> add voting config exclusion for non-master node, to be sure it's not elected"); client().execute(AddVotingConfigExclusionsAction.INSTANCE, new AddVotingConfigExclusionsRequest(otherNode)).get(); - logger.info("--> stop master node, no master block should appear"); + logger.info("--> stop master node, no cluster-manager block should appear"); Settings masterDataPathSettings = internalCluster().dataPathSettings(masterNode); internalCluster().stopRandomNode(InternalTestCluster.nameFilter(masterNode)); @@ -166,7 +166,7 @@ public void testTwoNodesNoMasterBlock() throws Exception { state = client().admin().cluster().prepareState().setLocal(true).execute().actionGet().getState(); assertThat(state.blocks().hasGlobalBlockWithId(NoMasterBlockService.NO_MASTER_BLOCK_ID), equalTo(true)); - // verify that both nodes are still in the cluster state but there is no master + // verify that both nodes are still in the cluster state but there is no cluster-manager assertThat(state.nodes().getSize(), equalTo(2)); assertThat(state.nodes().getMasterNode(), equalTo(null)); @@ -208,7 +208,7 @@ public void testTwoNodesNoMasterBlock() throws Exception { otherNode = node1Name.equals(masterNode) ? node2Name : node1Name; logger.info("--> add voting config exclusion for master node, to be sure it's not elected"); client().execute(AddVotingConfigExclusionsAction.INSTANCE, new AddVotingConfigExclusionsRequest(masterNode)).get(); - logger.info("--> stop non-master node, no master block should appear"); + logger.info("--> stop non-master node, no cluster-manager block should appear"); Settings otherNodeDataPathSettings = internalCluster().dataPathSettings(otherNode); internalCluster().stopRandomNode(InternalTestCluster.nameFilter(otherNode)); @@ -317,7 +317,7 @@ public void testThreeNodesNoMasterBlock() throws Exception { internalCluster().stopRandomNonMasterNode(); internalCluster().stopRandomNonMasterNode(); - logger.info("--> verify that there is no master anymore on remaining node"); + logger.info("--> verify that there is no cluster-manager anymore on remaining node"); // spin here to wait till the state is set assertBusy(() -> { ClusterState st = client().admin().cluster().prepareState().setLocal(true).execute().actionGet().getState(); @@ -386,7 +386,7 @@ public void onFailure(String source, Exception e) { assertThat(failure.get(), instanceOf(FailedToCommitClusterStateException.class)); - logger.debug("--> check that there is no master in minor partition"); + logger.debug("--> check that there is no cluster-manager in minor partition"); assertBusy(() -> assertThat(masterClusterService.state().nodes().getMasterNode(), nullValue())); // let major partition to elect new master, to ensure that old master is not elected once partition is restored, diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java index fc193163f75cc..5380b61c446d4 100644 --- a/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java @@ -74,7 +74,7 @@ public void testSimpleOnlyMasterNodeElection() throws IOException { ); fail("should not be able to find master"); } catch (MasterNotDiscoveredException e) { - // all is well, no master elected + // all is well, no cluster-manager elected } logger.info("--> start master node"); final String masterNodeName = internalCluster().startMasterOnlyNode(); @@ -124,7 +124,7 @@ public void testSimpleOnlyMasterNodeElection() throws IOException { ); fail("should not be able to find master"); } catch (MasterNotDiscoveredException e) { - // all is well, no master elected + // all is well, no cluster-manager elected } logger.info("--> start previous master node again"); @@ -178,7 +178,7 @@ public void testElectOnlyBetweenMasterNodes() throws Exception { ); fail("should not be able to find master"); } catch (MasterNotDiscoveredException e) { - // all is well, no master elected + // all is well, no cluster-manager elected } logger.info("--> start master node (1)"); final String masterNodeName = internalCluster().startMasterOnlyNode(); diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java index 079aaa714a15c..bea70bd0f5919 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java @@ -220,7 +220,7 @@ public void testNodeNotReachableFromMaster() throws Exception { logger.info("waiting for [{}] to be removed from cluster", nonMasterNode); ensureStableCluster(2, masterNode); - logger.info("waiting for [{}] to have no master", nonMasterNode); + logger.info("waiting for [{}] to have no cluster-manager", nonMasterNode); assertNoMaster(nonMasterNode); logger.info("healing partition and checking cluster reforms"); diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java index 14e7a26bb448e..2434537d7a424 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java @@ -217,7 +217,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { // The unlucky node must report *no* master node, since it can't connect to master and in fact it should // continuously ping until network failures have been resolved. However // It may a take a bit before the node detects it has been cut off from the elected master - logger.info("waiting for isolated node [{}] to have no master", isolatedNode); + logger.info("waiting for isolated node [{}] to have no cluster-manager", isolatedNode); assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(30)); logger.info("wait until elected master has been removed and a new 2 node cluster was from (via [{}])", isolatedNode); @@ -236,7 +236,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { fail( "node [" + node - + "] has no master or has blocks, despite of being on the right side of the partition. State dump:\n" + + "] has no cluster-manager or has blocks, despite of being on the right side of the partition. State dump:\n" + nodeState ); } @@ -247,7 +247,11 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { // Wait until the master node sees al 3 nodes again. ensureStableCluster(3, new TimeValue(DISRUPTION_HEALING_OVERHEAD.millis() + networkDisruption.expectedTimeToHeal().millis())); - logger.info("Verify no master block with {} set to {}", NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.getKey(), "all"); + logger.info( + "Verify no cluster-manager block with {} set to {}", + NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.getKey(), + "all" + ); client().admin() .cluster() .prepareUpdateSettings() @@ -259,7 +263,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { // The unlucky node must report *no* master node, since it can't connect to master and in fact it should // continuously ping until network failures have been resolved. However // It may a take a bit before the node detects it has been cut off from the elected master - logger.info("waiting for isolated node [{}] to have no master", isolatedNode); + logger.info("waiting for isolated node [{}] to have no cluster-manager", isolatedNode); assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_ALL, TimeValue.timeValueSeconds(30)); // make sure we have stable cluster & cross partition recoveries are canceled by the removal of the missing node diff --git a/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java index 92d8dc6a0bb5e..19939a5a3cbc0 100644 --- a/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java @@ -62,6 +62,7 @@ import org.opensearch.index.shard.ShardPath; import org.opensearch.indices.IndicesService; import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.indices.replication.common.ReplicationLuceneIndex; import org.opensearch.plugins.Plugin; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; @@ -547,7 +548,7 @@ public void testReuseInFileBasedPeerRecovery() throws Exception { final Set files = new HashSet<>(); for (final RecoveryState recoveryState : initialRecoveryReponse.shardRecoveryStates().get("test")) { if (recoveryState.getTargetNode().getName().equals(replicaNode)) { - for (final RecoveryState.FileDetail file : recoveryState.getIndex().fileDetails()) { + for (final ReplicationLuceneIndex.FileMetadata file : recoveryState.getIndex().fileDetails()) { files.add(file.name()); } break; @@ -607,7 +608,7 @@ public Settings onNodeStopped(String nodeName) throws Exception { long reused = 0; int filesRecovered = 0; int filesReused = 0; - for (final RecoveryState.FileDetail file : recoveryState.getIndex().fileDetails()) { + for (final ReplicationLuceneIndex.FileMetadata file : recoveryState.getIndex().fileDetails()) { if (files.contains(file.name()) == false) { recovered += file.length(); filesRecovered++; diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java index 3432cc967bf22..1f3d865811939 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java @@ -34,10 +34,8 @@ import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequestBuilder; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistRequestBuilder; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequestBuilder; import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheRequestBuilder; -import org.opensearch.action.admin.indices.exists.types.TypesExistsRequestBuilder; import org.opensearch.action.admin.indices.flush.FlushRequestBuilder; import org.opensearch.action.admin.indices.forcemerge.ForceMergeRequestBuilder; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequestBuilder; @@ -98,8 +96,6 @@ public void testSpecifiedIndexUnavailableMultipleIndices() throws Exception { verify(forceMerge("test1", "test2"), true); verify(refreshBuilder("test1", "test2"), true); verify(validateQuery("test1", "test2"), true); - verify(aliasExists("test1", "test2"), true); - verify(typesExists("test1", "test2"), true); verify(getAliases("test1", "test2"), true); verify(getFieldMapping("test1", "test2"), true); verify(getMapping("test1", "test2"), true); @@ -115,8 +111,6 @@ public void testSpecifiedIndexUnavailableMultipleIndices() throws Exception { verify(forceMerge("test1", "test2").setIndicesOptions(options), true); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), true); verify(validateQuery("test1", "test2").setIndicesOptions(options), true); - verify(aliasExists("test1", "test2").setIndicesOptions(options), true); - verify(typesExists("test1", "test2").setIndicesOptions(options), true); verify(getAliases("test1", "test2").setIndicesOptions(options), true); verify(getFieldMapping("test1", "test2").setIndicesOptions(options), true); verify(getMapping("test1", "test2").setIndicesOptions(options), true); @@ -132,8 +126,6 @@ public void testSpecifiedIndexUnavailableMultipleIndices() throws Exception { verify(forceMerge("test1", "test2").setIndicesOptions(options), false); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), false); verify(validateQuery("test1", "test2").setIndicesOptions(options), false); - verify(aliasExists("test1", "test2").setIndicesOptions(options), false); - verify(typesExists("test1", "test2").setIndicesOptions(options), false); verify(getAliases("test1", "test2").setIndicesOptions(options), false); verify(getFieldMapping("test1", "test2").setIndicesOptions(options), false); verify(getMapping("test1", "test2").setIndicesOptions(options), false); @@ -150,8 +142,6 @@ public void testSpecifiedIndexUnavailableMultipleIndices() throws Exception { verify(forceMerge("test1", "test2").setIndicesOptions(options), false); verify(refreshBuilder("test1", "test2").setIndicesOptions(options), false); verify(validateQuery("test1", "test2").setIndicesOptions(options), false); - verify(aliasExists("test1", "test2").setIndicesOptions(options), false); - verify(typesExists("test1", "test2").setIndicesOptions(options), false); verify(getAliases("test1", "test2").setIndicesOptions(options), false); verify(getFieldMapping("test1", "test2").setIndicesOptions(options), false); verify(getMapping("test1", "test2").setIndicesOptions(options), false); @@ -177,8 +167,6 @@ public void testSpecifiedIndexUnavailableSingleIndexThatIsClosed() throws Except verify(forceMerge("test1").setIndicesOptions(options), true); verify(refreshBuilder("test1").setIndicesOptions(options), true); verify(validateQuery("test1").setIndicesOptions(options), true); - verify(aliasExists("test1").setIndicesOptions(options), true); - verify(typesExists("test1").setIndicesOptions(options), true); verify(getAliases("test1").setIndicesOptions(options), true); verify(getFieldMapping("test1").setIndicesOptions(options), true); verify(getMapping("test1").setIndicesOptions(options), true); @@ -200,8 +188,6 @@ public void testSpecifiedIndexUnavailableSingleIndexThatIsClosed() throws Except verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); - verify(aliasExists("test1").setIndicesOptions(options), false); - verify(typesExists("test1").setIndicesOptions(options), false); verify(getAliases("test1").setIndicesOptions(options), false); verify(getFieldMapping("test1").setIndicesOptions(options), false); verify(getMapping("test1").setIndicesOptions(options), false); @@ -220,8 +206,6 @@ public void testSpecifiedIndexUnavailableSingleIndexThatIsClosed() throws Except verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); - verify(aliasExists("test1").setIndicesOptions(options), false); - verify(typesExists("test1").setIndicesOptions(options), false); verify(getAliases("test1").setIndicesOptions(options), false); verify(getFieldMapping("test1").setIndicesOptions(options), false); verify(getMapping("test1").setIndicesOptions(options), false); @@ -239,8 +223,6 @@ public void testSpecifiedIndexUnavailableSingleIndex() throws Exception { verify(forceMerge("test1").setIndicesOptions(options), true); verify(refreshBuilder("test1").setIndicesOptions(options), true); verify(validateQuery("test1").setIndicesOptions(options), true); - verify(aliasExists("test1").setIndicesOptions(options), true); - verify(typesExists("test1").setIndicesOptions(options), true); verify(getAliases("test1").setIndicesOptions(options), true); verify(getFieldMapping("test1").setIndicesOptions(options), true); verify(getMapping("test1").setIndicesOptions(options), true); @@ -262,8 +244,6 @@ public void testSpecifiedIndexUnavailableSingleIndex() throws Exception { verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); - verify(aliasExists("test1").setIndicesOptions(options), false); - verify(typesExists("test1").setIndicesOptions(options), false); verify(getAliases("test1").setIndicesOptions(options), false); verify(getFieldMapping("test1").setIndicesOptions(options), false); verify(getMapping("test1").setIndicesOptions(options), false); @@ -281,8 +261,6 @@ public void testSpecifiedIndexUnavailableSingleIndex() throws Exception { verify(forceMerge("test1").setIndicesOptions(options), false); verify(refreshBuilder("test1").setIndicesOptions(options), false); verify(validateQuery("test1").setIndicesOptions(options), false); - verify(aliasExists("test1").setIndicesOptions(options), false); - verify(typesExists("test1").setIndicesOptions(options), false); verify(getAliases("test1").setIndicesOptions(options), false); verify(getFieldMapping("test1").setIndicesOptions(options), false); verify(getMapping("test1").setIndicesOptions(options), false); @@ -335,8 +313,6 @@ public void testWildcardBehaviour() throws Exception { verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), true); - verify(aliasExists(indices), false); - verify(typesExists(indices), false); verify(getAliases(indices), false); verify(getFieldMapping(indices), false); verify(getMapping(indices), false); @@ -353,8 +329,6 @@ public void testWildcardBehaviour() throws Exception { verify(forceMerge(indices).setIndicesOptions(options), false); verify(refreshBuilder(indices).setIndicesOptions(options), false); verify(validateQuery(indices).setIndicesOptions(options), false); - verify(aliasExists(indices).setIndicesOptions(options), false); - verify(typesExists(indices).setIndicesOptions(options), false); verify(getAliases(indices).setIndicesOptions(options), false); verify(getFieldMapping(indices).setIndicesOptions(options), false); verify(getMapping(indices).setIndicesOptions(options), false); @@ -374,8 +348,6 @@ public void testWildcardBehaviour() throws Exception { verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), false); - verify(aliasExists(indices), false); - verify(typesExists(indices), false); verify(getAliases(indices), false); verify(getFieldMapping(indices), false); verify(getMapping(indices), false); @@ -392,8 +364,6 @@ public void testWildcardBehaviour() throws Exception { verify(forceMerge(indices), false); verify(refreshBuilder(indices), false); verify(validateQuery(indices), true); - verify(aliasExists(indices), false); - verify(typesExists(indices), false); verify(getAliases(indices), false); verify(getFieldMapping(indices), false); verify(getMapping(indices), false); @@ -410,8 +380,6 @@ public void testWildcardBehaviour() throws Exception { verify(forceMerge(indices).setIndicesOptions(options), false); verify(refreshBuilder(indices).setIndicesOptions(options), false); verify(validateQuery(indices).setIndicesOptions(options), false); - verify(aliasExists(indices).setIndicesOptions(options), false); - verify(typesExists(indices).setIndicesOptions(options), false); verify(getAliases(indices).setIndicesOptions(options), false); verify(getFieldMapping(indices).setIndicesOptions(options), false); verify(getMapping(indices).setIndicesOptions(options), false); @@ -573,25 +541,23 @@ public void testDeleteIndexWildcard() throws Exception { public void testPutAlias() throws Exception { createIndex("foobar"); verify(client().admin().indices().prepareAliases().addAlias("foobar", "foobar_alias"), false); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("foobar").get().exists(), equalTo(true)); - + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("foobar").get().getAliases().isEmpty()); } public void testPutAliasWildcard() throws Exception { createIndex("foo", "foobar", "bar", "barbaz"); verify(client().admin().indices().prepareAliases().addAlias("foo*", "foobar_alias"), false); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("foo").get().exists(), equalTo(true)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("foobar").get().exists(), equalTo(true)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("bar").get().exists(), equalTo(false)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("barbaz").get().exists(), equalTo(false)); + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("foo").get().getAliases().isEmpty()); + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("foobar").get().getAliases().isEmpty()); + assertTrue(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("bar").get().getAliases().isEmpty()); + assertTrue(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("barbaz").get().getAliases().isEmpty()); verify(client().admin().indices().prepareAliases().addAlias("*", "foobar_alias"), false); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("foo").get().exists(), equalTo(true)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("foobar").get().exists(), equalTo(true)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("bar").get().exists(), equalTo(true)); - assertThat(client().admin().indices().prepareAliasesExist("foobar_alias").setIndices("barbaz").get().exists(), equalTo(true)); - + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("foo").get().getAliases().isEmpty()); + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("foobar").get().getAliases().isEmpty()); + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("bar").get().getAliases().isEmpty()); + assertFalse(client().admin().indices().prepareGetAliases("foobar_alias").setIndices("barbaz").get().getAliases().isEmpty()); } public void testPutMapping() throws Exception { @@ -721,14 +687,6 @@ static ValidateQueryRequestBuilder validateQuery(String... indices) { return client().admin().indices().prepareValidateQuery(indices); } - private static AliasesExistRequestBuilder aliasExists(String... indices) { - return client().admin().indices().prepareAliasesExist("dummy").addIndices(indices); - } - - private static TypesExistsRequestBuilder typesExists(String... indices) { - return client().admin().indices().prepareTypesExists(indices).setTypes("dummy"); - } - static GetAliasesRequestBuilder getAliases(String... indices) { return client().admin().indices().prepareGetAliases("dummy").addIndices(indices); } diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java index a7dc77e024d5c..27f3b3c8a28f4 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java @@ -102,6 +102,7 @@ import org.opensearch.indices.NodeIndicesStats; import org.opensearch.indices.analysis.AnalysisModule; import org.opensearch.indices.recovery.RecoveryState.Stage; +import org.opensearch.indices.replication.common.ReplicationLuceneIndex; import org.opensearch.node.NodeClosedException; import org.opensearch.node.RecoverySettingsChunkSizePlugin; import org.opensearch.plugins.AnalysisPlugin; @@ -836,7 +837,7 @@ private IndicesStatsResponse createAndPopulateIndex(String name, int nodeCount, return client().admin().indices().prepareStats(name).execute().actionGet(); } - private void validateIndexRecoveryState(RecoveryState.Index indexState) { + private void validateIndexRecoveryState(ReplicationLuceneIndex indexState) { assertThat(indexState.time(), greaterThanOrEqualTo(0L)); assertThat(indexState.recoveredFilesPercent(), greaterThanOrEqualTo(0.0f)); assertThat(indexState.recoveredFilesPercent(), lessThanOrEqualTo(100.0f)); diff --git a/server/src/main/java/org/opensearch/Assertions.java b/server/src/main/java/org/opensearch/Assertions.java index 6873364f7987d..843853ec8b20b 100644 --- a/server/src/main/java/org/opensearch/Assertions.java +++ b/server/src/main/java/org/opensearch/Assertions.java @@ -36,6 +36,8 @@ * Provides a static final field that can be used to check if assertions are enabled. Since this field might be used elsewhere to check if * assertions are enabled, if you are running with assertions enabled for specific packages or classes, you should enable assertions on this * class too (e.g., {@code -ea org.opensearch.Assertions -ea org.opensearch.cluster.service.MasterService}). + * + * @opensearch.internal */ public final class Assertions { diff --git a/server/src/main/java/org/opensearch/Build.java b/server/src/main/java/org/opensearch/Build.java index 9508a63de5991..1d21de6863eef 100644 --- a/server/src/main/java/org/opensearch/Build.java +++ b/server/src/main/java/org/opensearch/Build.java @@ -46,6 +46,8 @@ /** * Information about a build of OpenSearch. + * + * @opensearch.internal */ public class Build { /** diff --git a/server/src/main/java/org/opensearch/ExceptionsHelper.java b/server/src/main/java/org/opensearch/ExceptionsHelper.java index 418bf9811a7b3..f252d0b05af79 100644 --- a/server/src/main/java/org/opensearch/ExceptionsHelper.java +++ b/server/src/main/java/org/opensearch/ExceptionsHelper.java @@ -61,6 +61,11 @@ import java.util.function.Predicate; import java.util.stream.Collectors; +/** + * Helper class for OpenSearch Exceptions + * + * @opensearch.internal + */ public final class ExceptionsHelper { private static final Logger logger = LogManager.getLogger(ExceptionsHelper.class); diff --git a/server/src/main/java/org/opensearch/LegacyESVersion.java b/server/src/main/java/org/opensearch/LegacyESVersion.java index 38b655b09b151..d4ac3c7d2f8b1 100644 --- a/server/src/main/java/org/opensearch/LegacyESVersion.java +++ b/server/src/main/java/org/opensearch/LegacyESVersion.java @@ -43,6 +43,8 @@ * * This class keeps all the supported OpenSearch predecessor versions for * backward compatibility purpose. + * + * @opensearch.internal */ public class LegacyESVersion extends Version { diff --git a/server/src/main/java/org/opensearch/OpenSearchCorruptionException.java b/server/src/main/java/org/opensearch/OpenSearchCorruptionException.java index ecca2191295a4..eb012b209c7de 100644 --- a/server/src/main/java/org/opensearch/OpenSearchCorruptionException.java +++ b/server/src/main/java/org/opensearch/OpenSearchCorruptionException.java @@ -36,6 +36,8 @@ /** * This exception is thrown when OpenSearch detects * an inconsistency in one of it's persistent files. + * + * @opensearch.internal */ public class OpenSearchCorruptionException extends IOException { diff --git a/server/src/main/java/org/opensearch/OpenSearchException.java b/server/src/main/java/org/opensearch/OpenSearchException.java index 5a9e5b91982a2..a6a12d7ebb4f7 100644 --- a/server/src/main/java/org/opensearch/OpenSearchException.java +++ b/server/src/main/java/org/opensearch/OpenSearchException.java @@ -73,6 +73,8 @@ /** * A base class for all opensearch exceptions. + * + * @opensearch.internal */ public class OpenSearchException extends RuntimeException implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/OpenSearchGenerationException.java b/server/src/main/java/org/opensearch/OpenSearchGenerationException.java index 1f112aaf5a6e6..23f93263ee3d2 100644 --- a/server/src/main/java/org/opensearch/OpenSearchGenerationException.java +++ b/server/src/main/java/org/opensearch/OpenSearchGenerationException.java @@ -39,7 +39,7 @@ /** * A generic exception indicating failure to generate. * - * + * @opensearch.internal */ public class OpenSearchGenerationException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/OpenSearchParseException.java b/server/src/main/java/org/opensearch/OpenSearchParseException.java index 0cc537f36a3ec..57eab19cc01f4 100644 --- a/server/src/main/java/org/opensearch/OpenSearchParseException.java +++ b/server/src/main/java/org/opensearch/OpenSearchParseException.java @@ -39,6 +39,8 @@ /** * Unchecked exception that is translated into a {@code 400 BAD REQUEST} error when it bubbles out over HTTP. + * + * @opensearch.internal */ public class OpenSearchParseException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/OpenSearchSecurityException.java b/server/src/main/java/org/opensearch/OpenSearchSecurityException.java index 35edb058605a7..6f725573e71ce 100644 --- a/server/src/main/java/org/opensearch/OpenSearchSecurityException.java +++ b/server/src/main/java/org/opensearch/OpenSearchSecurityException.java @@ -38,6 +38,8 @@ /** * Generic security exception + * + * @opensearch.internal */ public class OpenSearchSecurityException extends OpenSearchStatusException { /** diff --git a/server/src/main/java/org/opensearch/OpenSearchStatusException.java b/server/src/main/java/org/opensearch/OpenSearchStatusException.java index 274eac8f8b2ad..b9cc51eaa2a8d 100644 --- a/server/src/main/java/org/opensearch/OpenSearchStatusException.java +++ b/server/src/main/java/org/opensearch/OpenSearchStatusException.java @@ -41,6 +41,8 @@ /** * Exception who's {@link RestStatus} is arbitrary rather than derived. Used, for example, by reindex-from-remote to wrap remote exceptions * that contain a status. + * + * @opensearch.internal */ public class OpenSearchStatusException extends OpenSearchException { private final RestStatus status; diff --git a/server/src/main/java/org/opensearch/OpenSearchTimeoutException.java b/server/src/main/java/org/opensearch/OpenSearchTimeoutException.java index 6b20e145e500b..6f97d8fc3dde3 100644 --- a/server/src/main/java/org/opensearch/OpenSearchTimeoutException.java +++ b/server/src/main/java/org/opensearch/OpenSearchTimeoutException.java @@ -39,7 +39,7 @@ /** * The same as {@link java.util.concurrent.TimeoutException} simply a runtime one. * - * + * @opensearch.internal */ public class OpenSearchTimeoutException extends OpenSearchException { public OpenSearchTimeoutException(StreamInput in) throws IOException { diff --git a/server/src/main/java/org/opensearch/OpenSearchWrapperException.java b/server/src/main/java/org/opensearch/OpenSearchWrapperException.java index aa3e857f96901..3ef5ec4feac2d 100644 --- a/server/src/main/java/org/opensearch/OpenSearchWrapperException.java +++ b/server/src/main/java/org/opensearch/OpenSearchWrapperException.java @@ -36,6 +36,8 @@ * An exception that is meant to be "unwrapped" when sent back to the user * as an error because its is {@link #getCause() cause}, if non-null is * always more useful to the user than the exception itself. + * + * @opensearch.internal */ public interface OpenSearchWrapperException { Throwable getCause(); diff --git a/server/src/main/java/org/opensearch/ResourceAlreadyExistsException.java b/server/src/main/java/org/opensearch/ResourceAlreadyExistsException.java index e6b5177538fa9..2fbbf459ea293 100644 --- a/server/src/main/java/org/opensearch/ResourceAlreadyExistsException.java +++ b/server/src/main/java/org/opensearch/ResourceAlreadyExistsException.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Exception when Resources already exists + * + * @opensearch.internal + */ public class ResourceAlreadyExistsException extends OpenSearchException { public ResourceAlreadyExistsException(Index index) { diff --git a/server/src/main/java/org/opensearch/ResourceNotFoundException.java b/server/src/main/java/org/opensearch/ResourceNotFoundException.java index 373493aeb53b1..6282f9f03b4f9 100644 --- a/server/src/main/java/org/opensearch/ResourceNotFoundException.java +++ b/server/src/main/java/org/opensearch/ResourceNotFoundException.java @@ -38,6 +38,8 @@ /** * Generic ResourceNotFoundException corresponding to the {@link RestStatus#NOT_FOUND} status code + * + * @opensearch.internal */ public class ResourceNotFoundException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/SpecialPermission.java b/server/src/main/java/org/opensearch/SpecialPermission.java index 00ae1528d4ef2..8a694d4543f32 100644 --- a/server/src/main/java/org/opensearch/SpecialPermission.java +++ b/server/src/main/java/org/opensearch/SpecialPermission.java @@ -68,6 +68,8 @@ * ... * ); * + * + * @opensearch.internal */ public final class SpecialPermission extends BasicPermission { diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index ad3546b2498f2..4f0bb55c0f666 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -51,6 +51,11 @@ import java.util.Locale; import java.util.Objects; +/** + * OpenSearch Version Class + * + * @opensearch.api + */ public class Version implements Comparable, ToXContentFragment { /* * The logic for ID is: XXYYZZAA, where XX is major version, YY is minor version, ZZ is revision, and AA is alpha/beta/rc indicator AA @@ -81,6 +86,7 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_1_3_0 = new Version(1030099, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_1_3_1 = new Version(1030199, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_1_3_2 = new Version(1030299, org.apache.lucene.util.Version.LUCENE_8_10_1); + public static final Version V_1_3_3 = new Version(1030399, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_2_0_0 = new Version(2000099, org.apache.lucene.util.Version.LUCENE_9_1_0); public static final Version V_2_1_0 = new Version(2010099, org.apache.lucene.util.Version.LUCENE_9_1_0); public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_2_0); diff --git a/server/src/main/java/org/opensearch/action/ActionFuture.java b/server/src/main/java/org/opensearch/action/ActionFuture.java index b1795ecf30b11..77b748f50bfbf 100644 --- a/server/src/main/java/org/opensearch/action/ActionFuture.java +++ b/server/src/main/java/org/opensearch/action/ActionFuture.java @@ -40,7 +40,7 @@ /** * An extension to {@link Future} allowing for simplified "get" operations. * - * + * @opensearch.internal */ public interface ActionFuture extends Future { diff --git a/server/src/main/java/org/opensearch/action/ActionListener.java b/server/src/main/java/org/opensearch/action/ActionListener.java index 13c6aa96ceee6..8f632449c7d91 100644 --- a/server/src/main/java/org/opensearch/action/ActionListener.java +++ b/server/src/main/java/org/opensearch/action/ActionListener.java @@ -45,6 +45,8 @@ /** * A listener for action responses or failures. + * + * @opensearch.internal */ public interface ActionListener { /** diff --git a/server/src/main/java/org/opensearch/action/ActionListenerResponseHandler.java b/server/src/main/java/org/opensearch/action/ActionListenerResponseHandler.java index 83ac650bf48af..26e9ba8621c53 100644 --- a/server/src/main/java/org/opensearch/action/ActionListenerResponseHandler.java +++ b/server/src/main/java/org/opensearch/action/ActionListenerResponseHandler.java @@ -45,6 +45,8 @@ /** * A simple base class for action response listeners, defaulting to using the SAME executor (as its * very common on response handlers). + * + * @opensearch.internal */ public class ActionListenerResponseHandler implements TransportResponseHandler { diff --git a/server/src/main/java/org/opensearch/action/ActionModule.java b/server/src/main/java/org/opensearch/action/ActionModule.java index 57623a9b4faff..c43e632ac42fd 100644 --- a/server/src/main/java/org/opensearch/action/ActionModule.java +++ b/server/src/main/java/org/opensearch/action/ActionModule.java @@ -108,8 +108,6 @@ import org.opensearch.action.admin.indices.alias.IndicesAliasesAction; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; import org.opensearch.action.admin.indices.alias.TransportIndicesAliasesAction; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistAction; -import org.opensearch.action.admin.indices.alias.exists.TransportAliasesExistAction; import org.opensearch.action.admin.indices.alias.get.GetAliasesAction; import org.opensearch.action.admin.indices.alias.get.TransportGetAliasesAction; import org.opensearch.action.admin.indices.analyze.AnalyzeAction; @@ -137,8 +135,6 @@ import org.opensearch.action.admin.indices.delete.TransportDeleteIndexAction; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsAction; import org.opensearch.action.admin.indices.exists.indices.TransportIndicesExistsAction; -import org.opensearch.action.admin.indices.exists.types.TransportTypesExistsAction; -import org.opensearch.action.admin.indices.exists.types.TypesExistsAction; import org.opensearch.action.admin.indices.flush.FlushAction; import org.opensearch.action.admin.indices.flush.TransportFlushAction; import org.opensearch.action.admin.indices.forcemerge.ForceMergeAction; @@ -432,6 +428,8 @@ /** * Builds and binds the generic action map, all {@link TransportAction}s, and {@link ActionFilters}. + * + * @opensearch.internal */ public class ActionModule extends AbstractModule { @@ -569,7 +567,6 @@ public void reg actions.register(OpenIndexAction.INSTANCE, TransportOpenIndexAction.class); actions.register(CloseIndexAction.INSTANCE, TransportCloseIndexAction.class); actions.register(IndicesExistsAction.INSTANCE, TransportIndicesExistsAction.class); - actions.register(TypesExistsAction.INSTANCE, TransportTypesExistsAction.class); actions.register(AddIndexBlockAction.INSTANCE, TransportAddIndexBlockAction.class); actions.register(GetMappingsAction.INSTANCE, TransportGetMappingsAction.class); actions.register( @@ -602,7 +599,6 @@ public void reg actions.register(UpgradeSettingsAction.INSTANCE, TransportUpgradeSettingsAction.class); actions.register(ClearIndicesCacheAction.INSTANCE, TransportClearIndicesCacheAction.class); actions.register(GetAliasesAction.INSTANCE, TransportGetAliasesAction.class); - actions.register(AliasesExistAction.INSTANCE, TransportAliasesExistAction.class); actions.register(GetSettingsAction.INSTANCE, TransportGetSettingsAction.class); actions.register(IndexAction.INSTANCE, TransportIndexAction.class); diff --git a/server/src/main/java/org/opensearch/action/ActionRequest.java b/server/src/main/java/org/opensearch/action/ActionRequest.java index d000155c55b7d..c6d8eb9f273d6 100644 --- a/server/src/main/java/org/opensearch/action/ActionRequest.java +++ b/server/src/main/java/org/opensearch/action/ActionRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Base action request + * + * @opensearch.internal + */ public abstract class ActionRequest extends TransportRequest { public ActionRequest() { diff --git a/server/src/main/java/org/opensearch/action/ActionRequestBuilder.java b/server/src/main/java/org/opensearch/action/ActionRequestBuilder.java index 7a81d07c6927a..d1fddb076b350 100644 --- a/server/src/main/java/org/opensearch/action/ActionRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/ActionRequestBuilder.java @@ -37,6 +37,11 @@ import java.util.Objects; +/** + * Base Action Request Builder + * + * @opensearch.internal + */ public abstract class ActionRequestBuilder { protected final ActionType action; diff --git a/server/src/main/java/org/opensearch/action/ActionRequestValidationException.java b/server/src/main/java/org/opensearch/action/ActionRequestValidationException.java index 7ada8cdc77f14..d7da932c4dfc2 100644 --- a/server/src/main/java/org/opensearch/action/ActionRequestValidationException.java +++ b/server/src/main/java/org/opensearch/action/ActionRequestValidationException.java @@ -34,4 +34,9 @@ import org.opensearch.common.ValidationException; +/** + * Base exception for an action request validation + * + * @opensearch.internal + */ public class ActionRequestValidationException extends ValidationException {} diff --git a/server/src/main/java/org/opensearch/action/ActionResponse.java b/server/src/main/java/org/opensearch/action/ActionResponse.java index 65008e7e0e279..c72fc87ccfaf8 100644 --- a/server/src/main/java/org/opensearch/action/ActionResponse.java +++ b/server/src/main/java/org/opensearch/action/ActionResponse.java @@ -39,6 +39,8 @@ /** * Base class for responses to action requests. + * + * @opensearch.internal */ public abstract class ActionResponse extends TransportResponse { diff --git a/server/src/main/java/org/opensearch/action/ActionRunnable.java b/server/src/main/java/org/opensearch/action/ActionRunnable.java index 84b04214e79ee..c718b33bd404a 100644 --- a/server/src/main/java/org/opensearch/action/ActionRunnable.java +++ b/server/src/main/java/org/opensearch/action/ActionRunnable.java @@ -40,6 +40,8 @@ /** * Base class for {@link Runnable}s that need to call {@link ActionListener#onFailure(Exception)} in case an uncaught * exception or error is thrown while the actual action is run. + * + * @opensearch.internal */ public abstract class ActionRunnable extends AbstractRunnable { diff --git a/server/src/main/java/org/opensearch/action/ActionType.java b/server/src/main/java/org/opensearch/action/ActionType.java index fbc9524ce4e52..9c17061990abe 100644 --- a/server/src/main/java/org/opensearch/action/ActionType.java +++ b/server/src/main/java/org/opensearch/action/ActionType.java @@ -38,6 +38,8 @@ /** * A generic action. Should strive to make it a singleton. + * + * @opensearch.internal */ public class ActionType { diff --git a/server/src/main/java/org/opensearch/action/AliasesRequest.java b/server/src/main/java/org/opensearch/action/AliasesRequest.java index a33db646cebba..4c5d5628b1aac 100644 --- a/server/src/main/java/org/opensearch/action/AliasesRequest.java +++ b/server/src/main/java/org/opensearch/action/AliasesRequest.java @@ -37,6 +37,8 @@ * one or more indices and one or more aliases. Meant to be used for aliases management requests (e.g. add/remove alias, * get aliases) that hold aliases and indices in separate fields. * Allows to retrieve which indices and aliases the action relates to. + * + * @opensearch.internal */ public interface AliasesRequest extends IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/CompositeIndicesRequest.java b/server/src/main/java/org/opensearch/action/CompositeIndicesRequest.java index 25ef0d220beec..1ec2350e713df 100644 --- a/server/src/main/java/org/opensearch/action/CompositeIndicesRequest.java +++ b/server/src/main/java/org/opensearch/action/CompositeIndicesRequest.java @@ -37,5 +37,7 @@ * multiple sub-requests which relate to one or more indices. A composite request is executed by its own transport action class * (e.g. {@link org.opensearch.action.search.TransportMultiSearchAction}), which goes through all sub-requests and delegates their * execution to the appropriate transport action (e.g. {@link org.opensearch.action.search.TransportSearchAction}) for each single item. + * + * @opensearch.internal */ public interface CompositeIndicesRequest {} diff --git a/server/src/main/java/org/opensearch/action/DocWriteRequest.java b/server/src/main/java/org/opensearch/action/DocWriteRequest.java index 11d645435c71c..a789189f9227e 100644 --- a/server/src/main/java/org/opensearch/action/DocWriteRequest.java +++ b/server/src/main/java/org/opensearch/action/DocWriteRequest.java @@ -53,6 +53,8 @@ /** * Generic interface to group ActionRequest, which perform writes to a single document * Action requests implementing this can be part of {@link org.opensearch.action.bulk.BulkRequest} + * + * @opensearch.internal */ public interface DocWriteRequest extends IndicesRequest, Accountable { diff --git a/server/src/main/java/org/opensearch/action/DocWriteResponse.java b/server/src/main/java/org/opensearch/action/DocWriteResponse.java index 587f93ed09f52..b55624ff514e4 100644 --- a/server/src/main/java/org/opensearch/action/DocWriteResponse.java +++ b/server/src/main/java/org/opensearch/action/DocWriteResponse.java @@ -63,6 +63,8 @@ /** * A base class for the response of a write operation that involves a single doc + * + * @opensearch.internal */ public abstract class DocWriteResponse extends ReplicationResponse implements WriteResponse, StatusToXContentObject { @@ -389,6 +391,8 @@ protected static void parseInnerToXContent(XContentParser parser, Builder contex * Base class of all {@link DocWriteResponse} builders. These {@link DocWriteResponse.Builder} are used during * xcontent parsing to temporarily store the parsed values, then the {@link Builder#build()} method is called to * instantiate the appropriate {@link DocWriteResponse} with the parsed values. + * + * @opensearch.internal */ public abstract static class Builder { diff --git a/server/src/main/java/org/opensearch/action/FailedNodeException.java b/server/src/main/java/org/opensearch/action/FailedNodeException.java index b4927d0b40a6a..268a8e370a155 100644 --- a/server/src/main/java/org/opensearch/action/FailedNodeException.java +++ b/server/src/main/java/org/opensearch/action/FailedNodeException.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Base exception for a failed node + * + * @opensearch.internal + */ public class FailedNodeException extends OpenSearchException { private final String nodeId; diff --git a/server/src/main/java/org/opensearch/action/IndicesRequest.java b/server/src/main/java/org/opensearch/action/IndicesRequest.java index 18da6ed0f62b2..d2e4504dd7db1 100644 --- a/server/src/main/java/org/opensearch/action/IndicesRequest.java +++ b/server/src/main/java/org/opensearch/action/IndicesRequest.java @@ -39,6 +39,8 @@ * one or more indices. Allows to retrieve which indices the action relates to. * In case of internal requests originated during the distributed execution of an external request, * they will still return the indices that the original request related to. + * + * @opensearch.internal */ public interface IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/LatchedActionListener.java b/server/src/main/java/org/opensearch/action/LatchedActionListener.java index 4a79cfd898a85..57d5c9282465f 100644 --- a/server/src/main/java/org/opensearch/action/LatchedActionListener.java +++ b/server/src/main/java/org/opensearch/action/LatchedActionListener.java @@ -37,6 +37,8 @@ /** * An action listener that allows passing in a {@link CountDownLatch} that * will be counted down after onResponse or onFailure is called + * + * @opensearch.internal */ public class LatchedActionListener implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/ListenableActionFuture.java b/server/src/main/java/org/opensearch/action/ListenableActionFuture.java index 9c8510a06173c..95bf3a2ae1384 100644 --- a/server/src/main/java/org/opensearch/action/ListenableActionFuture.java +++ b/server/src/main/java/org/opensearch/action/ListenableActionFuture.java @@ -35,7 +35,7 @@ /** * An {@link ActionFuture} that listeners can be added to. * - * + * @opensearch.internal */ public interface ListenableActionFuture extends ActionFuture { diff --git a/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java b/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java index 4e1571d8007f6..8cb6ff5c9de81 100644 --- a/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java +++ b/server/src/main/java/org/opensearch/action/NoShardAvailableActionException.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Base exception for no shard available + * + * @opensearch.internal + */ public class NoShardAvailableActionException extends OpenSearchException { public NoShardAvailableActionException(ShardId shardId) { diff --git a/server/src/main/java/org/opensearch/action/NoSuchNodeException.java b/server/src/main/java/org/opensearch/action/NoSuchNodeException.java index 898a3d124111c..3889809b7f186 100644 --- a/server/src/main/java/org/opensearch/action/NoSuchNodeException.java +++ b/server/src/main/java/org/opensearch/action/NoSuchNodeException.java @@ -36,6 +36,11 @@ import java.io.IOException; +/** + * Base exception for no node found + * + * @opensearch.internal + */ public class NoSuchNodeException extends FailedNodeException { public NoSuchNodeException(String nodeId) { diff --git a/server/src/main/java/org/opensearch/action/NotifyOnceListener.java b/server/src/main/java/org/opensearch/action/NotifyOnceListener.java index 4935c34daa284..cc625962e54f6 100644 --- a/server/src/main/java/org/opensearch/action/NotifyOnceListener.java +++ b/server/src/main/java/org/opensearch/action/NotifyOnceListener.java @@ -38,6 +38,8 @@ * A listener that ensures that only one of onResponse or onFailure is called. And the method * the is called is only called once. Subclasses should implement notification logic with * innerOnResponse and innerOnFailure. + * + * @opensearch.internal */ public abstract class NotifyOnceListener implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/OriginalIndices.java b/server/src/main/java/org/opensearch/action/OriginalIndices.java index 759585fb499a0..96103b1eab0e2 100644 --- a/server/src/main/java/org/opensearch/action/OriginalIndices.java +++ b/server/src/main/java/org/opensearch/action/OriginalIndices.java @@ -41,6 +41,8 @@ /** * Used to keep track of original indices within internal (e.g. shard level) requests + * + * @opensearch.internal */ public final class OriginalIndices implements IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/PrimaryMissingActionException.java b/server/src/main/java/org/opensearch/action/PrimaryMissingActionException.java index 57ae5056d6cd9..95d82d1f43c7b 100644 --- a/server/src/main/java/org/opensearch/action/PrimaryMissingActionException.java +++ b/server/src/main/java/org/opensearch/action/PrimaryMissingActionException.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Base exception for a missing action on a primary + * + * @opensearch.internal + */ public class PrimaryMissingActionException extends OpenSearchException { public PrimaryMissingActionException(String message) { diff --git a/server/src/main/java/org/opensearch/action/RealtimeRequest.java b/server/src/main/java/org/opensearch/action/RealtimeRequest.java index 37865a6cbff8d..0ceb79ec903d9 100644 --- a/server/src/main/java/org/opensearch/action/RealtimeRequest.java +++ b/server/src/main/java/org/opensearch/action/RealtimeRequest.java @@ -35,6 +35,8 @@ /** * Indicates that a request can execute in realtime (reads from the translog). * All {@link ActionRequest} that are realtime should implement this interface. + * + * @opensearch.internal */ public interface RealtimeRequest { diff --git a/server/src/main/java/org/opensearch/action/RequestValidators.java b/server/src/main/java/org/opensearch/action/RequestValidators.java index 44245c0906882..d3ec4ba2f0017 100644 --- a/server/src/main/java/org/opensearch/action/RequestValidators.java +++ b/server/src/main/java/org/opensearch/action/RequestValidators.java @@ -38,6 +38,11 @@ import java.util.Collection; import java.util.Optional; +/** + * Validates transport requests + * + * @opensearch.internal + */ public class RequestValidators { private final Collection> validators; diff --git a/server/src/main/java/org/opensearch/action/RoutingMissingException.java b/server/src/main/java/org/opensearch/action/RoutingMissingException.java index 4f34a7847da4d..18b2dfb89b381 100644 --- a/server/src/main/java/org/opensearch/action/RoutingMissingException.java +++ b/server/src/main/java/org/opensearch/action/RoutingMissingException.java @@ -41,6 +41,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Base exception for a missing routing + * + * @opensearch.internal + */ public class RoutingMissingException extends OpenSearchException { private final String type; diff --git a/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java b/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java index f1f134c19115d..f1d1afc46105e 100644 --- a/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java +++ b/server/src/main/java/org/opensearch/action/ShardOperationFailedException.java @@ -42,6 +42,7 @@ /** * An exception indicating that a failure occurred performing an operation on the shard. * + * @opensearch.internal */ public abstract class ShardOperationFailedException implements Writeable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/StepListener.java b/server/src/main/java/org/opensearch/action/StepListener.java index 9547494c753c2..b99fe20a46ed8 100644 --- a/server/src/main/java/org/opensearch/action/StepListener.java +++ b/server/src/main/java/org/opensearch/action/StepListener.java @@ -61,6 +61,8 @@ * }, flowListener::onFailure); * } * } + * + * @opensearch.internal */ public final class StepListener extends NotifyOnceListener { diff --git a/server/src/main/java/org/opensearch/action/TaskOperationFailure.java b/server/src/main/java/org/opensearch/action/TaskOperationFailure.java index 09895e5f46db4..b2601d9693d83 100644 --- a/server/src/main/java/org/opensearch/action/TaskOperationFailure.java +++ b/server/src/main/java/org/opensearch/action/TaskOperationFailure.java @@ -52,6 +52,8 @@ * Information about task operation failures * * The class is final due to serialization limitations + * + * @opensearch.internal */ public final class TaskOperationFailure implements Writeable, ToXContentFragment { private static final String TASK_ID = "task_id"; diff --git a/server/src/main/java/org/opensearch/action/ThreadingModel.java b/server/src/main/java/org/opensearch/action/ThreadingModel.java index 93e96836941e4..11c61152e5107 100644 --- a/server/src/main/java/org/opensearch/action/ThreadingModel.java +++ b/server/src/main/java/org/opensearch/action/ThreadingModel.java @@ -32,6 +32,11 @@ package org.opensearch.action; +/** + * Threading model + * + * @opensearch.internal + */ public enum ThreadingModel { NONE((byte) 0), OPERATION((byte) 1), diff --git a/server/src/main/java/org/opensearch/action/TimestampParsingException.java b/server/src/main/java/org/opensearch/action/TimestampParsingException.java index f6a0207f22db7..7cebdccdbef34 100644 --- a/server/src/main/java/org/opensearch/action/TimestampParsingException.java +++ b/server/src/main/java/org/opensearch/action/TimestampParsingException.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Base exception for a failed timestamp parse + * + * @opensearch.internal + */ public class TimestampParsingException extends OpenSearchException { private final String timestamp; diff --git a/server/src/main/java/org/opensearch/action/TransportActionNodeProxy.java b/server/src/main/java/org/opensearch/action/TransportActionNodeProxy.java index 8c6838b186fca..a04e89d9a1f8f 100644 --- a/server/src/main/java/org/opensearch/action/TransportActionNodeProxy.java +++ b/server/src/main/java/org/opensearch/action/TransportActionNodeProxy.java @@ -39,6 +39,8 @@ /** * A generic proxy that will execute the given action against a specific node. + * + * @opensearch.internal */ public class TransportActionNodeProxy { diff --git a/server/src/main/java/org/opensearch/action/UnavailableShardsException.java b/server/src/main/java/org/opensearch/action/UnavailableShardsException.java index a6050ae9a3c75..75fde3828e904 100644 --- a/server/src/main/java/org/opensearch/action/UnavailableShardsException.java +++ b/server/src/main/java/org/opensearch/action/UnavailableShardsException.java @@ -40,6 +40,11 @@ import java.io.IOException; +/** + * Base exception for shards unavailable + * + * @opensearch.internal + */ public class UnavailableShardsException extends OpenSearchException { public UnavailableShardsException(@Nullable ShardId shardId, String message, Object... args) { diff --git a/server/src/main/java/org/opensearch/action/ValidateActions.java b/server/src/main/java/org/opensearch/action/ValidateActions.java index 134a880c7a972..1d1591ae3049b 100644 --- a/server/src/main/java/org/opensearch/action/ValidateActions.java +++ b/server/src/main/java/org/opensearch/action/ValidateActions.java @@ -32,6 +32,11 @@ package org.opensearch.action; +/** + * Validates transport actions + * + * @opensearch.internal + */ public class ValidateActions { public static ActionRequestValidationException addValidationError(String error, ActionRequestValidationException validationException) { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainAction.java index 4c95d1e336b3a..0e99513a8fc7e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainAction.java @@ -36,6 +36,8 @@ /** * ActionType for explaining shard allocation for a shard in the cluster + * + * @opensearch.internal */ public class ClusterAllocationExplainAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java index 1a055fa0d14c2..0102cc517dbcd 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java @@ -47,6 +47,8 @@ /** * A request to explain the allocation of a shard in the cluster + * + * @opensearch.internal */ public class ClusterAllocationExplainRequest extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java index 78a22cd59b284..240520241c42b 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java @@ -37,6 +37,8 @@ /** * Builder for requests to explain the allocation of a shard in the cluster + * + * @opensearch.internal */ public class ClusterAllocationExplainRequestBuilder extends MasterNodeOperationRequestBuilder< ClusterAllocationExplainRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainResponse.java index 2fc72ccb13e28..5ce26aba3b395 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainResponse.java @@ -40,6 +40,8 @@ /** * Explanation response for a shard in the cluster + * + * @opensearch.internal */ public class ClusterAllocationExplainResponse extends ActionResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java index e9505c7fc83c2..e0fb92560ebf4 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java @@ -57,6 +57,8 @@ * A {@code ClusterAllocationExplanation} is an explanation of why a shard is unassigned, * or if it is not unassigned, then which nodes it could possibly be relocated to. * It is an immutable class. + * + * @opensearch.internal */ public final class ClusterAllocationExplanation implements ToXContentObject, Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java index baa2ce0847501..233cc506a32c1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java @@ -65,6 +65,8 @@ /** * The {@code TransportClusterAllocationExplainAction} is responsible for actually executing the explanation of a shard's allocation on the * cluster-manager node in the cluster. + * + * @opensearch.internal */ public class TransportClusterAllocationExplainAction extends TransportMasterNodeAction< ClusterAllocationExplainRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/allocation/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/package-info.java new file mode 100644 index 0000000000000..ef38d39ede82a --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/allocation/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster allocation transport handlers. */ +package org.opensearch.action.admin.cluster.allocation; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsAction.java index 963a5d567c0bc..4a4f28b360801 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsAction.java @@ -33,7 +33,12 @@ import org.opensearch.action.ActionType; -public class AddVotingConfigExclusionsAction extends ActionType { +/** + * Transport endpoint for adding exclusions to voting config + * + * @opensearch.internal + */ +public final class AddVotingConfigExclusionsAction extends ActionType { public static final AddVotingConfigExclusionsAction INSTANCE = new AddVotingConfigExclusionsAction(); public static final String NAME = "cluster:admin/voting_config/add_exclusions"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java index e0e5bf622b99e..ba44fdfeb8ff6 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java @@ -56,6 +56,8 @@ /** * A request to add voting config exclusions for certain cluster-manager-eligible nodes, and wait for these nodes to be removed from the voting * configuration. + * + * @opensearch.internal */ public class AddVotingConfigExclusionsRequest extends MasterNodeRequest { public static final String DEPRECATION_MESSAGE = "nodeDescription is deprecated and will be removed, use nodeIds or nodeNames instead"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsResponse.java index 0493de7c439de..22b2d54bfd69d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsResponse.java @@ -42,6 +42,8 @@ /** * A response to {@link AddVotingConfigExclusionsRequest} indicating that voting config exclusions have been added for the requested nodes * and these nodes have been removed from the voting configuration. + * + * @opensearch.internal */ public class AddVotingConfigExclusionsResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsAction.java index ce31abceb6738..e0fcad8f8ccd8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsAction.java @@ -33,6 +33,11 @@ import org.opensearch.action.ActionType; +/** + * Transport endpoint for clearing exclusions to voting config + * + * @opensearch.internal + */ public class ClearVotingConfigExclusionsAction extends ActionType { public static final ClearVotingConfigExclusionsAction INSTANCE = new ClearVotingConfigExclusionsAction(); public static final String NAME = "cluster:admin/voting_config/clear_exclusions"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsRequest.java index 9ccccc88f3365..cbe19abe069b2 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsRequest.java @@ -42,6 +42,8 @@ /** * A request to clear the voting config exclusions from the cluster state, optionally waiting for these nodes to be removed from the * cluster first. + * + * @opensearch.internal */ public class ClearVotingConfigExclusionsRequest extends MasterNodeRequest { private boolean waitForRemoval = true; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsResponse.java index ed07f33b6c6a6..a8744bc8f666f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/ClearVotingConfigExclusionsResponse.java @@ -42,6 +42,8 @@ /** * A response to {@link ClearVotingConfigExclusionsRequest} indicating that voting config exclusions have been cleared from the * cluster state. + * + * @opensearch.internal */ public class ClearVotingConfigExclusionsResponse extends ActionResponse implements ToXContentObject { public ClearVotingConfigExclusionsResponse() {} diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java index 30ba799db044a..c9b27f4822fcd 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java @@ -66,6 +66,11 @@ import java.util.function.Predicate; import java.util.stream.Collectors; +/** + * Transport endpoint action for adding exclusions to voting config + * + * @opensearch.internal + */ public class TransportAddVotingConfigExclusionsAction extends TransportMasterNodeAction< AddVotingConfigExclusionsRequest, AddVotingConfigExclusionsResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java index 31a1d07608071..3791b3e8301ee 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java @@ -60,6 +60,11 @@ import java.io.IOException; import java.util.function.Predicate; +/** + * Transport endpoint action for clearing exclusions to voting config + * + * @opensearch.internal + */ public class TransportClearVotingConfigExclusionsAction extends TransportMasterNodeAction< ClearVotingConfigExclusionsRequest, ClearVotingConfigExclusionsResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/package-info.java new file mode 100644 index 0000000000000..5543e7a6bde2f --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster configuration transport handlers. */ +package org.opensearch.action.admin.cluster.configuration; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthAction.java index a37c0b0f1cb88..5c712b801f927 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport endpoint action for obtaining cluster health + * + * @opensearch.internal + */ public class ClusterHealthAction extends ActionType { public static final ClusterHealthAction INSTANCE = new ClusterHealthAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java index 204a182edafab..d6d494c4261bd 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -48,6 +48,11 @@ import java.util.Objects; import java.util.concurrent.TimeUnit; +/** + * Transport request for requesting cluster health + * + * @opensearch.internal + */ public class ClusterHealthRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java index 86fee83130bb3..d1e68e0a22510 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java @@ -40,6 +40,11 @@ import org.opensearch.common.Priority; import org.opensearch.common.unit.TimeValue; +/** + * Builder for requesting cluster health + * + * @opensearch.internal + */ public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestBuilder< ClusterHealthRequest, ClusterHealthResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java index ce731fd1c8aca..e4ec75fb7045a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthResponse.java @@ -60,6 +60,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * Transport response for Cluster Health + * + * @opensearch.internal + */ public class ClusterHealthResponse extends ActionResponse implements StatusToXContentObject { private static final String CLUSTER_NAME = "cluster_name"; private static final String STATUS = "status"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/TransportClusterHealthAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/TransportClusterHealthAction.java index 98c264e54a1d0..09082536dfbbb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/TransportClusterHealthAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/TransportClusterHealthAction.java @@ -67,6 +67,11 @@ import java.util.function.Consumer; import java.util.function.Predicate; +/** + * Transport action for obtaining Cluster Health + * + * @opensearch.internal + */ public class TransportClusterHealthAction extends TransportMasterNodeReadAction { private static final Logger logger = LogManager.getLogger(TransportClusterHealthAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/package-info.java new file mode 100644 index 0000000000000..7512ea5cdaafb --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Health transport handlers. */ +package org.opensearch.action.admin.cluster.health; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java index 7d873bd22719d..7de148b0a1000 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport for OpenSearch Hot Threads + * + * @opensearch.internal + */ public class NodeHotThreads extends BaseNodeResponse { private String hotThreads; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsAction.java index 1a09bccf0b34e..64689b2e3bc6d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for requesting OpenSearch Hot Threads + * + * @opensearch.internal + */ public class NodesHotThreadsAction extends ActionType { public static final NodesHotThreadsAction INSTANCE = new NodesHotThreadsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java index 5f5c566e7b6d2..34d0d812ae609 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; +/** + * Transport request for OpenSearch Hot Threads + * + * @opensearch.internal + */ public class NodesHotThreadsRequest extends BaseNodesRequest { int threads = 3; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java index 54a99de61c854..3639439dd3fb8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.unit.TimeValue; +/** + * Builder class for requesting OpenSearch Hot Threads + * + * @opensearch.internal + */ public class NodesHotThreadsRequestBuilder extends NodesOperationRequestBuilder< NodesHotThreadsRequest, NodesHotThreadsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java index 62c73101eddbb..a5789cee8b740 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java @@ -41,6 +41,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport response for OpenSearch Hot Threads + * + * @opensearch.internal + */ public class NodesHotThreadsResponse extends BaseNodesResponse { public NodesHotThreadsResponse(StreamInput in) throws IOException { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java index 4c4519c890d90..e8429580ec887 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java @@ -48,6 +48,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport action for OpenSearch Hot Threads + * + * @opensearch.internal + */ public class TransportNodesHotThreadsAction extends TransportNodesAction< NodesHotThreadsRequest, NodesHotThreadsResponse, @@ -107,6 +112,11 @@ protected NodeHotThreads nodeOperation(NodeRequest request) { } } + /** + * Inner node request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { NodesHotThreadsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/package-info.java new file mode 100644 index 0000000000000..a7e6b7c897fe5 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Hot threads at node level transport handlers. */ +package org.opensearch.action.admin.cluster.node.hotthreads; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodeInfo.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodeInfo.java index ddef959e66473..192815af1908f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodeInfo.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodeInfo.java @@ -58,6 +58,8 @@ /** * Node information (static, does not change over time). + * + * @opensearch.internal */ public class NodeInfo extends BaseNodeResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoAction.java index 6850cbee55412..ea0c9d9d7f3c9 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for OpenSearch Node Information + * + * @opensearch.internal + */ public class NodesInfoAction extends ActionType { public static final NodesInfoAction INSTANCE = new NodesInfoAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java index 4024c9b0c12a9..d51be9bc27ac9 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequest.java @@ -47,6 +47,8 @@ /** * A request to get node (cluster) level information. + * + * @opensearch.internal */ public class NodesInfoRequest extends BaseNodesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java index 179239cac5257..76ef75b77a1cf 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.nodes.NodesOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport action for OpenSearch Node Information + * + * @opensearch.internal + */ public class NodesInfoRequestBuilder extends NodesOperationRequestBuilder { public NodesInfoRequestBuilder(OpenSearchClient client, NodesInfoAction action) { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java index a483a2fa1f845..08ca022b026ee 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java @@ -56,6 +56,11 @@ import java.util.List; import java.util.Map; +/** + * Transport response for OpenSearch Node Information + * + * @opensearch.internal + */ public class NodesInfoResponse extends BaseNodesResponse implements ToXContentFragment { public NodesInfoResponse(StreamInput in) throws IOException { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/PluginsAndModules.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/PluginsAndModules.java index a51a0ab7b6ea6..b2d94b7a97c22 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/PluginsAndModules.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/PluginsAndModules.java @@ -46,6 +46,8 @@ /** * Information about plugins and modules + * + * @opensearch.internal */ public class PluginsAndModules implements ReportingService.Info { private final List plugins; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java index 52f53f4c1368e..7bcf83ba28111 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java @@ -48,6 +48,11 @@ import java.util.List; import java.util.Set; +/** + * Transport action for OpenSearch Node Information + * + * @opensearch.internal + */ public class TransportNodesInfoAction extends TransportNodesAction< NodesInfoRequest, NodesInfoResponse, @@ -116,6 +121,11 @@ protected NodeInfo nodeOperation(NodeInfoRequest nodeRequest) { ); } + /** + * Inner Node Info Request + * + * @opensearch.internal + */ public static class NodeInfoRequest extends BaseNodeRequest { NodesInfoRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/package-info.java new file mode 100644 index 0000000000000..4203adc8ed2d6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node Info transport handlers. */ +package org.opensearch.action.admin.cluster.node.info; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessRequest.java index c75e020c269eb..fc67ccb0f5574 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessRequest.java @@ -40,6 +40,8 @@ /** * Transport level private response for the transport handler registered under * {@value TransportLivenessAction#NAME} + * + * @opensearch.internal */ public final class LivenessRequest extends ActionRequest { public LivenessRequest() {} diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessResponse.java index 1737d868f0afb..8fdbf66f10e64 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/LivenessResponse.java @@ -43,6 +43,8 @@ /** * Transport level private response for the transport handler registered under * {@value TransportLivenessAction#NAME} + * + * @opensearch.internal */ public final class LivenessResponse extends ActionResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/TransportLivenessAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/TransportLivenessAction.java index 83f945ab85557..8a075cbee6e90 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/TransportLivenessAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/TransportLivenessAction.java @@ -40,6 +40,11 @@ import org.opensearch.transport.TransportRequestHandler; import org.opensearch.transport.TransportService; +/** + * Transport action for OpenSearch Node Liveness + * + * @opensearch.internal + */ public final class TransportLivenessAction implements TransportRequestHandler { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/package-info.java new file mode 100644 index 0000000000000..97dae1e4a4ef4 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/liveness/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node liveness transport handlers. */ +package org.opensearch.action.admin.cluster.node.liveness; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/package-info.java new file mode 100644 index 0000000000000..f92091587eb04 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node level transport handlers. */ +package org.opensearch.action.admin.cluster.node; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsAction.java index 252c4491bc56c..0f7c847582349 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for reloading OpenSearch Secure Settings + * + * @opensearch.internal + */ public class NodesReloadSecureSettingsAction extends ActionType { public static final NodesReloadSecureSettingsAction INSTANCE = new NodesReloadSecureSettingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequest.java index 5a6c4c2ae7c83..e31f5f304c836 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequest.java @@ -49,6 +49,8 @@ /** * Request for a reload secure settings action + * + * @opensearch.internal */ public class NodesReloadSecureSettingsRequest extends BaseNodesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java index 8bb67f5042893..36a4a22460126 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java @@ -38,6 +38,8 @@ /** * Builder for the reload secure settings nodes request + * + * @opensearch.internal */ public class NodesReloadSecureSettingsRequestBuilder extends NodesOperationRequestBuilder< NodesReloadSecureSettingsRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java index 9dd8596b86260..9325b2febcd1e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java @@ -49,6 +49,8 @@ /** * The response for the reload secure settings action + * + * @opensearch.internal */ public class NodesReloadSecureSettingsResponse extends BaseNodesResponse implements @@ -103,6 +105,11 @@ public String toString() { } } + /** + * Inner Node Response + * + * @opensearch.internal + */ public static class NodeResponse extends BaseNodeResponse { private Exception reloadException = null; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java index d4e1a936263c9..d7ad4357fa046 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java @@ -60,6 +60,11 @@ import java.util.ArrayList; import java.util.List; +/** + * Transport action for reloading OpenSearch Secure Settings + * + * @opensearch.internal + */ public class TransportNodesReloadSecureSettingsAction extends TransportNodesAction< NodesReloadSecureSettingsRequest, NodesReloadSecureSettingsResponse, @@ -178,6 +183,11 @@ protected NodesReloadSecureSettingsResponse.NodeResponse nodeOperation(NodeReque } } + /** + * Inner Node Request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { NodesReloadSecureSettingsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/package-info.java new file mode 100644 index 0000000000000..a2ddf57796a4a --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node reloading secured settings transport handlers. */ +package org.opensearch.action.admin.cluster.node.reload; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java index dd2c649e07c28..7f0ac615cc449 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java @@ -64,6 +64,8 @@ /** * Node statistics (dynamic, changes depending on when created). + * + * @opensearch.internal */ public class NodeStats extends BaseNodeResponse implements ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsAction.java index 77bb141966651..fc039778f05af 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for obtaining OpenSearch Node Stats + * + * @opensearch.internal + */ public class NodesStatsAction extends ActionType { public static final NodesStatsAction INSTANCE = new NodesStatsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java index 2ebf2ca424c27..babec0b7c119f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java @@ -47,6 +47,8 @@ /** * A request to get node (cluster) level stats. + * + * @opensearch.internal */ public class NodesStatsRequest extends BaseNodesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java index 40d6946823727..e382278f5ddb8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.action.support.nodes.NodesOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport builder for obtaining OpenSearch Node Stats + * + * @opensearch.internal + */ public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder< NodesStatsRequest, NodesStatsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsResponse.java index 8c84775e356c4..8ba39b6e0b8f4 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsResponse.java @@ -45,6 +45,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport response for obtaining OpenSearch Node Stats + * + * @opensearch.internal + */ public class NodesStatsResponse extends BaseNodesResponse implements ToXContentFragment { public NodesStatsResponse(StreamInput in) throws IOException { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java index b7ea714de4eb4..644c7f02d45f0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java @@ -48,6 +48,11 @@ import java.util.List; import java.util.Set; +/** + * Transport action for obtaining OpenSearch Node Stats + * + * @opensearch.internal + */ public class TransportNodesStatsAction extends TransportNodesAction< NodesStatsRequest, NodesStatsResponse, @@ -117,6 +122,11 @@ protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) { ); } + /** + * Inner Node Stats Request + * + * @opensearch.internal + */ public static class NodeStatsRequest extends BaseNodeRequest { NodesStatsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/package-info.java new file mode 100644 index 0000000000000..14efa77f066d6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node Stats transport handlers. */ +package org.opensearch.action.admin.cluster.node.stats; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksAction.java index 6d6098adaa92c..d4f6dc39c93f7 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksAction.java @@ -36,6 +36,8 @@ /** * ActionType for cancelling running tasks + * + * @opensearch.internal */ public class CancelTasksAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequest.java index ea7e225051b80..a4b24a7a91f1f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequest.java @@ -44,6 +44,8 @@ /** * A request to cancel tasks + * + * @opensearch.internal */ public class CancelTasksRequest extends BaseTasksRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java index c0686f166c859..ee19e8b104603 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java @@ -37,6 +37,8 @@ /** * Builder for the request to cancel tasks running on the specified nodes + * + * @opensearch.internal */ public class CancelTasksRequestBuilder extends TasksRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksResponse.java index 056463b85fe80..78aea59bcd10e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/CancelTasksResponse.java @@ -47,6 +47,8 @@ /** * Returns the list of tasks that were cancelled + * + * @opensearch.internal */ public class CancelTasksResponse extends ListTasksResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java index 963ebe24ae8e2..909fb009aa100 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java @@ -54,6 +54,8 @@ *

* For a task to be cancellable it has to return an instance of * {@link CancellableTask} from {@link TransportRequest#createTask} + * + * @opensearch.internal */ public class TransportCancelTasksAction extends TransportTasksAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/package-info.java new file mode 100644 index 0000000000000..898aa26d16792 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/cancel/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler for Cancelling Node Tasks */ +package org.opensearch.action.admin.cluster.node.tasks.cancel; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskAction.java index 4297e911d6bde..3b429d61c31b3 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskAction.java @@ -36,6 +36,8 @@ /** * ActionType for retrieving a list of currently running tasks + * + * @opensearch.internal */ public class GetTaskAction extends ActionType { public static final String TASKS_ORIGIN = "tasks"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequest.java index a8fee2dc22d30..663fe51f35adc 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequest.java @@ -45,6 +45,8 @@ /** * A request to get node tasks + * + * @opensearch.internal */ public class GetTaskRequest extends ActionRequest { private TaskId taskId = TaskId.EMPTY_TASK_ID; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java index d7d0be125bee3..17b2a21b2863b 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java @@ -39,6 +39,8 @@ /** * Builder for the request to retrieve the list of tasks running on the specified nodes + * + * @opensearch.internal */ public class GetTaskRequestBuilder extends ActionRequestBuilder { public GetTaskRequestBuilder(OpenSearchClient client, GetTaskAction action) { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskResponse.java index 32d7062449a71..1097831113971 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskResponse.java @@ -46,6 +46,8 @@ /** * Returns the list of tasks currently running on the nodes + * + * @opensearch.internal */ public class GetTaskResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/TransportGetTaskAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/TransportGetTaskAction.java index 80049b5e30fdf..0d6926fe9a2fa 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/TransportGetTaskAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/TransportGetTaskAction.java @@ -74,6 +74,8 @@ *

  • Look up the task and return it if it exists *
  • If it doesn't then look up the task from the results index * + * + * @opensearch.internal */ public class TransportGetTaskAction extends HandledTransportAction { private final ThreadPool threadPool; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/package-info.java new file mode 100644 index 0000000000000..0eb044c2a29eb --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handlers for getting Node Tasks. */ +package org.opensearch.action.admin.cluster.node.tasks.get; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksAction.java index 76c07cd570622..7c8b83ad9c913 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksAction.java @@ -36,6 +36,8 @@ /** * ActionType for retrieving a list of currently running tasks + * + * @opensearch.internal */ public class ListTasksAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequest.java index 4f1a5765d1eea..decd26e3058f5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequest.java @@ -40,6 +40,8 @@ /** * A request to get node tasks + * + * @opensearch.internal */ public class ListTasksRequest extends BaseTasksRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java index dc10fb99e90b9..45beb0dd899b5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java @@ -37,6 +37,8 @@ /** * Builder for the request to retrieve the list of tasks running on the specified nodes + * + * @opensearch.internal */ public class ListTasksRequestBuilder extends TasksRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java index db0b1491fd693..8d2ad55df1a8c 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/ListTasksResponse.java @@ -62,6 +62,8 @@ /** * Returns the list of tasks currently running on the nodes + * + * @opensearch.internal */ public class ListTasksResponse extends BaseTasksResponse implements ToXContentObject { private static final String TASKS = "tasks"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java index 6d1d96bfd7869..ee2f157c7c034 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java @@ -44,6 +44,8 @@ /** * Information about a currently running task and all its subtasks. + * + * @opensearch.internal */ public class TaskGroup implements ToXContentObject { @@ -60,6 +62,11 @@ public static Builder builder(TaskInfo taskInfo) { return new Builder(taskInfo); } + /** + * Builder for the Task Group + * + * @opensearch.internal + */ public static class Builder { private TaskInfo taskInfo; private List childTasks; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TransportListTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TransportListTasksAction.java index b7875c5f99774..796ea023edd40 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TransportListTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TransportListTasksAction.java @@ -50,6 +50,11 @@ import static org.opensearch.common.unit.TimeValue.timeValueSeconds; +/** + * Transport action for listing tasks currently running on the nodes + * + * @opensearch.internal + */ public class TransportListTasksAction extends TransportTasksAction { public static long waitForCompletionTimeout(TimeValue timeout) { if (timeout == null) { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/package-info.java new file mode 100644 index 0000000000000..df84d7fe19d02 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handlers for listing node tasks. */ +package org.opensearch.action.admin.cluster.node.tasks.list; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/package-info.java new file mode 100644 index 0000000000000..9d809646460f2 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node tasks transport handlers. */ +package org.opensearch.action.admin.cluster.node.tasks; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodeUsage.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodeUsage.java index 2094861185b50..58e43ca9f3568 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodeUsage.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodeUsage.java @@ -43,6 +43,11 @@ import java.io.IOException; import java.util.Map; +/** + * Concrete class for collecting OpenSearch telemetry + * + * @opensearch.internal + */ public class NodeUsage extends BaseNodeResponse implements ToXContentFragment { private final long timestamp; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageAction.java index 2a3c6be6e0bbe..8a3aec7679709 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for collecting OpenSearch telemetry + * + * @opensearch.internal + */ public class NodesUsageAction extends ActionType { public static final NodesUsageAction INSTANCE = new NodesUsageAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequest.java index 0a94f2a9bfca7..01f66bd843642 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport request for collecting OpenSearch telemetry + * + * @opensearch.internal + */ public class NodesUsageRequest extends BaseNodesRequest { private boolean restActions; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java index fefccf4368230..7d1823b59dc04 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.action.support.nodes.NodesOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport builder for collecting OpenSearch telemetry + * + * @opensearch.internal + */ public class NodesUsageRequestBuilder extends NodesOperationRequestBuilder< NodesUsageRequest, NodesUsageResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageResponse.java index d3e5aeea72193..77b6cf067a1d2 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/NodesUsageResponse.java @@ -48,6 +48,8 @@ /** * The response for the nodes usage api which contains the individual usage * statistics for all nodes queried. + * + * @opensearch.internal */ public class NodesUsageResponse extends BaseNodesResponse implements ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java index 207a5eb41c85d..c7612f7e15838 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java @@ -49,6 +49,11 @@ import java.util.List; import java.util.Map; +/** + * Transport action for collecting OpenSearch telemetry + * + * @opensearch.internal + */ public class TransportNodesUsageAction extends TransportNodesAction< NodesUsageRequest, NodesUsageResponse, @@ -107,6 +112,11 @@ protected NodeUsage nodeOperation(NodeUsageRequest nodeUsageRequest) { return new NodeUsage(clusterService.localNode(), System.currentTimeMillis(), sinceTime, restUsage, aggsUsage); } + /** + * Inner Node Usage Request + * + * @opensearch.internal + */ public static class NodeUsageRequest extends BaseNodeRequest { NodesUsageRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/package-info.java new file mode 100644 index 0000000000000..37943b23dbe10 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node Usage transport handlers. */ +package org.opensearch.action.admin.cluster.node.usage; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoAction.java index 099b3abc7438c..55f75a142a53c 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for remote monitoring + * + * @opensearch.internal + */ public final class RemoteInfoAction extends ActionType { public static final String NAME = "cluster:monitor/remote/info"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequest.java index c140a639ac3ae..e022ef504bd46 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request for remote monitoring + * + * @opensearch.internal + */ public final class RemoteInfoRequest extends ActionRequest { public RemoteInfoRequest() {} diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java index 5fceced383731..03fd2a3f778ec 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport builder for remote monitoring + * + * @opensearch.internal + */ public final class RemoteInfoRequestBuilder extends ActionRequestBuilder { public RemoteInfoRequestBuilder(OpenSearchClient client, RemoteInfoAction action) { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoResponse.java index 415e71e6d1010..08ff58d6cbee1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/RemoteInfoResponse.java @@ -45,6 +45,11 @@ import java.util.Collections; import java.util.List; +/** + * Transport response for remote monitoring + * + * @opensearch.internal + */ public final class RemoteInfoResponse extends ActionResponse implements ToXContentObject { private List infos; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/TransportRemoteInfoAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/TransportRemoteInfoAction.java index 10b1917b0c94b..794d21f1cbc7c 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/remote/TransportRemoteInfoAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/TransportRemoteInfoAction.java @@ -43,6 +43,11 @@ import static java.util.stream.Collectors.toList; +/** + * Transport action for remote monitoring + * + * @opensearch.internal + */ public final class TransportRemoteInfoAction extends HandledTransportAction { private final RemoteClusterService remoteClusterService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/remote/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/remote/package-info.java new file mode 100644 index 0000000000000..e5be56ff1d139 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/remote/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Remote Node Information transport handlers. */ +package org.opensearch.action.admin.cluster.remote; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryAction.java index 4feb755c3e5a1..0ec1281648cdb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryAction.java @@ -33,6 +33,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for cleaning up snapshot repositories + * + * @opensearch.internal + */ public final class CleanupRepositoryAction extends ActionType { public static final CleanupRepositoryAction INSTANCE = new CleanupRepositoryAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequest.java index d1fc914201390..0f265681cd241 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequest.java @@ -40,6 +40,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for cleaning up snapshot repositories + * + * @opensearch.internal + */ public class CleanupRepositoryRequest extends AcknowledgedRequest { private String repository; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java index b5db8d7eca669..fc5365e7e836d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport builder for cleaning up snapshot repositories + * + * @opensearch.internal + */ public class CleanupRepositoryRequestBuilder extends MasterNodeOperationRequestBuilder< CleanupRepositoryRequest, CleanupRepositoryResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryResponse.java index e6bb65e732082..3f6c9000dedac 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryResponse.java @@ -43,6 +43,11 @@ import java.io.IOException; +/** + * Transport response for cleaning up snapshot repositories + * + * @opensearch.internal + */ public final class CleanupRepositoryResponse extends ActionResponse implements ToXContentObject { private static final ObjectParser PARSER = new ObjectParser<>( diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/TransportCleanupRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/TransportCleanupRepositoryAction.java index c56b2fd2b2205..fb972136bf695 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/TransportCleanupRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/TransportCleanupRepositoryAction.java @@ -82,6 +82,8 @@ * {@link BlobStoreRepository#cleanup} ensures that the repository state id has not changed between creation of the cluster state entry * and any delete/write operations. TODO: This will not work if we also want to clean up at the shard level as those will involve writes * as well as deletes. + * + * @opensearch.internal */ public final class TransportCleanupRepositoryAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/package-info.java new file mode 100644 index 0000000000000..1a9c0f2ce113b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/cleanup/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler for cleaning up a snapshot repository. */ +package org.opensearch.action.admin.cluster.repositories.cleanup; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryAction.java index 3e6cbcbae8a8f..2031e4f7a716f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryAction.java @@ -37,6 +37,8 @@ /** * Unregister repository action + * + * @opensearch.internal */ public class DeleteRepositoryAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java index 610b985eb0484..a3f4bb768c649 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java @@ -45,6 +45,8 @@ * Unregister repository request. *

    * The unregister repository command just unregisters the repository. No data is getting deleted from the repository. + * + * @opensearch.internal */ public class DeleteRepositoryRequest extends AcknowledgedRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java index 3a390dd1df2ab..ffef8d5b41979 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java @@ -38,6 +38,8 @@ /** * Builder for unregister repository request + * + * @opensearch.internal */ public class DeleteRepositoryRequestBuilder extends AcknowledgedRequestBuilder< DeleteRepositoryRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/TransportDeleteRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/TransportDeleteRepositoryAction.java index c7369cabbc75d..97a0463df0e41 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/TransportDeleteRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/TransportDeleteRepositoryAction.java @@ -51,6 +51,8 @@ /** * Transport action for unregister repository operation + * + * @opensearch.internal */ public class TransportDeleteRepositoryAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/package-info.java new file mode 100644 index 0000000000000..db9d5e7f8ceea --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/delete/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler for deleting a snapshot repository. */ +package org.opensearch.action.admin.cluster.repositories.delete; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesAction.java index 86bc21ef8fd41..8d0fa4dc5010c 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesAction.java @@ -36,6 +36,8 @@ /** * Get repositories action + * + * @opensearch.internal */ public class GetRepositoriesAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java index 02b42d82e6702..9e93b7ab68dc3 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java @@ -44,6 +44,8 @@ /** * Get repository request + * + * @opensearch.internal */ public class GetRepositoriesRequest extends MasterNodeReadRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java index 8c4555ce54f1e..2174d02c6852e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java @@ -38,6 +38,8 @@ /** * Get repository request builder + * + * @opensearch.internal */ public class GetRepositoriesRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetRepositoriesRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesResponse.java index ffb78f9622228..a599474290061 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesResponse.java @@ -49,6 +49,8 @@ /** * Get repositories response + * + * @opensearch.internal */ public class GetRepositoriesResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java index d3a66671b585b..e7cef381a2346 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java @@ -59,6 +59,8 @@ /** * Transport action for get repositories operation + * + * @opensearch.internal */ public class TransportGetRepositoriesAction extends TransportMasterNodeReadAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/package-info.java new file mode 100644 index 0000000000000..9f053ae11d8bc --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler for getting a snapshot repository. */ +package org.opensearch.action.admin.cluster.repositories.get; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/package-info.java new file mode 100644 index 0000000000000..75eb53cb11748 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Repository transport handlers. */ +package org.opensearch.action.admin.cluster.repositories; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryAction.java index 35bcdb6444ed7..c2f90d869d873 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryAction.java @@ -37,6 +37,8 @@ /** * Register repository action + * + * @opensearch.internal */ public class PutRepositoryAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java index a3561f6b3052a..1bdc8e024447d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java @@ -54,6 +54,8 @@ *

    * Registers a repository with given name, type and settings. If the repository with the same name already * exists in the cluster, the new repository will replace the existing repository. + * + * @opensearch.internal */ public class PutRepositoryRequest extends AcknowledgedRequest implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java index 09a33533c8889..6e1b2795b6375 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java @@ -42,6 +42,8 @@ /** * Register repository request builder + * + * @opensearch.internal */ public class PutRepositoryRequestBuilder extends AcknowledgedRequestBuilder< PutRepositoryRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java index c91f492209bdd..1d47dbb0fd194 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java @@ -51,6 +51,8 @@ /** * Transport action for register repository operation + * + * @opensearch.internal */ public class TransportPutRepositoryAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/package-info.java new file mode 100644 index 0000000000000..e5b6305416174 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/put/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handlers for putting a new snapshot repository */ +package org.opensearch.action.admin.cluster.repositories.put; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java index 2c727ece7f130..661e99aa1dee3 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java @@ -51,6 +51,8 @@ /** * Transport action for verifying repository operation + * + * @opensearch.internal */ public class TransportVerifyRepositoryAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryAction.java index 98239c9da0f80..10b82f2d5c0f0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryAction.java @@ -36,6 +36,8 @@ /** * Verify repository action + * + * @opensearch.internal */ public class VerifyRepositoryAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java index 12788a421c75f..001030f6a67f5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java @@ -43,6 +43,8 @@ /** * Verify repository request. + * + * @opensearch.internal */ public class VerifyRepositoryRequest extends AcknowledgedRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java index db01ac2268b9a..85c6d4e341e72 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java @@ -37,6 +37,8 @@ /** * Builder for verify repository request + * + * @opensearch.internal */ public class VerifyRepositoryRequestBuilder extends MasterNodeOperationRequestBuilder< VerifyRepositoryRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java index f31189f3073e0..7562bec6fec42 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java @@ -52,12 +52,19 @@ /** * Verify repository response + * + * @opensearch.internal */ public class VerifyRepositoryResponse extends ActionResponse implements ToXContentObject { static final String NODES = "nodes"; static final String NAME = "name"; + /** + * Inner Node View + * + * @opensearch.internal + */ public static class NodeView implements Writeable, ToXContentObject { private static final ObjectParser.NamedObjectParser PARSER; static { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/package-info.java new file mode 100644 index 0000000000000..236e7a6b26369 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler for verifying a snapshot repository. */ +package org.opensearch.action.admin.cluster.repositories.verify; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteAction.java index f52169911e3a9..d6a09f47cbf12 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for rerouting allocation commands + * + * @opensearch.internal + */ public class ClusterRerouteAction extends ActionType { public static final ClusterRerouteAction INSTANCE = new ClusterRerouteAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequest.java index ddef4f62c5298..1ca5ca1148b87 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequest.java @@ -44,6 +44,8 @@ /** * Request to submit cluster reroute allocation commands + * + * @opensearch.internal */ public class ClusterRerouteRequest extends AcknowledgedRequest { private AllocationCommands commands = new AllocationCommands(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java index 8e0116bb3646e..01d52cb43320d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java @@ -38,6 +38,8 @@ /** * Builder for a cluster reroute request + * + * @opensearch.internal */ public class ClusterRerouteRequestBuilder extends AcknowledgedRequestBuilder< ClusterRerouteRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteResponse.java index da4cfb4333b3d..dcddc98bdc43a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteResponse.java @@ -45,6 +45,8 @@ /** * Response returned after a cluster reroute request + * + * @opensearch.internal */ public class ClusterRerouteResponse extends AcknowledgedResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java index c0e3d30fdb702..406ff4bcd8e06 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java @@ -70,6 +70,11 @@ import java.util.List; import java.util.Map; +/** + * Transport action for rerouting cluster allocation commands + * + * @opensearch.internal + */ public class TransportClusterRerouteAction extends TransportMasterNodeAction { private static final Logger logger = LogManager.getLogger(TransportClusterRerouteAction.class); @@ -209,6 +214,11 @@ private void submitStateUpdate(final ClusterRerouteRequest request, final Action ); } + /** + * Inner Reroute Response Acknowledged the Cluster State Update + * + * @opensearch.internal + */ static class ClusterRerouteResponseAckedClusterStateUpdateTask extends AckedClusterStateUpdateTask { private final ClusterRerouteRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/package-info.java new file mode 100644 index 0000000000000..af26371347c0d --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster reroute transport handlers. */ +package org.opensearch.action.admin.cluster.reroute; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsRequest.java index b490f172ce7ad..01aeb0f6ec988 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsRequest.java @@ -39,6 +39,8 @@ /** * This request is specific to the REST client. {@link ClusterStateRequest} * is used on the transport layer. + * + * @opensearch.internal */ public class ClusterGetSettingsRequest extends MasterNodeReadRequest { private boolean includeDefaults = false; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsResponse.java index 95c148e9fe5d3..93d921c7b0f3a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterGetSettingsResponse.java @@ -52,6 +52,8 @@ /** * This response is specific to the REST client. {@link ClusterStateResponse} * is used on the transport layer. + * + * @opensearch.internal */ public class ClusterGetSettingsResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsAction.java index dcc7c786cc3ae..12134e6936ddb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for updating cluster settings + * + * @opensearch.internal + */ public class ClusterUpdateSettingsAction extends ActionType { public static final ClusterUpdateSettingsAction INSTANCE = new ClusterUpdateSettingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequest.java index 12cce7cf74efa..f3f7db03ac67e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequest.java @@ -54,6 +54,8 @@ /** * Request for an update cluster settings action + * + * @opensearch.internal */ public class ClusterUpdateSettingsRequest extends AcknowledgedRequest implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java index 1ec7bd6cfb47d..4d08c94f78b6a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java @@ -41,6 +41,8 @@ /** * Builder for a cluster update settings request + * + * @opensearch.internal */ public class ClusterUpdateSettingsRequestBuilder extends AcknowledgedRequestBuilder< ClusterUpdateSettingsRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsResponse.java index 91955126dd745..a4edd1d99148a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/ClusterUpdateSettingsResponse.java @@ -48,6 +48,8 @@ /** * A response for a cluster update settings action. + * + * @opensearch.internal */ public class ClusterUpdateSettingsResponse extends AcknowledgedResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/SettingsUpdater.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/SettingsUpdater.java index bcc95c01b4189..340d868c25853 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/SettingsUpdater.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/SettingsUpdater.java @@ -50,6 +50,8 @@ /** * Updates transient and persistent cluster state settings if there are any changes * due to the update. + * + * @opensearch.internal */ final class SettingsUpdater { final Settings.Builder transientUpdates = Settings.builder(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java index 3bfdf2a0cbd5a..af5da6f538d67 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java @@ -58,6 +58,11 @@ import java.io.IOException; +/** + * Transport action for updating cluster settings + * + * @opensearch.internal + */ public class TransportClusterUpdateSettingsAction extends TransportMasterNodeAction< ClusterUpdateSettingsRequest, ClusterUpdateSettingsResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/settings/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/settings/package-info.java new file mode 100644 index 0000000000000..a532b3e9f4158 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/settings/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster settings transport handlers. */ +package org.opensearch.action.admin.cluster.settings; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsAction.java index 9d6b0f9677a95..176d52d3eeaab 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for searching shards + * + * @opensearch.internal + */ public class ClusterSearchShardsAction extends ActionType { public static final ClusterSearchShardsAction INSTANCE = new ClusterSearchShardsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsGroup.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsGroup.java index 660c4629f6db2..6e1a99c95a878 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsGroup.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsGroup.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * Transport action for searching shard groups + * + * @opensearch.internal + */ public class ClusterSearchShardsGroup implements Writeable, ToXContentObject { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java index 7ae4a70d6bd36..e79697a415f1e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java @@ -44,6 +44,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport request for searching shards + * + * @opensearch.internal + */ public class ClusterSearchShardsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java index ae5c22a1c57a7..26246197cbfa8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for searching shards + * + * @opensearch.internal + */ public class ClusterSearchShardsRequestBuilder extends MasterNodeReadOperationRequestBuilder< ClusterSearchShardsRequest, ClusterSearchShardsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsResponse.java index 1381a39664a49..6ef55458e413d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsResponse.java @@ -44,6 +44,11 @@ import java.util.Arrays; import java.util.Map; +/** + * Transport response for searching shards + * + * @opensearch.internal + */ public class ClusterSearchShardsResponse extends ActionResponse implements ToXContentObject { private final ClusterSearchShardsGroup[] groups; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java index 37a556216c2c9..1d0173b2446dd 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java @@ -58,6 +58,11 @@ import java.util.Map; import java.util.Set; +/** + * Transport action for searching shards + * + * @opensearch.internal + */ public class TransportClusterSearchShardsAction extends TransportMasterNodeReadAction< ClusterSearchShardsRequest, ClusterSearchShardsResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/package-info.java new file mode 100644 index 0000000000000..94866d102ac15 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Search Shards transport handlers. */ +package org.opensearch.action.admin.cluster.shards; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotAction.java index 0ecc088ff462a..c6fe102544a7e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for cloning a snapshot + * + * @opensearch.internal + */ public final class CloneSnapshotAction extends ActionType { public static final CloneSnapshotAction INSTANCE = new CloneSnapshotAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequest.java index 58725c23b7fc5..7044a7412058a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequest.java @@ -46,6 +46,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for cloning a snapshot + * + * @opensearch.internal + */ public class CloneSnapshotRequest extends MasterNodeRequest implements IndicesRequest.Replaceable, ToXContentObject { private final String repository; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java index ba6f7a61bdc8d..c2dd9b2b491f2 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java @@ -39,6 +39,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.Strings; +/** + * Transport request builder for cloning a snapshot + * + * @opensearch.internal + */ public class CloneSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder< CloneSnapshotRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/TransportCloneSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/TransportCloneSnapshotAction.java index 806cb4a82c3c5..a17d19bb870fa 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/TransportCloneSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/TransportCloneSnapshotAction.java @@ -51,6 +51,8 @@ /** * Transport action for the clone snapshot operation. + * + * @opensearch.internal */ public final class TransportCloneSnapshotAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/package-info.java new file mode 100644 index 0000000000000..14738fe5e95b4 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Clone Snapshot transport handler. */ +package org.opensearch.action.admin.cluster.snapshots.clone; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotAction.java index 324a28027949f..fb95e311a9783 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotAction.java @@ -36,6 +36,8 @@ /** * Create snapshot action + * + * @opensearch.internal */ public class CreateSnapshotAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java index 438d2fd006e63..b9d96ed2a752d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java @@ -75,6 +75,8 @@ *

  • must be lowercase
  • *
  • must not contain invalid file name characters {@link org.opensearch.common.Strings#INVALID_FILENAME_CHARS}
  • * + * + * @opensearch.internal */ public class CreateSnapshotRequest extends MasterNodeRequest implements diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java index db30ce8295530..3f74e7d24bcdb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java @@ -42,6 +42,8 @@ /** * Create snapshot request builder + * + * @opensearch.internal */ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder< CreateSnapshotRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java index 9a92971a2a791..c62b1e3f69cb5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotResponse.java @@ -50,6 +50,8 @@ /** * Create snapshot response + * + * @opensearch.internal */ public class CreateSnapshotResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java index 377fe03a9b030..f05980f2eb41f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java @@ -50,6 +50,8 @@ /** * Transport action for create snapshot operation + * + * @opensearch.internal */ public class TransportCreateSnapshotAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/package-info.java new file mode 100644 index 0000000000000..58e1f4f9311ae --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Create Snapshot transport handler. */ +package org.opensearch.action.admin.cluster.snapshots.create; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotAction.java index 4c577bd0bbce2..0b98a4b31fd53 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotAction.java @@ -37,6 +37,8 @@ /** * Delete snapshot action + * + * @opensearch.internal */ public class DeleteSnapshotAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java index fe9dc4db626f7..d446221e8e175 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java @@ -47,6 +47,8 @@ *

    * Delete snapshot request removes snapshots from the repository and cleans up all files that are associated with the snapshots. * All files that are shared with at least one other existing snapshot are left intact. + * + * @opensearch.internal */ public class DeleteSnapshotRequest extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java index 951f86bafb7b1..684d96d1aa8d9 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java @@ -38,6 +38,8 @@ /** * Delete snapshot request builder + * + * @opensearch.internal */ public class DeleteSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder< DeleteSnapshotRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java index 0781f01e9bc61..ad71f970edcd5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java @@ -51,6 +51,8 @@ /** * Transport action for delete snapshot operation + * + * @opensearch.internal */ public class TransportDeleteSnapshotAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/package-info.java new file mode 100644 index 0000000000000..5ad5e58ebe1fd --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/delete/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Delete Snapshot transport handler. */ +package org.opensearch.action.admin.cluster.snapshots.delete; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsAction.java index 22e3e859394c7..59d7969d04f86 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsAction.java @@ -36,6 +36,8 @@ /** * Get snapshots action + * + * @opensearch.internal */ public class GetSnapshotsAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java index 549e3cea70deb..822598bd7f78b 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java @@ -44,6 +44,8 @@ /** * Get snapshot request + * + * @opensearch.internal */ public class GetSnapshotsRequest extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java index bd2ced2733169..46317a3493650 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java @@ -38,6 +38,8 @@ /** * Get snapshots request builder + * + * @opensearch.internal */ public class GetSnapshotsRequestBuilder extends MasterNodeOperationRequestBuilder< GetSnapshotsRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java index 28981a6bdafe2..4d0daf6b67e45 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java @@ -51,6 +51,8 @@ /** * Get snapshots response + * + * @opensearch.internal */ public class GetSnapshotsResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java index 91cec4b268f9b..dab87c72c5dce 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java @@ -76,6 +76,8 @@ /** * Transport Action for get snapshots operation + * + * @opensearch.internal */ public class TransportGetSnapshotsAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/package-info.java new file mode 100644 index 0000000000000..a00088759051c --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Snapshot transport handler. */ +package org.opensearch.action.admin.cluster.snapshots.get; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/package-info.java new file mode 100644 index 0000000000000..9bfd68dd93178 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Snapshot transport handlers. */ +package org.opensearch.action.admin.cluster.snapshots; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreClusterStateListener.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreClusterStateListener.java index cb6f8493551f6..7d2ca99e3dbf5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreClusterStateListener.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreClusterStateListener.java @@ -46,6 +46,11 @@ import static org.opensearch.snapshots.RestoreService.restoreInProgress; +/** + * Transport listener for cluster state updates + * + * @opensearch.internal + */ public class RestoreClusterStateListener implements ClusterStateListener { private static final Logger logger = LogManager.getLogger(RestoreClusterStateListener.class); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotAction.java index e86ad12b8a231..1813e8214aeb0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotAction.java @@ -36,6 +36,8 @@ /** * Restore snapshot action + * + * @opensearch.internal */ public class RestoreSnapshotAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java index ed45ba4f65941..ec3809fb52516 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java @@ -61,6 +61,8 @@ /** * Restore snapshot request + * + * @opensearch.internal */ public class RestoreSnapshotRequest extends MasterNodeRequest implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java index 19fc86c9c4ace..34a6586d52917 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java @@ -43,6 +43,8 @@ /** * Restore snapshot request builder + * + * @opensearch.internal */ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder< RestoreSnapshotRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java index 324e3054fb1a3..658d7139644c1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/RestoreSnapshotResponse.java @@ -52,6 +52,8 @@ /** * Contains information about restores snapshot + * + * @opensearch.internal */ public class RestoreSnapshotResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java index c07f771081902..2deed9f2dc93b 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java @@ -50,6 +50,8 @@ /** * Transport action for restore snapshot operation + * + * @opensearch.internal */ public class TransportRestoreSnapshotAction extends TransportMasterNodeAction { private final RestoreService restoreService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/package-info.java new file mode 100644 index 0000000000000..69db3f77010ff --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/restore/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Restore Snapshot transport handler. */ +package org.opensearch.action.admin.cluster.snapshots.restore; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStage.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStage.java index 59ead89c4a4ee..6e250962d1210 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStage.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStage.java @@ -32,6 +32,11 @@ package org.opensearch.action.admin.cluster.snapshots.status; +/** + * Stage for snapshotting an Index Shard + * + * @opensearch.internal + */ public enum SnapshotIndexShardStage { /** diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java index 74ac12b951dc8..6956de88cadae 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java @@ -53,6 +53,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * Status for snapshotting an Index Shard + * + * @opensearch.internal + */ public class SnapshotIndexShardStatus extends BroadcastShardResponse implements ToXContentFragment { private SnapshotIndexShardStage stage = SnapshotIndexShardStage.INIT; @@ -161,6 +166,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeOptionalString(failure); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String STAGE = "stage"; static final String REASON = "reason"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java index 63cbc0a18ffff..ae9a6d1fc8c89 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java @@ -53,6 +53,8 @@ /** * Represents snapshot status of all shards in the index + * + * @opensearch.internal */ public class SnapshotIndexStatus implements Iterable, ToXContentFragment { @@ -122,6 +124,11 @@ public Iterator iterator() { return indexShards.values().iterator(); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS = "shards"; } diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java index b945ba20afe80..ba58130cead29 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java @@ -46,6 +46,8 @@ /** * Status of a snapshot shards + * + * @opensearch.internal */ public class SnapshotShardsStats implements ToXContentObject { @@ -139,6 +141,11 @@ public int getTotalShards() { return totalShards; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS_STATS = "shards_stats"; static final String INITIALIZING = "initializing"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java index 3f348e47c4f4a..f649bc4694fca 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java @@ -46,6 +46,11 @@ import java.io.IOException; +/** + * Stats for snapshots + * + * @opensearch.internal + */ public class SnapshotStats implements Writeable, ToXContentObject { private long startTime; @@ -165,6 +170,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeVLong(totalSize); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String STATS = "stats"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStatus.java index 76764a39ff7e2..8fd1ed22a0d14 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStatus.java @@ -67,6 +67,8 @@ /** * Status of a snapshot + * + * @opensearch.internal */ public class SnapshotStatus implements ToXContentObject, Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusAction.java index d4f398d543b81..c4fe06e985f6f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusAction.java @@ -36,6 +36,8 @@ /** * Snapshots status action + * + * @opensearch.internal */ public class SnapshotsStatusAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java index f7e29cfef0bb4..d5c7c63b0db43 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java @@ -44,6 +44,8 @@ /** * Get snapshot status request + * + * @opensearch.internal */ public class SnapshotsStatusRequest extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java index 67c82182e38c9..3e281ce8059d1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java @@ -38,6 +38,8 @@ /** * Snapshots status request builder + * + * @opensearch.internal */ public class SnapshotsStatusRequestBuilder extends MasterNodeOperationRequestBuilder< SnapshotsStatusRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java index 8519b1f6a3379..86183d8a2d8eb 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java @@ -50,6 +50,8 @@ /** * Snapshot status response + * + * @opensearch.internal */ public class SnapshotsStatusResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java index b5247141739b7..86d0499a23f9e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java @@ -63,6 +63,8 @@ /** * Transport action that collects snapshot shard statuses from data nodes + * + * @opensearch.internal */ public class TransportNodesSnapshotsStatus extends TransportNodesAction< TransportNodesSnapshotsStatus.Request, @@ -143,6 +145,11 @@ protected NodeSnapshotStatus nodeOperation(NodeRequest request) { } } + /** + * Inner Request + * + * @opensearch.internal + */ public static class Request extends BaseNodesRequest { private Snapshot[] snapshots; @@ -169,6 +176,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Node Snapshot Status + * + * @opensearch.internal + */ public static class NodesSnapshotStatus extends BaseNodesResponse { public NodesSnapshotStatus(StreamInput in) throws IOException { @@ -190,6 +202,11 @@ protected void writeNodesTo(StreamOutput out, List nodes) th } } + /** + * Inner Node Request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { private final List snapshots; @@ -210,6 +227,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Node Shapshot Status + * + * @opensearch.internal + */ public static class NodeSnapshotStatus extends BaseNodeResponse { private final Map> status; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java index 1e29a70e1f41f..dec169a6633cf 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java @@ -84,6 +84,11 @@ import static java.util.Collections.unmodifiableMap; +/** + * Transport action for accessing snapshot status + * + * @opensearch.internal + */ public class TransportSnapshotsStatusAction extends TransportMasterNodeAction { private static final Logger logger = LogManager.getLogger(TransportSnapshotsStatusAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/package-info.java new file mode 100644 index 0000000000000..3244beaf97961 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Snapshot Status transport handlers. */ +package org.opensearch.action.admin.cluster.snapshots.status; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateAction.java index dff45b708fb13..ba3658d68296e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for obtaining cluster state + * + * @opensearch.internal + */ public class ClusterStateAction extends ActionType { public static final ClusterStateAction INSTANCE = new ClusterStateAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequest.java index 91e01aa74f8a5..bf2204a9f8e15 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequest.java @@ -43,6 +43,11 @@ import java.io.IOException; +/** + * Transport request for obtaining cluster state + * + * @opensearch.internal + */ public class ClusterStateRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { public static final TimeValue DEFAULT_WAIT_FOR_NODE_TIMEOUT = TimeValue.timeValueMinutes(1); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequestBuilder.java index cf3eabfc4167d..530d99f5db808 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.unit.TimeValue; +/** + * Transport request builder for obtaining cluster state + * + * @opensearch.internal + */ public class ClusterStateRequestBuilder extends MasterNodeReadOperationRequestBuilder< ClusterStateRequest, ClusterStateResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateResponse.java index 80d1f7022967d..ec2697fbd7339 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/ClusterStateResponse.java @@ -46,6 +46,8 @@ /** * The response for getting the cluster state. + * + * @opensearch.internal */ public class ClusterStateResponse extends ActionResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/TransportClusterStateAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/TransportClusterStateAction.java index 595127d83d4bf..885769dd200cf 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/state/TransportClusterStateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/TransportClusterStateAction.java @@ -58,6 +58,11 @@ import java.io.IOException; import java.util.function.Predicate; +/** + * Transport action for obtaining cluster state + * + * @opensearch.internal + */ public class TransportClusterStateAction extends TransportMasterNodeReadAction { private final Logger logger = LogManager.getLogger(getClass()); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/state/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/state/package-info.java new file mode 100644 index 0000000000000..ab935d939e459 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/state/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster State transport handler. */ +package org.opensearch.action.admin.cluster.state; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/AnalysisStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/AnalysisStats.java index 3ae8d684ee870..1f1920d8d675d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/AnalysisStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/AnalysisStats.java @@ -59,6 +59,8 @@ /** * Statistics about analysis usage. + * + * @opensearch.internal */ public final class AnalysisStats implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsAction.java index baeeec91bd8ce..ef20087a667df 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for obtaining cluster stats + * + * @opensearch.internal + */ public class ClusterStatsAction extends ActionType { public static final ClusterStatsAction INSTANCE = new ClusterStatsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java index dd74c2ad66a9b..e72d2a6bbdb7d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java @@ -47,6 +47,11 @@ import java.io.IOException; import java.util.List; +/** + * Cluster Stats per index + * + * @opensearch.internal + */ public class ClusterStatsIndices implements ToXContentFragment { private int indexCount; @@ -144,6 +149,11 @@ public AnalysisStats getAnalysis() { return analysis; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String COUNT = "count"; } @@ -167,6 +177,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Shard Stats + * + * @opensearch.internal + */ public static class ShardStats implements ToXContentFragment { int indices; @@ -311,6 +326,11 @@ public void addIndexShardCount(ShardStats indexShardCount) { } } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS = "shards"; static final String TOTAL = "total"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java index 01d4d5ac0fb53..2d684c3333f24 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java @@ -44,6 +44,11 @@ import java.io.IOException; +/** + * Transport action for obtaining cluster stats from node level + * + * @opensearch.internal + */ public class ClusterStatsNodeResponse extends BaseNodeResponse { private final NodeInfo nodeInfo; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java index fbca94780f827..b76d209a4894f 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java @@ -69,6 +69,11 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +/** + * Per Node Cluster Stats + * + * @opensearch.internal + */ public class ClusterStatsNodes implements ToXContentFragment { private final Counts counts; @@ -145,6 +150,11 @@ public Set getPlugins() { return plugins; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String COUNT = "count"; static final String VERSIONS = "versions"; @@ -202,6 +212,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Counts + * + * @opensearch.internal + */ public static class Counts implements ToXContentFragment { static final String COORDINATING_ONLY = "coordinating_only"; @@ -246,6 +261,11 @@ public Map getRoles() { return roles; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TOTAL = "total"; } @@ -260,6 +280,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Operating System Stats + * + * @opensearch.internal + */ public static class OsStats implements ToXContentFragment { final int availableProcessors; final int allocatedProcessors; @@ -318,6 +343,11 @@ public org.opensearch.monitor.os.OsStats.Mem getMem() { return mem; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String AVAILABLE_PROCESSORS = "available_processors"; static final String ALLOCATED_PROCESSORS = "allocated_processors"; @@ -361,6 +391,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Process Stats + * + * @opensearch.internal + */ public static class ProcessStats implements ToXContentFragment { final int count; @@ -431,6 +466,11 @@ public long getMinOpenFileDescriptors() { return minOpenFileDescriptors; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String CPU = "cpu"; static final String PERCENT = "percent"; @@ -454,6 +494,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner JVM Stats + * + * @opensearch.internal + */ public static class JvmStats implements ToXContentFragment { private final ObjectIntHashMap versions; @@ -527,6 +572,11 @@ public ByteSizeValue getHeapMax() { return new ByteSizeValue(heapMax); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String VERSIONS = "versions"; static final String VERSION = "version"; @@ -572,6 +622,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner JVM Version + * + * @opensearch.internal + */ public static class JvmVersion { String version; String vmName; @@ -609,6 +664,11 @@ public int hashCode() { } } + /** + * Inner Network Types + * + * @opensearch.internal + */ static class NetworkTypes implements ToXContentFragment { private final Map transportTypes; @@ -652,6 +712,11 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa } + /** + * Inner Discovery Types + * + * @opensearch.internal + */ static class DiscoveryTypes implements ToXContentFragment { private final Map discoveryTypes; @@ -677,6 +742,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Packaging Types + * + * @opensearch.internal + */ static class PackagingTypes implements ToXContentFragment { private final Map packagingTypes; @@ -709,6 +779,11 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa } + /** + * Inner Ingest Stats + * + * @opensearch.internal + */ static class IngestStats implements ToXContentFragment { final int pipelineCount; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequest.java index ed658ae23999a..43b3cf11237f7 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequest.java @@ -40,6 +40,8 @@ /** * A request to get cluster level stats. + * + * @opensearch.internal */ public class ClusterStatsRequest extends BaseNodesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java index 33c346a493986..aaf5e3aeffeb8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.nodes.NodesOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for obtaining cluster stats + * + * @opensearch.internal + */ public class ClusterStatsRequestBuilder extends NodesOperationRequestBuilder< ClusterStatsRequest, ClusterStatsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsResponse.java index 172159a1efe5b..c6519d6669ea8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsResponse.java @@ -49,6 +49,11 @@ import java.util.List; import java.util.Locale; +/** + * Transport response for obtaining cluster stats + * + * @opensearch.internal + */ public class ClusterStatsResponse extends BaseNodesResponse implements ToXContentFragment { final ClusterStatsNodes nodesStats; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/IndexFeatureStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/IndexFeatureStats.java index 0c428ee4fe0ee..0da99097aa4f4 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/IndexFeatureStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/IndexFeatureStats.java @@ -43,6 +43,8 @@ /** * Statistics about an index feature. + * + * @opensearch.internal */ public final class IndexFeatureStats implements ToXContent, Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingStats.java index fc4b61af4ddde..71e183e6158dc 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingStats.java @@ -56,6 +56,8 @@ /** * Usage statistics about mappings usage. + * + * @opensearch.internal */ public final class MappingStats implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingVisitor.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingVisitor.java index 4f16dbcff668e..b2a5acb235ace 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingVisitor.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/MappingVisitor.java @@ -35,6 +35,11 @@ import java.util.Map; import java.util.function.Consumer; +/** + * Visitor pattern for obtaining index mappings + * + * @opensearch.internal + */ final class MappingVisitor { private MappingVisitor() {} diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java index c0d7519e79862..984735a648dc7 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java @@ -64,6 +64,11 @@ import java.util.ArrayList; import java.util.List; +/** + * Transport action for obtaining cluster state + * + * @opensearch.internal + */ public class TransportClusterStatsAction extends TransportNodesAction< ClusterStatsRequest, ClusterStatsResponse, @@ -206,6 +211,11 @@ protected ClusterStatsNodeResponse nodeOperation(ClusterStatsNodeRequest nodeReq } + /** + * Inner Cluster Stats Node Request + * + * @opensearch.internal + */ public static class ClusterStatsNodeRequest extends BaseNodeRequest { ClusterStatsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/package-info.java new file mode 100644 index 0000000000000..b10c976bbddf6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Stats transport handlers. */ +package org.opensearch.action.admin.cluster.stats; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptAction.java index ab20c4052938d..3645ef21d2e12 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for deleting stored scripts + * + * @opensearch.internal + */ public class DeleteStoredScriptAction extends ActionType { public static final DeleteStoredScriptAction INSTANCE = new DeleteStoredScriptAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequest.java index eda9aa053854f..93d2c3ba3c452 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequest.java @@ -41,6 +41,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for deleting stored scripts + * + * @opensearch.internal + */ public class DeleteStoredScriptRequest extends AcknowledgedRequest { private String id; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java index d45b0b02d9d83..34e0d429f2098 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.action.support.master.AcknowledgedResponse; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for deleting stored scripts + * + * @opensearch.internal + */ public class DeleteStoredScriptRequestBuilder extends AcknowledgedRequestBuilder< DeleteStoredScriptRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextAction.java index 9aebd60c8997b..df33aa8081849 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for getting stored scripts + * + * @opensearch.internal + */ public class GetScriptContextAction extends ActionType { public static final GetScriptContextAction INSTANCE = new GetScriptContextAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextRequest.java index 90ec611eeae9d..385948b613199 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextRequest.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Transport context for getting stored scripts + * + * @opensearch.internal + */ public class GetScriptContextRequest extends ActionRequest { public GetScriptContextRequest() { super(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java index 7bfcface8b75c..b06e10834abfc 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptContextResponse.java @@ -54,6 +54,11 @@ import java.util.function.Function; import java.util.stream.Collectors; +/** + * Transport context response for getting stored scripts + * + * @opensearch.internal + */ public class GetScriptContextResponse extends ActionResponse implements StatusToXContentObject { private static final ParseField CONTEXTS = new ParseField("contexts"); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageAction.java index 90cc05ba983de..b2da146a7ccbe 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for getting script language + * + * @opensearch.internal + */ public class GetScriptLanguageAction extends ActionType { public static final GetScriptLanguageAction INSTANCE = new GetScriptLanguageAction(); public static final String NAME = "cluster:admin/script_language/get"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageRequest.java index 0a68af3acd5d7..b6159e10cecb7 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request for getting script language + * + * @opensearch.internal + */ public class GetScriptLanguageRequest extends ActionRequest { public GetScriptLanguageRequest() { super(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java index d9d6fa9e650de..45d69a2596b19 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetScriptLanguageResponse.java @@ -45,6 +45,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport response for getting script language + * + * @opensearch.internal + */ public class GetScriptLanguageResponse extends ActionResponse implements StatusToXContentObject, Writeable { public final ScriptLanguagesInfo info; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptAction.java index 40d887987ae40..f4cb82d68456a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for getting stored script + * + * @opensearch.internal + */ public class GetStoredScriptAction extends ActionType { public static final GetStoredScriptAction INSTANCE = new GetStoredScriptAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequest.java index afecdc09d991d..2a51bd9ad3eef 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequest.java @@ -41,6 +41,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for getting stored script + * + * @opensearch.internal + */ public class GetStoredScriptRequest extends MasterNodeReadRequest { protected String id; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java index cbae829e76c04..3c8b74c240f29 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for getting stored script + * + * @opensearch.internal + */ public class GetStoredScriptRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetStoredScriptRequest, GetStoredScriptResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java index 7739f87db74f9..799e308acae39 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/GetStoredScriptResponse.java @@ -50,6 +50,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * Transport response for getting stored script + * + * @opensearch.internal + */ public class GetStoredScriptResponse extends ActionResponse implements StatusToXContentObject { public static final ParseField _ID_PARSE_FIELD = new ParseField("_id"); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptAction.java index 75a2dc12d81f6..2845d895a69e8 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for putting stored script + * + * @opensearch.internal + */ public class PutStoredScriptAction extends ActionType { public static final PutStoredScriptAction INSTANCE = new PutStoredScriptAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java index 4665354918c8f..2bddf2823f962 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java @@ -48,6 +48,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for putting stored script + * + * @opensearch.internal + */ public class PutStoredScriptRequest extends AcknowledgedRequest implements ToXContentFragment { private String id; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java index 414ed3d273b75..ef3c14df29627 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java @@ -38,6 +38,11 @@ import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentType; +/** + * Transport request builder for putting stored script + * + * @opensearch.internal + */ public class PutStoredScriptRequestBuilder extends AcknowledgedRequestBuilder< PutStoredScriptRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportDeleteStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportDeleteStoredScriptAction.java index 0b5f9d3040add..1550af534e5bf 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportDeleteStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportDeleteStoredScriptAction.java @@ -49,6 +49,11 @@ import java.io.IOException; +/** + * Transport action for deleting stored script + * + * @opensearch.internal + */ public class TransportDeleteStoredScriptAction extends TransportMasterNodeAction { private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptContextAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptContextAction.java index 0bcd9a71109ed..88184d59932ea 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptContextAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptContextAction.java @@ -42,6 +42,11 @@ import java.util.Set; +/** + * Transport action for getting script context + * + * @opensearch.internal + */ public class TransportGetScriptContextAction extends HandledTransportAction { private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptLanguageAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptLanguageAction.java index 255889b63dbd8..0ecd6e8cf35d7 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptLanguageAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetScriptLanguageAction.java @@ -40,6 +40,11 @@ import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; +/** + * Transport action for getting script language + * + * @opensearch.internal + */ public class TransportGetScriptLanguageAction extends HandledTransportAction { private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetStoredScriptAction.java index 4a87f6795da50..b3f5890de40b9 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportGetStoredScriptAction.java @@ -48,6 +48,11 @@ import java.io.IOException; +/** + * Transport action for getting stored script + * + * @opensearch.internal + */ public class TransportGetStoredScriptAction extends TransportMasterNodeReadAction { private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportPutStoredScriptAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportPutStoredScriptAction.java index a8288fc0147c2..fa0e97d4c02f1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportPutStoredScriptAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/TransportPutStoredScriptAction.java @@ -49,6 +49,11 @@ import java.io.IOException; +/** + * Transport action for putting stored script + * + * @opensearch.internal + */ public class TransportPutStoredScriptAction extends TransportMasterNodeAction { private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/package-info.java new file mode 100644 index 0000000000000..8f2196ded7c23 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/storedscripts/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Stored Scripts transport handlers. */ +package org.opensearch.action.admin.cluster.storedscripts; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksAction.java index 851b88f1e639a..9f3e8720d1f56 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for getting pending cluster tasks + * + * @opensearch.internal + */ public class PendingClusterTasksAction extends ActionType { public static final PendingClusterTasksAction INSTANCE = new PendingClusterTasksAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequest.java index 463481fe5d0e5..27f5e3bc9b991 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request for getting pending cluster tasks + * + * @opensearch.internal + */ public class PendingClusterTasksRequest extends MasterNodeReadRequest { public PendingClusterTasksRequest() {} diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java index 8f3bccdf5e55f..08afa81a8194d 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for getting pending cluster tasks + * + * @opensearch.internal + */ public class PendingClusterTasksRequestBuilder extends MasterNodeReadOperationRequestBuilder< PendingClusterTasksRequest, PendingClusterTasksResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java index 5b355f9f00166..e7f17153b8506 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java @@ -43,6 +43,11 @@ import java.util.Iterator; import java.util.List; +/** + * Transport response for getting pending cluster tasks + * + * @opensearch.internal + */ public class PendingClusterTasksResponse extends ActionResponse implements Iterable, ToXContentObject { private final List pendingTasks; @@ -108,6 +113,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TASKS = "tasks"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java index 932722eae8a80..13a805e1e49f0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java @@ -50,6 +50,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport action for getting pending cluster tasks + * + * @opensearch.internal + */ public class TransportPendingClusterTasksAction extends TransportMasterNodeReadAction< PendingClusterTasksRequest, PendingClusterTasksResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/package-info.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/package-info.java new file mode 100644 index 0000000000000..4169a343aaabf --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Pending Cluster Tasks transport handlers. */ +package org.opensearch.action.admin.cluster.tasks; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/Alias.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/Alias.java index d8853bcede3ef..f9a785d1759d8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/Alias.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/Alias.java @@ -55,6 +55,8 @@ /** * Represents an alias, to be associated with an index + * + * @opensearch.internal */ public class Alias implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesAction.java index 33566820d9762..4d735e984c34e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for listing index aliases + * + * @opensearch.internal + */ public class IndicesAliasesAction extends ActionType { public static final IndicesAliasesAction INSTANCE = new IndicesAliasesAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesClusterStateUpdateRequest.java index f89f8a06727c1..4a445ca92d2dd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesClusterStateUpdateRequest.java @@ -38,6 +38,8 @@ /** * Cluster state update request that allows to add or remove aliases + * + * @opensearch.internal */ public class IndicesAliasesClusterStateUpdateRequest extends ClusterStateUpdateRequest { private final List actions; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java index 9481e6287c878..d6a1488f3f226 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java @@ -72,6 +72,8 @@ /** * A request to add/remove aliases for one or more indices. + * + * @opensearch.internal */ public class IndicesAliasesRequest extends AcknowledgedRequest implements ToXContentObject { @@ -97,6 +99,8 @@ public IndicesAliasesRequest() {} /** * Request to take one or more actions on one or more indexes and alias combinations. + * + * @opensearch.internal */ public static class AliasActions implements AliasesRequest, Writeable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java index f74363db3dcfd..13c57cc781925 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java @@ -41,6 +41,8 @@ /** * Builder for request to modify many aliases at once. + * + * @opensearch.internal */ public class IndicesAliasesRequestBuilder extends AcknowledgedRequestBuilder< IndicesAliasesRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java index 82eb3aed7da16..2e5cf23360125 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/TransportIndicesAliasesAction.java @@ -72,6 +72,8 @@ /** * Add/remove aliases action + * + * @opensearch.internal */ public class TransportIndicesAliasesAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistAction.java deleted file mode 100644 index 964648ab04705..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistAction.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.alias.exists; - -import org.opensearch.action.ActionType; - -public class AliasesExistAction extends ActionType { - - public static final AliasesExistAction INSTANCE = new AliasesExistAction(); - public static final String NAME = "indices:admin/aliases/exists"; - - private AliasesExistAction() { - super(NAME, AliasesExistResponse::new); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java deleted file mode 100644 index 20949360ddab8..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.alias.exists; - -import org.opensearch.action.admin.indices.alias.get.BaseAliasesRequestBuilder; -import org.opensearch.client.OpenSearchClient; - -public class AliasesExistRequestBuilder extends BaseAliasesRequestBuilder { - - public AliasesExistRequestBuilder(OpenSearchClient client, AliasesExistAction action, String... aliases) { - super(client, action, aliases); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistResponse.java deleted file mode 100644 index 447f10e5ab34a..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/AliasesExistResponse.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.alias.exists; - -import org.opensearch.action.ActionResponse; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; - -import java.io.IOException; - -public class AliasesExistResponse extends ActionResponse { - - private boolean exists; - - public AliasesExistResponse(boolean exists) { - this.exists = exists; - } - - AliasesExistResponse(StreamInput in) throws IOException { - super(in); - exists = in.readBoolean(); - } - - public boolean exists() { - return exists; - } - - public boolean isExists() { - return exists(); - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - out.writeBoolean(exists); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java deleted file mode 100644 index 8a86a27561527..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.alias.exists; - -import org.opensearch.action.ActionListener; -import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; -import org.opensearch.action.support.ActionFilters; -import org.opensearch.action.support.master.TransportMasterNodeReadAction; -import org.opensearch.cluster.ClusterState; -import org.opensearch.cluster.block.ClusterBlockException; -import org.opensearch.cluster.block.ClusterBlockLevel; -import org.opensearch.cluster.metadata.IndexNameExpressionResolver; -import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.threadpool.ThreadPool; -import org.opensearch.transport.TransportService; - -import java.io.IOException; - -public class TransportAliasesExistAction extends TransportMasterNodeReadAction { - - @Inject - public TransportAliasesExistAction( - TransportService transportService, - ClusterService clusterService, - ThreadPool threadPool, - ActionFilters actionFilters, - IndexNameExpressionResolver indexNameExpressionResolver - ) { - super( - AliasesExistAction.NAME, - transportService, - clusterService, - threadPool, - actionFilters, - GetAliasesRequest::new, - indexNameExpressionResolver - ); - } - - @Override - protected String executor() { - // very lightweight operation, no need to fork - return ThreadPool.Names.SAME; - } - - @Override - protected AliasesExistResponse read(StreamInput in) throws IOException { - return new AliasesExistResponse(in); - } - - @Override - protected ClusterBlockException checkBlock(GetAliasesRequest request, ClusterState state) { - return state.blocks() - .indicesBlockedException(ClusterBlockLevel.METADATA_READ, indexNameExpressionResolver.concreteIndexNames(state, request)); - } - - @Override - protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener listener) { - String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(state, request); - boolean result = state.metadata().hasAliases(request.aliases(), concreteIndices); - listener.onResponse(new AliasesExistResponse(result)); - } - -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java index 3d8fa05fb7658..82f9d9a35dd2c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java @@ -39,6 +39,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.util.ArrayUtils; +/** + * Base request builder for listing index aliases + * + * @opensearch.internal + */ public abstract class BaseAliasesRequestBuilder< Response extends ActionResponse, Builder extends BaseAliasesRequestBuilder> extends MasterNodeReadOperationRequestBuilder< diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesAction.java index 198fa328111b8..d45f988330010 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for listing index aliases + * + * @opensearch.internal + */ public class GetAliasesAction extends ActionType { public static final GetAliasesAction INSTANCE = new GetAliasesAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequest.java index 661af82d7020d..46f2ee8765910 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequest.java @@ -41,6 +41,11 @@ import java.io.IOException; +/** + * Transport request for listing index aliases + * + * @opensearch.internal + */ public class GetAliasesRequest extends MasterNodeReadRequest implements AliasesRequest { private String[] indices = Strings.EMPTY_ARRAY; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java index f7902ef73fbd5..aecbd689a647c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java @@ -34,6 +34,11 @@ import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for listing index aliases + * + * @opensearch.internal + */ public class GetAliasesRequestBuilder extends BaseAliasesRequestBuilder { public GetAliasesRequestBuilder(OpenSearchClient client, GetAliasesAction action, String... aliases) { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesResponse.java index 8901a067bb020..60c0a403566d5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/GetAliasesResponse.java @@ -42,6 +42,11 @@ import java.util.List; import java.util.Objects; +/** + * Transport response for listing index aliases + * + * @opensearch.internal + */ public class GetAliasesResponse extends ActionResponse { private final ImmutableOpenMap> aliases; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/TransportGetAliasesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/TransportGetAliasesAction.java index fa26560e4fedf..1996b11901c3a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/TransportGetAliasesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/TransportGetAliasesAction.java @@ -59,6 +59,11 @@ import java.util.Set; import java.util.stream.Collectors; +/** + * Transport action for listing index aliases + * + * @opensearch.internal + */ public class TransportGetAliasesAction extends TransportMasterNodeReadAction { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(TransportGetAliasesAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/package-info.java new file mode 100644 index 0000000000000..e4ea33da95743 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Alias transport handler. */ +package org.opensearch.action.admin.indices.alias.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/package-info.java new file mode 100644 index 0000000000000..3630775073c68 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Alias transport handlers. */ +package org.opensearch.action.admin.indices.alias; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java index 592575d9b6019..e1d890025fdeb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java @@ -59,6 +59,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport action for analyzing text + * + * @opensearch.internal + */ public class AnalyzeAction extends ActionType { public static final AnalyzeAction INSTANCE = new AnalyzeAction(); @@ -71,6 +76,8 @@ private AnalyzeAction() { /** * A request to analyze a text associated with a specific index. Allow to provide * the actual analyzer name to perform the analysis with. + * + * @opensearch.internal */ public static class Request extends SingleShardRequest { @@ -298,6 +305,11 @@ public static Request fromXContent(XContentParser parser, String index) throws I } + /** + * Inner Response + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { private final DetailAnalyzeResponse detail; @@ -400,6 +412,11 @@ public String toString() { return Strings.toString(this, true, true); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TOKENS = "tokens"; @@ -407,6 +424,11 @@ static final class Fields { } } + /** + * Inner Analyze Token + * + * @opensearch.internal + */ public static class AnalyzeToken implements Writeable, ToXContentObject { private final String term; private final int startOffset; @@ -540,6 +562,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Detail Analyze Response + * + * @opensearch.internal + */ public static class DetailAnalyzeResponse implements Writeable, ToXContentFragment { private final boolean customAnalyzer; @@ -702,6 +729,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Analyze Token List + * + * @opensearch.internal + */ public static class AnalyzeTokenList implements Writeable, ToXContentObject { private final String name; private final AnalyzeToken[] tokens; @@ -794,6 +826,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner character filtered text + * + * @opensearch.internal + */ public static class CharFilteredText implements Writeable, ToXContentObject { private final String name; private final String[] texts; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java index 167feb7935be2..a7f21b2af16fc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java @@ -36,6 +36,11 @@ import java.util.Map; +/** + * Transport request builder for analyzing text + * + * @opensearch.internal + */ public class AnalyzeRequestBuilder extends SingleShardOperationRequestBuilder< AnalyzeAction.Request, AnalyzeAction.Response, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java index cf578af8dbacb..e5efe9055592d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java @@ -82,6 +82,8 @@ /** * Transport action used to execute analyze requests + * + * @opensearch.internal */ public class TransportAnalyzeAction extends TransportSingleShardAction { @@ -465,6 +467,11 @@ private static String writeCharStream(Reader input) { return sb.toString(); } + /** + * Inner Token Counter + * + * @opensearch.internal + */ private static class TokenCounter { private int tokenCount = 0; private int maxTokenCount; @@ -486,6 +493,11 @@ private void increment() { } } + /** + * Inner Token List Creator + * + * @opensearch.internal + */ private static class TokenListCreator { int lastPosition = -1; int lastOffset = 0; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/package-info.java new file mode 100644 index 0000000000000..2de987da0f204 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Indices analyze transport handler. */ +package org.opensearch.action.admin.indices.analyze; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheAction.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheAction.java index b21b52f063691..f605f042a05ac 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for clearing cache + * + * @opensearch.internal + */ public class ClearIndicesCacheAction extends ActionType { public static final ClearIndicesCacheAction INSTANCE = new ClearIndicesCacheAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java index a9eafc7defaba..35913c2579aa9 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport request for clearing cache + * + * @opensearch.internal + */ public class ClearIndicesCacheRequest extends BroadcastRequest { private boolean queryCache = false; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java index c7365a0e22e83..2a48e7d7e0eeb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.broadcast.BroadcastOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for clearing cache + * + * @opensearch.internal + */ public class ClearIndicesCacheRequestBuilder extends BroadcastOperationRequestBuilder< ClearIndicesCacheRequest, ClearIndicesCacheResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java index 58d8767697528..707a3cedf72d6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java @@ -44,6 +44,8 @@ /** * The response of a clear cache action. + * + * @opensearch.internal */ public class ClearIndicesCacheResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java index baa51e023e75a..12f1c78cea0c7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java @@ -53,6 +53,8 @@ /** * Indices clear cache action. + * + * @opensearch.internal */ public class TransportClearIndicesCacheAction extends TransportBroadcastByNodeAction< ClearIndicesCacheRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/package-info.java new file mode 100644 index 0000000000000..41e8437bc15c1 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/clear/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Clear indices cache transport handler. */ +package org.opensearch.action.admin.indices.cache.clear; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/cache/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/cache/package-info.java new file mode 100644 index 0000000000000..367c663bdc637 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/cache/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Indices Cache transport handlers. */ +package org.opensearch.action.admin.indices.cache; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexAction.java index ae8347a5ce812..2dea3e415ae0d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for closing an index + * + * @opensearch.internal + */ public class CloseIndexAction extends ActionType { public static final CloseIndexAction INSTANCE = new CloseIndexAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexClusterStateUpdateRequest.java index b94d080a331be..4b446f9d1ad2a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexClusterStateUpdateRequest.java @@ -36,6 +36,8 @@ /** * Cluster state update request that allows to close one or more indices + * + * @opensearch.internal */ public class CloseIndexClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequest.java index 3fa1c8f066135..b16cabfda4d67 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequest.java @@ -48,6 +48,8 @@ /** * A request to close an index. + * + * @opensearch.internal */ public class CloseIndexRequest extends AcknowledgedRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequestBuilder.java index 66dc07e35fbaa..b3b53a0043c70 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexRequestBuilder.java @@ -39,6 +39,8 @@ /** * Builder for close index request + * + * @opensearch.internal */ public class CloseIndexRequestBuilder extends AcknowledgedRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java index 998ffc4af7028..1fc9017359a8c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java @@ -52,6 +52,11 @@ import static java.util.Collections.emptyList; import static java.util.Collections.unmodifiableList; +/** + * Transport response for closing an index + * + * @opensearch.internal + */ public class CloseIndexResponse extends ShardsAcknowledgedResponse { private final List indices; @@ -100,6 +105,11 @@ public String toString() { return Strings.toString(this); } + /** + * Inner index result + * + * @opensearch.internal + */ public static class IndexResult implements Writeable, ToXContentFragment { private final Index index; @@ -195,6 +205,11 @@ public String toString() { } } + /** + * Shard Result from Close Index Response + * + * @opensearch.internal + */ public static class ShardResult implements Writeable, ToXContentFragment { private final int id; @@ -248,6 +263,11 @@ public String toString() { return Strings.toString(this); } + /** + * Inner Failure if something goes wrong + * + * @opensearch.internal + */ public static class Failure extends DefaultShardOperationFailedException { private @Nullable String nodeId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportCloseIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportCloseIndexAction.java index 13525a2a3b23e..0084977d0fdf0 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportCloseIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportCloseIndexAction.java @@ -61,6 +61,8 @@ /** * Close index action + * + * @opensearch.internal */ public class TransportCloseIndexAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java index 8baf1f5d851ad..fe39e2a254301 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java @@ -60,6 +60,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport action for verifying a shard before closing an index + * + * @opensearch.internal + */ public class TransportVerifyShardBeforeCloseAction extends TransportReplicationAction< TransportVerifyShardBeforeCloseAction.ShardRequest, TransportVerifyShardBeforeCloseAction.ShardRequest, @@ -186,6 +191,11 @@ public void markShardCopyAsStaleIfNeeded( } } + /** + * Shard Request for verifying shards before closing + * + * @opensearch.internal + */ public static class ShardRequest extends ReplicationRequest { private final ClusterBlock clusterBlock; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/close/package-info.java new file mode 100644 index 0000000000000..fb2d419124461 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Close indices transport handlers. */ +package org.opensearch.action.admin.indices.close; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java index 23cb728540ab3..6b510291f1ccb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java @@ -62,6 +62,8 @@ /** * Api that auto creates an index or data stream that originate from requests that write into an index that doesn't yet exist. + * + * @opensearch.internal */ public final class AutoCreateAction extends ActionType { @@ -72,6 +74,11 @@ private AutoCreateAction() { super(NAME, CreateIndexResponse::new); } + /** + * Transport Action for Auto Create + * + * @opensearch.internal + */ public static final class TransportAction extends TransportMasterNodeAction { private final ActiveShardsObserver activeShardsObserver; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexAction.java index 87bbc093fce43..220620790fa4d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for creating an index + * + * @opensearch.internal + */ public class CreateIndexAction extends ActionType { public static final CreateIndexAction INSTANCE = new CreateIndexAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexClusterStateUpdateRequest.java index 5ca6fb4226b64..aba5a60ef2804 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexClusterStateUpdateRequest.java @@ -46,6 +46,8 @@ /** * Cluster state update request that allows to create an index + * + * @opensearch.internal */ public class CreateIndexClusterStateUpdateRequest extends ClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequest.java index 26ff4f1da3ba4..95837d82be7ac 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequest.java @@ -80,6 +80,8 @@ * @see org.opensearch.client.IndicesAdminClient#create(CreateIndexRequest) * @see org.opensearch.client.Requests#createIndexRequest(String) * @see CreateIndexResponse + * + * @opensearch.internal */ public class CreateIndexRequest extends AcknowledgedRequest implements IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequestBuilder.java index cc99f63c6a844..4c5780b87b3f2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexRequestBuilder.java @@ -46,6 +46,8 @@ /** * Builder for a create index request + * + * @opensearch.internal */ public class CreateIndexRequestBuilder extends AcknowledgedRequestBuilder< CreateIndexRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexResponse.java index dedc022180cda..871576d8e336a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/CreateIndexResponse.java @@ -48,6 +48,8 @@ /** * A response for a create index action. + * + * @opensearch.internal */ public class CreateIndexResponse extends ShardsAcknowledgedResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/TransportCreateIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/create/TransportCreateIndexAction.java index 2269931deafc8..859a9d6b21bd3 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/TransportCreateIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/TransportCreateIndexAction.java @@ -50,6 +50,8 @@ /** * Create index action. + * + * @opensearch.internal */ public class TransportCreateIndexAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/create/package-info.java index e386817090285..07bdc0eaa5c64 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/package-info.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/package-info.java @@ -25,12 +25,12 @@ * under the License. */ -/** - * Create index action. - */ /* * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ +/** + * Create index action. + */ package org.opensearch.action.admin.indices.create; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java index decca8ab4151c..cd0feae4428db 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java @@ -41,6 +41,8 @@ /** * Contains information about a dangling index, i.e. an index that OpenSearch has found * on-disk but is not present in the cluster state. + * + * @opensearch.internal */ public class DanglingIndexInfo implements Writeable { private final String nodeId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexAction.java index f151a3ea46465..6559ef4cd89bd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexAction.java @@ -37,6 +37,8 @@ /** * This action causes a dangling index to be considered as deleted by the cluster. + * + * @opensearch.internal */ public class DeleteDanglingIndexAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexRequest.java index 733fb0a24ebec..4fad5498de375 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/DeleteDanglingIndexRequest.java @@ -43,6 +43,8 @@ /** * Represents a request to delete a particular dangling index, specified by its UUID. The {@link #acceptDataLoss} * flag must also be explicitly set to true, or later validation will fail. + * + * @opensearch.internal */ public class DeleteDanglingIndexRequest extends AcknowledgedRequest { private final String indexUUID; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/TransportDeleteDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/TransportDeleteDanglingIndexAction.java index baa173a0cdf88..495e8cb1fcac8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/TransportDeleteDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/TransportDeleteDanglingIndexAction.java @@ -70,6 +70,8 @@ * Implements the deletion of a dangling index. When handling a {@link DeleteDanglingIndexAction}, * this class first checks that such a dangling index exists. It then submits a cluster state update * to add the index to the index graveyard. + * + * @opensearch.internal */ public class TransportDeleteDanglingIndexAction extends TransportMasterNodeAction { private static final Logger logger = LogManager.getLogger(TransportDeleteDanglingIndexAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/package-info.java new file mode 100644 index 0000000000000..15a966b35ab55 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/delete/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Delete Dangling Indices transport handlers. */ +package org.opensearch.action.admin.indices.dangling.delete; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexAction.java index fa55661788d3e..f308728c7a85e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexAction.java @@ -36,6 +36,8 @@ /** * Represents a request to find a particular dangling index by UUID. + * + * @opensearch.internal */ public class FindDanglingIndexAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexRequest.java index c5a3621bd8340..5c1e3c0a23eae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport request for finding a dangling index + * + * @opensearch.internal + */ public class FindDanglingIndexRequest extends BaseNodesRequest { private final String indexUUID; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexResponse.java index c1b1a2901e5e2..8c99ad8c55f10 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/FindDanglingIndexResponse.java @@ -44,6 +44,8 @@ /** * Models a response to a {@link FindDanglingIndexRequest}. A find request queries every node in the * cluster looking for a dangling index with a specific UUID. + * + * @opensearch.internal */ public class FindDanglingIndexResponse extends BaseNodesResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexRequest.java index ddb16ec51a080..6026dd10c607b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexRequest.java @@ -40,6 +40,8 @@ /** * Used when querying every node in the cluster for a specific dangling index. + * + * @opensearch.internal */ public class NodeFindDanglingIndexRequest extends BaseNodeRequest { private final String indexUUID; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexResponse.java index 0f21db3eb7a91..cfe71a7acf9a3 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/NodeFindDanglingIndexResponse.java @@ -43,6 +43,8 @@ /** * Used when querying every node in the cluster for a specific dangling index. + * + * @opensearch.internal */ public class NodeFindDanglingIndexResponse extends BaseNodeResponse { /** diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/TransportFindDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/TransportFindDanglingIndexAction.java index 0da65f79db2af..3119625c6b796 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/TransportFindDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/TransportFindDanglingIndexAction.java @@ -50,6 +50,8 @@ /** * Finds a specified dangling index by its UUID, searching across all nodes. + * + * @opensearch.internal */ public class TransportFindDanglingIndexAction extends TransportNodesAction< FindDanglingIndexRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/package-info.java new file mode 100644 index 0000000000000..d5536d5794f3c --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/find/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Find Dangling Indices transport handlers. */ +package org.opensearch.action.admin.indices.dangling.find; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexAction.java index 1f6bbdecc7c12..5f7a096b1d749 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexAction.java @@ -37,6 +37,8 @@ /** * Represents a request to import a particular dangling index. + * + * @opensearch.internal */ public class ImportDanglingIndexAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexRequest.java index b154d048a10d6..73fbad248b8b1 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/ImportDanglingIndexRequest.java @@ -45,6 +45,8 @@ * Represents a request to import a particular dangling index, specified * by its UUID. The {@link #acceptDataLoss} flag must also be * explicitly set to true, or later validation will fail. + * + * @opensearch.internal */ public class ImportDanglingIndexRequest extends AcknowledgedRequest { private final String indexUUID; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/TransportImportDanglingIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/TransportImportDanglingIndexAction.java index c648f9eea837a..2010515249371 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/TransportImportDanglingIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/TransportImportDanglingIndexAction.java @@ -62,6 +62,8 @@ * Implements the import of a dangling index. When handling a {@link ImportDanglingIndexAction}, * this class first checks that such a dangling index exists. It then calls {@link LocalAllocateDangledIndices} * to perform the actual allocation. + * + * @opensearch.internal */ public class TransportImportDanglingIndexAction extends HandledTransportAction { private static final Logger logger = LogManager.getLogger(TransportImportDanglingIndexAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/package-info.java new file mode 100644 index 0000000000000..fce0f5a130c2f --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/import_index/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Import Dangling Index transport handler. */ +package org.opensearch.action.admin.indices.dangling.import_index; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesAction.java index 0e797ca930400..d8ace959c61d3 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesAction.java @@ -36,6 +36,8 @@ /** * Represents a request to list all dangling indices known to the cluster. + * + * @opensearch.internal */ public class ListDanglingIndicesAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesRequest.java index 6c2bd386119a2..ba5fd8fc139ec 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport request for listing a dangling indices + * + * @opensearch.internal + */ public class ListDanglingIndicesRequest extends BaseNodesRequest { /** * Filter the response by index UUID. Leave as null to find all indices. diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java index d412d3e323d68..de0a0279a4297 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java @@ -57,6 +57,8 @@ * cluster and aggregates their responses. When the aggregated response is converted to {@link XContent}, * information for each dangling index is presented under the "dangling_indices" key. If any nodes * in the cluster failed to answer, the details are presented under the "_nodes.failures" key. + * + * @opensearch.internal */ public class ListDanglingIndicesResponse extends BaseNodesResponse implements StatusToXContentObject { @@ -126,7 +128,13 @@ protected void writeNodesTo(StreamOutput out, List indexMetaData; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/TransportListDanglingIndicesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/TransportListDanglingIndicesAction.java index 1274010bfb8a2..6641ff172c2f0 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/TransportListDanglingIndicesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/TransportListDanglingIndicesAction.java @@ -52,6 +52,8 @@ /** * Implements the listing of all dangling indices. All nodes in the cluster are queried, and * their answers aggregated. Finding dangling indices is performed in {@link DanglingIndicesState}. + * + * @opensearch.internal */ public class TransportListDanglingIndicesAction extends TransportNodesAction< ListDanglingIndicesRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/package-info.java new file mode 100644 index 0000000000000..f6c37345fb73c --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** List Dangling Indices transport handler. */ +package org.opensearch.action.admin.indices.dangling.list; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/package-info.java index 1cfaf7f6de650..e69b6acf995e3 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/package-info.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/package-info.java @@ -25,6 +25,11 @@ * under the License. */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + /** * Dangling indices are indices that exist on disk on one or more nodes but * which do not currently exist in the cluster state. They arise in a @@ -41,9 +46,5 @@ * *

    The classes in this package form an API for managing dangling indices, allowing them to be listed, imported or deleted. */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ package org.opensearch.action.admin.indices.dangling; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/CreateDataStreamAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/CreateDataStreamAction.java index 6c5c417825abf..955f1f9475360 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/CreateDataStreamAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/CreateDataStreamAction.java @@ -58,6 +58,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport action for creating a datastream + * + * @opensearch.internal + */ public class CreateDataStreamAction extends ActionType { public static final CreateDataStreamAction INSTANCE = new CreateDataStreamAction(); @@ -67,6 +72,11 @@ private CreateDataStreamAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Request for Creating Data Stream + * + * @opensearch.internal + */ public static class Request extends AcknowledgedRequest implements IndicesRequest { private final String name; @@ -119,6 +129,11 @@ public IndicesOptions indicesOptions() { } } + /** + * Transport Action for Creating Data Stream + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final MetadataCreateDataStreamService metadataCreateDataStreamService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java index cca6b83015ecc..4ac4b3e1abf3e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java @@ -78,6 +78,11 @@ import java.util.SortedMap; import java.util.stream.Stream; +/** + * Transport action for retrieving datastream stats + * + * @opensearch.internal + */ public class DataStreamsStatsAction extends ActionType { public static final DataStreamsStatsAction INSTANCE = new DataStreamsStatsAction(); @@ -87,6 +92,11 @@ public DataStreamsStatsAction() { super(NAME, DataStreamsStatsAction.Response::new); } + /** + * Request for Data Streams Stats + * + * @opensearch.internal + */ public static class Request extends BroadcastRequest { public Request() { super((String[]) null); @@ -97,6 +107,11 @@ public Request(StreamInput in) throws IOException { } } + /** + * Response for Data Streams Stats + * + * @opensearch.internal + */ public static class Response extends BroadcastResponse { private final int dataStreamCount; private final int backingIndices; @@ -198,6 +213,11 @@ public String toString() { } } + /** + * The Data Streams Stats container + * + * @opensearch.internal + */ public static class DataStreamStats implements ToXContentObject, Writeable { private final String dataStream; private final int backingIndices; @@ -289,6 +309,11 @@ public String toString() { } } + /** + * Per Shard Data Stream stats + * + * @opensearch.internal + */ public static class DataStreamShardStats implements Writeable { private final ShardRouting shardRouting; private final StoreStats storeStats; @@ -326,12 +351,22 @@ public long getMaxTimestamp() { } } + /** + * Aggregated data Stream stats + * + * @opensearch.internal + */ private static class AggregatedStats { Set backingIndices = new HashSet<>(); long storageBytes = 0L; long maxTimestamp = 0L; } + /** + * Transport Action for Data Stream Stats + * + * @opensearch.internal + */ public static class TransportAction extends TransportBroadcastByNodeAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java index 5d79f51cbab65..95ac25c47e842 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java @@ -73,6 +73,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport action for deleting a datastream + * + * @opensearch.internal + */ public class DeleteDataStreamAction extends ActionType { private static final Logger logger = LogManager.getLogger(DeleteDataStreamAction.class); @@ -84,6 +89,11 @@ private DeleteDataStreamAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Request for deleting data streams + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest implements IndicesRequest.Replaceable { private String[] names; @@ -149,6 +159,11 @@ public IndicesRequest indices(String... indices) { } } + /** + * Transport action for deleting data streams + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final MetadataDeleteIndexService deleteIndexService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java index d519c80f6d6c2..c8270424e42df 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java @@ -73,6 +73,11 @@ import java.util.Objects; import java.util.stream.Collectors; +/** + * Transport action for getting a datastream + * + * @opensearch.internal + */ public class GetDataStreamAction extends ActionType { public static final GetDataStreamAction INSTANCE = new GetDataStreamAction(); @@ -82,6 +87,11 @@ private GetDataStreamAction() { super(NAME, Response::new); } + /** + * Request for getting data streams + * + * @opensearch.internal + */ public static class Request extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] names; @@ -143,9 +153,19 @@ public IndicesRequest indices(String... indices) { } } + /** + * Response for getting data streams + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField DATASTREAMS_FIELD = new ParseField("data_streams"); + /** + * Data streams information + * + * @opensearch.internal + */ public static class DataStreamInfo extends AbstractDiffable implements ToXContentObject { public static final ParseField STATUS_FIELD = new ParseField("status"); @@ -262,6 +282,11 @@ public int hashCode() { } } + /** + * Transport Action for getting data streams + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeReadAction { private static final Logger logger = LogManager.getLogger(TransportAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/package-info.java new file mode 100644 index 0000000000000..a37c2bed1adff --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Data Stream transport handlers. */ +package org.opensearch.action.admin.indices.datastream; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexAction.java index 6f0dd781b4cec..696c1244c7504 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for deleting an index + * + * @opensearch.internal + */ public class DeleteIndexAction extends ActionType { public static final DeleteIndexAction INSTANCE = new DeleteIndexAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexClusterStateUpdateRequest.java index a6d06833ebae9..5088d021ca9b8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexClusterStateUpdateRequest.java @@ -35,6 +35,8 @@ /** * Cluster state update request that allows to close one or more indices + * + * @opensearch.internal */ public class DeleteIndexClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequest.java index c29072b135b85..7475121a910c4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequest.java @@ -46,6 +46,8 @@ /** * A request to delete an index. Best created with {@link org.opensearch.client.Requests#deleteIndexRequest(String)}. + * + * @opensearch.internal */ public class DeleteIndexRequest extends AcknowledgedRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java index 741f46d44d8b7..33f6342e94139 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.action.support.master.AcknowledgedResponse; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for deleting an index + * + * @opensearch.internal + */ public class DeleteIndexRequestBuilder extends AcknowledgedRequestBuilder< DeleteIndexRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/delete/TransportDeleteIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/delete/TransportDeleteIndexAction.java index ec8c0fe8ed011..70cb6d8115f15 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/delete/TransportDeleteIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/delete/TransportDeleteIndexAction.java @@ -60,6 +60,8 @@ /** * Delete index action. + * + * @opensearch.internal */ public class TransportDeleteIndexAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsAction.java index 1eae6b99bc1ee..6bd0cddc00d07 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for checking if an index exists + * + * @opensearch.internal + */ public class IndicesExistsAction extends ActionType { public static final IndicesExistsAction INSTANCE = new IndicesExistsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequest.java index d511c18f5505e..89c237a990dc8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequest.java @@ -44,6 +44,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for checking if an index exists + * + * @opensearch.internal + */ public class IndicesExistsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java index bb38d14530588..9b83d2b29302c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for checking if an index exists + * + * @opensearch.internal + */ public class IndicesExistsRequestBuilder extends MasterNodeReadOperationRequestBuilder< IndicesExistsRequest, IndicesExistsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsResponse.java index 336bb6147d07d..5bf51fe2ba653 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/IndicesExistsResponse.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport response for checking if an index exists + * + * @opensearch.internal + */ public class IndicesExistsResponse extends ActionResponse { private boolean exists; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java index 076e2ecc2c119..49ab15dadb19a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java @@ -51,6 +51,8 @@ /** * Indices exists action. + * + * @opensearch.internal */ public class TransportIndicesExistsAction extends TransportMasterNodeReadAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/package-info.java new file mode 100644 index 0000000000000..e5b320dc1bdcd --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/indices/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Exists transport handler. */ +package org.opensearch.action.admin.indices.exists.indices; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/package-info.java new file mode 100644 index 0000000000000..0a91ac2fd9a20 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/exists/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Exists transport handlers. */ +package org.opensearch.action.admin.indices.exists; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TransportTypesExistsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TransportTypesExistsAction.java deleted file mode 100644 index bf4e0375941e7..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TransportTypesExistsAction.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.exists.types; - -import org.opensearch.action.ActionListener; -import org.opensearch.action.support.ActionFilters; -import org.opensearch.action.support.master.TransportMasterNodeReadAction; -import org.opensearch.cluster.ClusterState; -import org.opensearch.cluster.block.ClusterBlockException; -import org.opensearch.cluster.block.ClusterBlockLevel; -import org.opensearch.cluster.metadata.IndexNameExpressionResolver; -import org.opensearch.cluster.metadata.MappingMetadata; -import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.threadpool.ThreadPool; -import org.opensearch.transport.TransportService; - -import java.io.IOException; - -/** - * Types exists transport action. - */ -public class TransportTypesExistsAction extends TransportMasterNodeReadAction { - - @Inject - public TransportTypesExistsAction( - TransportService transportService, - ClusterService clusterService, - ThreadPool threadPool, - ActionFilters actionFilters, - IndexNameExpressionResolver indexNameExpressionResolver - ) { - super( - TypesExistsAction.NAME, - transportService, - clusterService, - threadPool, - actionFilters, - TypesExistsRequest::new, - indexNameExpressionResolver - ); - } - - @Override - protected String executor() { - // lightweight check - return ThreadPool.Names.SAME; - } - - @Override - protected TypesExistsResponse read(StreamInput in) throws IOException { - return new TypesExistsResponse(in); - } - - @Override - protected ClusterBlockException checkBlock(TypesExistsRequest request, ClusterState state) { - return state.blocks() - .indicesBlockedException(ClusterBlockLevel.METADATA_READ, indexNameExpressionResolver.concreteIndexNames(state, request)); - } - - @Override - protected void masterOperation( - final TypesExistsRequest request, - final ClusterState state, - final ActionListener listener - ) { - String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(state, request.indicesOptions(), request.indices()); - if (concreteIndices.length == 0) { - listener.onResponse(new TypesExistsResponse(false)); - return; - } - - for (String concreteIndex : concreteIndices) { - if (!state.metadata().hasConcreteIndex(concreteIndex)) { - listener.onResponse(new TypesExistsResponse(false)); - return; - } - - MappingMetadata mapping = state.metadata().getIndices().get(concreteIndex).mapping(); - if (mapping == null) { - listener.onResponse(new TypesExistsResponse(false)); - return; - } - - for (String type : request.types()) { - if (mapping.type().equals(type) == false) { - listener.onResponse(new TypesExistsResponse(false)); - return; - } - } - } - - listener.onResponse(new TypesExistsResponse(true)); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsAction.java deleted file mode 100644 index df461559dda7c..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsAction.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.exists.types; - -import org.opensearch.action.ActionType; - -public class TypesExistsAction extends ActionType { - - public static final TypesExistsAction INSTANCE = new TypesExistsAction(); - public static final String NAME = "indices:admin/types/exists"; - - private TypesExistsAction() { - super(NAME, TypesExistsResponse::new); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequest.java deleted file mode 100644 index eee8076a9b176..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.exists.types; - -import org.opensearch.action.ActionRequestValidationException; -import org.opensearch.action.IndicesRequest; -import org.opensearch.action.support.IndicesOptions; -import org.opensearch.action.support.master.MasterNodeReadRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; - -import java.io.IOException; - -import static org.opensearch.action.ValidateActions.addValidationError; - -public class TypesExistsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { - - private String[] indices; - private String[] types; - - private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen(); - - public TypesExistsRequest() {} - - public TypesExistsRequest(String[] indices, String... types) { - this.indices = indices; - this.types = types; - } - - public TypesExistsRequest(StreamInput in) throws IOException { - super(in); - indices = in.readStringArray(); - types = in.readStringArray(); - indicesOptions = IndicesOptions.readIndicesOptions(in); - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - out.writeStringArray(indices); - out.writeStringArray(types); - indicesOptions.writeIndicesOptions(out); - } - - @Override - public String[] indices() { - return indices; - } - - @Override - public TypesExistsRequest indices(String... indices) { - this.indices = indices; - return this; - } - - public String[] types() { - return types; - } - - public void types(String[] types) { - this.types = types; - } - - @Override - public IndicesOptions indicesOptions() { - return indicesOptions; - } - - public TypesExistsRequest indicesOptions(IndicesOptions indicesOptions) { - this.indicesOptions = indicesOptions; - return this; - } - - @Override - public ActionRequestValidationException validate() { - ActionRequestValidationException validationException = null; - if (indices == null) { // Specifying '*' via rest api results in an empty array - validationException = addValidationError("index/indices is missing", validationException); - } - if (types == null || types.length == 0) { - validationException = addValidationError("type/types is missing", validationException); - } - - return validationException; - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java deleted file mode 100644 index 12ed1b5766775..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.exists.types; - -import org.opensearch.action.support.IndicesOptions; -import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.opensearch.client.OpenSearchClient; -import org.opensearch.common.Strings; - -/** - * A builder for {@link TypesExistsRequest}. - */ -@Deprecated -public class TypesExistsRequestBuilder extends MasterNodeReadOperationRequestBuilder< - TypesExistsRequest, - TypesExistsResponse, - TypesExistsRequestBuilder> { - - /** - * @param indices What indices to check for types - */ - public TypesExistsRequestBuilder(OpenSearchClient client, TypesExistsAction action, String... indices) { - super(client, action, new TypesExistsRequest(indices, Strings.EMPTY_ARRAY)); - } - - TypesExistsRequestBuilder(OpenSearchClient client, TypesExistsAction action) { - super(client, action, new TypesExistsRequest()); - } - - /** - * @param indices What indices to check for types - */ - public TypesExistsRequestBuilder setIndices(String[] indices) { - request.indices(indices); - return this; - } - - /** - * @param types The types to check if they exist - */ - public TypesExistsRequestBuilder setTypes(String... types) { - request.types(types); - return this; - } - - /** - * @param indicesOptions Specifies how to resolve indices that aren't active / ready and indices wildcard expressions - */ - public TypesExistsRequestBuilder setIndicesOptions(IndicesOptions indicesOptions) { - request.indicesOptions(indicesOptions); - return this; - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsResponse.java deleted file mode 100644 index d7e08b5c9cdc9..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/exists/types/TypesExistsResponse.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.exists.types; - -import org.opensearch.action.ActionResponse; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; - -import java.io.IOException; - -/** - * Whether all of the existed types exist. - */ -public class TypesExistsResponse extends ActionResponse { - - private boolean exists; - - TypesExistsResponse(StreamInput in) throws IOException { - super(in); - exists = in.readBoolean(); - } - - public TypesExistsResponse(boolean exists) { - this.exists = exists; - } - - public boolean isExists() { - return this.exists; - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - out.writeBoolean(exists); - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushAction.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushAction.java index ace63f2346e30..288a46977521e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for flushing one or more indices + * + * @opensearch.internal + */ public class FlushAction extends ActionType { public static final FlushAction INSTANCE = new FlushAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java index 1020a0cfb33a9..0ff502dee8396 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java @@ -51,6 +51,8 @@ * @see org.opensearch.client.Requests#flushRequest(String...) * @see org.opensearch.client.IndicesAdminClient#flush(FlushRequest) * @see FlushResponse + * + * @opensearch.internal */ public class FlushRequest extends BroadcastRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequestBuilder.java index c72a55b1f8519..d0cbd1d27fba6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.broadcast.BroadcastOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for flushing one or more indices + * + * @opensearch.internal + */ public class FlushRequestBuilder extends BroadcastOperationRequestBuilder { public FlushRequestBuilder(OpenSearchClient client, FlushAction action) { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushResponse.java index 9ab04dfe8c081..0345f42ab52f1 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushResponse.java @@ -44,6 +44,8 @@ /** * A response to flush action. + * + * @opensearch.internal */ public class FlushResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/ShardFlushRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/ShardFlushRequest.java index d49bf04af623b..f56a5cc6dd5e2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/ShardFlushRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/ShardFlushRequest.java @@ -40,6 +40,11 @@ import java.io.IOException; +/** + * Transport request for flushing one or more indices + * + * @opensearch.internal + */ public class ShardFlushRequest extends ReplicationRequest { private final FlushRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportFlushAction.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportFlushAction.java index 552f88400a87d..28faed924de6e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportFlushAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportFlushAction.java @@ -46,6 +46,8 @@ /** * Flush ActionType. + * + * @opensearch.internal */ public class TransportFlushAction extends TransportBroadcastReplicationAction< FlushRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java index 53e774306e746..5a5a57b4bcc00 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java @@ -55,6 +55,11 @@ import java.io.IOException; +/** + * Transport action for flushing one or more indices + * + * @opensearch.internal + */ public class TransportShardFlushAction extends TransportReplicationAction { public static final String NAME = FlushAction.NAME + "[s]"; @@ -120,6 +125,11 @@ protected void shardOperationOnReplica(ShardFlushRequest request, IndexShard rep // TODO: Remove this transition in OpenSearch 3.0 private static final String PRE_SYNCED_FLUSH_ACTION_NAME = "internal:indices/flush/synced/pre"; + /** + * A Pre Shard Synced Flush Request + * + * @opensearch.internal + */ private static class PreShardSyncedFlushRequest extends TransportRequest { private final ShardId shardId; @@ -141,6 +151,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Pre synced flush handler for the transport layer + * + * @opensearch.internal + */ private static final class PreSyncedFlushTransportHandler implements TransportRequestHandler { private final IndicesService indicesService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeAction.java index 07b337e61323e..06b639fadc1c7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to request force merging the segments of one or more indices. + * + * @opensearch.internal + */ public class ForceMergeAction extends ActionType { public static final ForceMergeAction INSTANCE = new ForceMergeAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java index 605f39ffd1312..b428c3523b666 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java @@ -54,9 +54,16 @@ * @see org.opensearch.client.Requests#forceMergeRequest(String...) * @see org.opensearch.client.IndicesAdminClient#forceMerge(ForceMergeRequest) * @see ForceMergeResponse + * + * @opensearch.internal */ public class ForceMergeRequest extends BroadcastRequest { + /** + * Defaults for the Force Merge Request + * + * @opensearch.internal + */ public static final class Defaults { public static final int MAX_NUM_SEGMENTS = -1; public static final boolean ONLY_EXPUNGE_DELETES = false; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java index 2d0e7d4401a01..cff05f194cac4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java @@ -41,6 +41,8 @@ * {@link #setMaxNumSegments(int)} allows to control the number of segments to force * merge down to. By default, will cause the force merge process to merge down * to half the configured number of segments. + * + * @opensearch.internal */ public class ForceMergeRequestBuilder extends BroadcastOperationRequestBuilder< ForceMergeRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeResponse.java index c898dad8bcdc9..4f8cd7efb59f6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeResponse.java @@ -44,6 +44,8 @@ /** * A response for force merge action. + * + * @opensearch.internal */ public class ForceMergeResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/TransportForceMergeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/TransportForceMergeAction.java index 22f4b912cbe0b..dc48e3c93176a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/TransportForceMergeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/TransportForceMergeAction.java @@ -54,6 +54,8 @@ /** * ForceMerge index/indices action. + * + * @opensearch.internal */ public class TransportForceMergeAction extends TransportBroadcastByNodeAction< ForceMergeRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexAction.java index 6d5875a012b91..92200c71ef685 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to get information about an index. + * + * @opensearch.internal + */ public class GetIndexAction extends ActionType { public static final GetIndexAction INSTANCE = new GetIndexAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java index e1e0b2c54c904..909092078b6ae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java @@ -42,6 +42,8 @@ /** * A request to retrieve information about an index. + * + * @opensearch.internal */ public class GetIndexRequest extends ClusterInfoRequest { public enum Feature { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequestBuilder.java index 6f93614fe3487..3019191e5570e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.info.ClusterInfoRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder to get information about an index. + * + * @opensearch.internal + */ public class GetIndexRequestBuilder extends ClusterInfoRequestBuilder { public GetIndexRequestBuilder(OpenSearchClient client, GetIndexAction action, String... indices) { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java index 4465dc88fe87d..e93fbe86e4ece 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexResponse.java @@ -56,6 +56,8 @@ /** * A response for a get index action. + * + * @opensearch.internal */ public class GetIndexResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/TransportGetIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/get/TransportGetIndexAction.java index 0cd3214307359..493d3354a1b70 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/TransportGetIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/TransportGetIndexAction.java @@ -58,6 +58,8 @@ /** * Get index action. + * + * @opensearch.internal */ public class TransportGetIndexAction extends TransportClusterInfoAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/get/package-info.java new file mode 100644 index 0000000000000..b438da7ef31dc --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Index transport handler. */ +package org.opensearch.action.admin.indices.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsAction.java index 320cfa622f11a..2ddd763be20fd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to get field mappings. + * + * @opensearch.internal + */ public class GetFieldMappingsAction extends ActionType { public static final GetFieldMappingsAction INSTANCE = new GetFieldMappingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsIndexRequest.java index 961662ecdcf7e..176eca5e35cec 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsIndexRequest.java @@ -43,6 +43,11 @@ import java.io.IOException; +/** + * Transport action to get field mappings. + * + * @opensearch.internal + */ public class GetFieldMappingsIndexRequest extends SingleShardRequest { private final boolean includeDefaults; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequest.java index e6a2ad3187250..db00f3d5244ac 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequest.java @@ -49,6 +49,8 @@ * * Note: there is a new class with the same name for the Java HLRC that uses a typeless format. * Any changes done to this class should go to that client class as well. + * + * @opensearch.internal */ public class GetFieldMappingsRequest extends ActionRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java index 4a8c624e7e06e..ebc0c015c5140 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java @@ -37,7 +37,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.util.ArrayUtils; -/** A helper class to build {@link GetFieldMappingsRequest} objects */ +/** + * A helper class to build {@link GetFieldMappingsRequest} objects + * + * @opensearch.internal + **/ public class GetFieldMappingsRequestBuilder extends ActionRequestBuilder { public GetFieldMappingsRequestBuilder(OpenSearchClient client, GetFieldMappingsAction action, String... indices) { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java index 12024ef455a32..db112713b48b6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java @@ -64,6 +64,8 @@ * * Note: there is a new class with the same name for the Java HLRC that uses a typeless format. * Any changes done to this class should go to that client class as well. + * + * @opensearch.internal */ public class GetFieldMappingsResponse extends ActionResponse implements ToXContentObject { @@ -173,6 +175,11 @@ private void addFieldMappingsToBuilder(XContentBuilder builder, Params params, M } } + /** + * Metadata for field mappings for toXContent + * + * @opensearch.internal + */ public static class FieldMappingMetadata implements ToXContentFragment { private static final ParseField FULL_NAME = new ParseField("full_name"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsAction.java index 6d9ed5ba0411a..a78625a1595ad 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to get field mappings. + * + * @opensearch.internal + */ public class GetMappingsAction extends ActionType { public static final GetMappingsAction INSTANCE = new GetMappingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequest.java index ae78f5f3a0b30..2c9bec8398b66 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request to get field mappings. + * + * @opensearch.internal + */ public class GetMappingsRequest extends ClusterInfoRequest { public GetMappingsRequest() {} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java index 8401272353eaf..85bf8c2ffd9c6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.info.ClusterInfoRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder to get field mappings. + * + * @opensearch.internal + */ public class GetMappingsRequestBuilder extends ClusterInfoRequestBuilder< GetMappingsRequest, GetMappingsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java index 3be8e75be7290..643ed719b5e2a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetMappingsResponse.java @@ -47,6 +47,11 @@ import java.io.IOException; +/** + * Transport response to get field mappings. + * + * @opensearch.internal + */ public class GetMappingsResponse extends ActionResponse implements ToXContentFragment { private static final ParseField MAPPINGS = new ParseField("mappings"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsAction.java index bdb5222a6dcba..93f76f42b2f05 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsAction.java @@ -50,6 +50,11 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; +/** + * Transport action to get field mappings. + * + * @opensearch.internal + */ public class TransportGetFieldMappingsAction extends HandledTransportAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsIndexAction.java index ca07475f0deab..64f76db5e1549 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetFieldMappingsIndexAction.java @@ -69,6 +69,8 @@ /** * Transport action used to retrieve the mappings related to fields that belong to a specific index + * + * @opensearch.internal */ public class TransportGetFieldMappingsIndexAction extends TransportSingleShardAction< GetFieldMappingsIndexRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetMappingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetMappingsAction.java index 3f6cb8ed35af9..1edbba547a917 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetMappingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/TransportGetMappingsAction.java @@ -50,6 +50,11 @@ import java.io.IOException; +/** + * Transport action to get field mappings. + * + * @opensearch.internal + */ public class TransportGetMappingsAction extends TransportClusterInfoAction { private static final Logger logger = LogManager.getLogger(TransportGetMappingsAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/package-info.java new file mode 100644 index 0000000000000..fcdd9846640bc --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Mapping transport handlers. */ +package org.opensearch.action.admin.indices.mapping.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/AutoPutMappingAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/AutoPutMappingAction.java index 72cfcdaffca31..f2430eb54db9b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/AutoPutMappingAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/AutoPutMappingAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action to automatically put field mappings. + * + * @opensearch.internal + */ public class AutoPutMappingAction extends ActionType { public static final AutoPutMappingAction INSTANCE = new AutoPutMappingAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingAction.java index 4f90e38ac4416..8bca1b59ee2e2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action to put field mappings. + * + * @opensearch.internal + */ public class PutMappingAction extends ActionType { public static final PutMappingAction INSTANCE = new PutMappingAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingClusterStateUpdateRequest.java index 27081048fcdae..8d51182d838cc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingClusterStateUpdateRequest.java @@ -36,6 +36,8 @@ /** * Cluster state update request that allows to put a mapping + * + * @opensearch.internal */ public class PutMappingClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequest.java index be3e676a4a1a2..85fd74f0762a5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequest.java @@ -74,6 +74,8 @@ * @see org.opensearch.client.Requests#putMappingRequest(String...) * @see org.opensearch.client.IndicesAdminClient#putMapping(PutMappingRequest) * @see AcknowledgedResponse + * + * @opensearch.internal */ public class PutMappingRequest extends AcknowledgedRequest implements IndicesRequest.Replaceable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java index 3ef96254b3f9b..78115e1fab4ec 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java @@ -44,6 +44,8 @@ /** * Builder for a put mapping request + * + * @opensearch.internal */ public class PutMappingRequestBuilder extends AcknowledgedRequestBuilder< PutMappingRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportAutoPutMappingAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportAutoPutMappingAction.java index a172fce831c8f..5252fd24fd2fa 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportAutoPutMappingAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportAutoPutMappingAction.java @@ -50,6 +50,11 @@ import java.io.IOException; +/** + * Transport action to automatically put field mappings. + * + * @opensearch.internal + */ public class TransportAutoPutMappingAction extends TransportMasterNodeAction { private final MetadataMappingService metadataMappingService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportPutMappingAction.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportPutMappingAction.java index f1093a15a3d26..ec5a92ada4454 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportPutMappingAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportPutMappingAction.java @@ -63,6 +63,8 @@ /** * Put mapping action. + * + * @opensearch.internal */ public class TransportPutMappingAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexAction.java index 1b80e5cb8a347..5c4302d94e4a6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to open an index. + * + * @opensearch.internal + */ public class OpenIndexAction extends ActionType { public static final OpenIndexAction INSTANCE = new OpenIndexAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexClusterStateUpdateRequest.java index bf299d103ba78..a36c2744f7669 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexClusterStateUpdateRequest.java @@ -36,6 +36,8 @@ /** * Cluster state update request that allows to open one or more indices + * + * @opensearch.internal */ public class OpenIndexClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequest.java index be0e0254edff6..c6c1c2dc8f0cb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequest.java @@ -47,6 +47,8 @@ /** * A request to open an index. + * + * @opensearch.internal */ public class OpenIndexRequest extends AcknowledgedRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java index 5aadd81cc8838..bf09c3f173491 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java @@ -39,6 +39,8 @@ /** * Builder for for open index request + * + * @opensearch.internal */ public class OpenIndexRequestBuilder extends AcknowledgedRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexResponse.java index 4b811b215d717..f7bd4cf31aa17 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexResponse.java @@ -42,6 +42,8 @@ /** * A response for a open index action. + * + * @opensearch.internal */ public class OpenIndexResponse extends ShardsAcknowledgedResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/TransportOpenIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/open/TransportOpenIndexAction.java index 05b3bfd7a885e..6cd3c0682e851 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/open/TransportOpenIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/TransportOpenIndexAction.java @@ -57,6 +57,8 @@ /** * Open index action + * + * @opensearch.internal */ public class TransportOpenIndexAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/open/package-info.java new file mode 100644 index 0000000000000..4fdea8fd18769 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/open/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Open Index transport handlers. */ +package org.opensearch.action.admin.indices.open; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockAction.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockAction.java index 482f543ae6b04..3bca633554908 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to add an index block. + * + * @opensearch.internal + */ public class AddIndexBlockAction extends ActionType { public static final AddIndexBlockAction INSTANCE = new AddIndexBlockAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockClusterStateUpdateRequest.java index c934cad44b097..4b44624ece303 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockClusterStateUpdateRequest.java @@ -36,6 +36,8 @@ /** * Cluster state update request that allows to add a block to one or more indices + * + * @opensearch.internal */ public class AddIndexBlockClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequest.java index c2f24d3e927b5..7d208b5e0ac77 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequest.java @@ -48,6 +48,8 @@ /** * A request to add a block to an index. + * + * @opensearch.internal */ public class AddIndexBlockRequest extends AcknowledgedRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java index 074e7fc5f6664..8322ba19f433e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java @@ -39,6 +39,8 @@ /** * Builder for add index block request + * + * @opensearch.internal */ public class AddIndexBlockRequestBuilder extends AcknowledgedRequestBuilder< AddIndexBlockRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java index 036a8ec635efc..6a07a645f9315 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java @@ -50,6 +50,11 @@ import static java.util.Collections.unmodifiableList; +/** + * Transport response to open an index. + * + * @opensearch.internal + */ public class AddIndexBlockResponse extends ShardsAcknowledgedResponse { private final List indices; @@ -90,6 +95,11 @@ public String toString() { return Strings.toString(this); } + /** + * Result for adding a block + * + * @opensearch.internal + */ public static class AddBlockResult implements Writeable, ToXContentFragment { private final Index index; @@ -185,6 +195,11 @@ public String toString() { } } + /** + * Per shard result for adding a block + * + * @opensearch.internal + */ public static class AddBlockShardResult implements Writeable, ToXContentFragment { private final int id; @@ -239,6 +254,11 @@ public String toString() { return Strings.toString(this); } + /** + * Contains failure information + * + * @opensearch.internal + */ public static class Failure extends DefaultShardOperationFailedException { private @Nullable String nodeId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportAddIndexBlockAction.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportAddIndexBlockAction.java index a58d199287ff7..80af0a2c2dcc9 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportAddIndexBlockAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportAddIndexBlockAction.java @@ -62,6 +62,8 @@ * in-flight writes to an index have been completed prior to the response being returned. These actions * are done in multiple cluster state updates (at least two). See also {@link TransportVerifyShardIndexBlockAction} * for the eventual delegation for shard-level verification. + * + * @opensearch.internal */ public class TransportAddIndexBlockAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java index c96a94476c1fb..11b5b86823a28 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java @@ -64,6 +64,8 @@ * and are no longer executing any operations in violation of that block. This action * requests all operation permits of the shard in order to wait for all write operations * to complete. + * + * @opensearch.internal */ public class TransportVerifyShardIndexBlockAction extends TransportReplicationAction< TransportVerifyShardIndexBlockAction.ShardRequest, @@ -168,6 +170,8 @@ protected ReplicationOperation.Replicas newReplicasProxy() { * A {@link ReplicasProxy} that marks as stale the shards that are unavailable during the verification * and the flush of the shard. This is done to ensure that such shards won't be later promoted as primary * or reopened in an unverified state with potential non flushed translog operations. + * + * @opensearch.internal */ class VerifyShardReadOnlyActionReplicasProxy extends ReplicasProxy { @Override @@ -181,6 +185,11 @@ public void markShardCopyAsStaleIfNeeded( } } + /** + * Per shard request + * + * @opensearch.internal + */ public static class ShardRequest extends ReplicationRequest { private final ClusterBlock clusterBlock; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/package-info.java new file mode 100644 index 0000000000000..d34d3c64eb1ad --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** ReadOnly Index transport handlers. */ +package org.opensearch.action.admin.indices.readonly; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryAction.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryAction.java index ce764f8890f86..ac00e7f404b37 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryAction.java @@ -36,6 +36,8 @@ /** * Recovery information action + * + * @opensearch.internal */ public class RecoveryAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequest.java index 2457ca3fc5b90..8b1fe1e88da22 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequest.java @@ -42,6 +42,8 @@ /** * Request for recovery information + * + * @opensearch.internal */ public class RecoveryRequest extends BroadcastRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequestBuilder.java index 12c58c22fe8c8..99a1fb430fb28 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryRequestBuilder.java @@ -37,6 +37,8 @@ /** * Recovery information request builder. + * + * @opensearch.internal */ public class RecoveryRequestBuilder extends BroadcastOperationRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryResponse.java index 9c2b380392b03..e95110c732d79 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/RecoveryResponse.java @@ -46,6 +46,8 @@ /** * Information regarding the recovery state of indices and their associated shards. + * + * @opensearch.internal */ public class RecoveryResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/TransportRecoveryAction.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/TransportRecoveryAction.java index 7c3666e44f093..132354ed83b6c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/recovery/TransportRecoveryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/TransportRecoveryAction.java @@ -60,6 +60,8 @@ /** * Transport action for shard recovery operation. This transport action does not actually * perform shard recovery, it only reports on recoveries (both active and complete). + * + * @opensearch.internal */ public class TransportRecoveryAction extends TransportBroadcastByNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/recovery/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/recovery/package-info.java new file mode 100644 index 0000000000000..51b7dd7997a15 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/recovery/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Recovery transport handlers. */ +package org.opensearch.action.admin.indices.recovery; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshAction.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshAction.java index 6b7006c3b70ce..c321700ae65bd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Refresh information action + * + * @opensearch.internal + */ public class RefreshAction extends ActionType { public static final RefreshAction INSTANCE = new RefreshAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequest.java index c113527d1cc2f..4f078f8d9a23d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequest.java @@ -45,6 +45,8 @@ * @see org.opensearch.client.Requests#refreshRequest(String...) * @see org.opensearch.client.IndicesAdminClient#refresh(RefreshRequest) * @see RefreshResponse + * + * @opensearch.internal */ public class RefreshRequest extends BroadcastRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequestBuilder.java index 47a16f2fc968d..5b27ae13f24be 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshRequestBuilder.java @@ -39,6 +39,8 @@ * A refresh request making all operations performed since the last refresh available for search. The (near) real-time * capabilities depends on the index engine used. For example, the internal one requires refresh to be called, but by * default a refresh is scheduled periodically. + * + * @opensearch.internal */ public class RefreshRequestBuilder extends BroadcastOperationRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshResponse.java index deae44b1c4676..19cd70410317e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/RefreshResponse.java @@ -44,6 +44,8 @@ /** * The response of a refresh action. + * + * @opensearch.internal */ public class RefreshResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportRefreshAction.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportRefreshAction.java index 97e8344d32664..7fb4a9908c422 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportRefreshAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportRefreshAction.java @@ -48,6 +48,8 @@ /** * Refresh action. + * + * @opensearch.internal */ public class TransportRefreshAction extends TransportBroadcastReplicationAction< RefreshRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportShardRefreshAction.java b/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportShardRefreshAction.java index c58d8c520ad0b..9c955c8157459 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportShardRefreshAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/refresh/TransportShardRefreshAction.java @@ -49,6 +49,11 @@ import java.io.IOException; +/** + * Refresh information action + * + * @opensearch.internal + */ public class TransportShardRefreshAction extends TransportReplicationAction< BasicReplicationRequest, BasicReplicationRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java index 8a9df3f59bc4c..51bdca4c4a10e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java @@ -79,6 +79,11 @@ import java.util.TreeMap; import java.util.stream.StreamSupport; +/** + * Transport action to resolve an index. + * + * @opensearch.internal + */ public class ResolveIndexAction extends ActionType { public static final ResolveIndexAction INSTANCE = new ResolveIndexAction(); @@ -88,6 +93,11 @@ private ResolveIndexAction() { super(NAME, Response::new); } + /** + * Request for resolving an index + * + * @opensearch.internal + */ public static class Request extends ActionRequest implements IndicesRequest.Replaceable { public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpen(); @@ -157,6 +167,11 @@ public boolean includeDataStreams() { } } + /** + * Abstraction class for resolving an index + * + * @opensearch.internal + */ public static class ResolvedIndexAbstraction { static final ParseField NAME_FIELD = new ParseField("name"); @@ -178,6 +193,11 @@ public String getName() { } } + /** + * The resolved index + * + * @opensearch.internal + */ public static class ResolvedIndex extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField ALIASES_FIELD = new ParseField("aliases"); @@ -261,6 +281,11 @@ public int hashCode() { } } + /** + * The resolved index alias + * + * @opensearch.internal + */ public static class ResolvedAlias extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField INDICES_FIELD = new ParseField("indices"); @@ -318,6 +343,11 @@ public int hashCode() { } } + /** + * The resolved data stream + * + * @opensearch.internal + */ public static class ResolvedDataStream extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField BACKING_INDICES_FIELD = new ParseField("backing_indices"); @@ -385,6 +415,11 @@ public int hashCode() { } } + /** + * Response for resolving an index + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { static final ParseField INDICES_FIELD = new ParseField("indices"); @@ -450,6 +485,11 @@ public int hashCode() { } } + /** + * Transport action for resolving an index + * + * @opensearch.internal + */ public static class TransportAction extends HandledTransportAction { private final ThreadPool threadPool; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/resolve/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/resolve/package-info.java new file mode 100644 index 0000000000000..a7732563cb041 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/resolve/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Resolve transport handler. */ +package org.opensearch.action.admin.indices.resolve; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java index 7b2707ed16ca2..5fa52455f944a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java @@ -41,6 +41,8 @@ /** * Base class for rollover request conditions + * + * @opensearch.internal */ public abstract class Condition implements NamedWriteable, ToXContentFragment { @@ -93,6 +95,8 @@ public String name() { /** * Holder for index stats used to evaluate conditions + * + * @opensearch.internal */ public static class Stats { public final long numDocs; @@ -108,6 +112,8 @@ public Stats(long numDocs, long indexCreated, ByteSizeValue indexSize) { /** * Holder for evaluated condition result + * + * @opensearch.internal */ public static class Result { public final Condition condition; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxAgeCondition.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxAgeCondition.java index 20c45d88c8d32..5c2fc43f94b3c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxAgeCondition.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxAgeCondition.java @@ -43,6 +43,8 @@ /** * Condition for index maximum age. Evaluates to true * when the index is at least {@link #value} old + * + * @opensearch.internal */ public class MaxAgeCondition extends Condition { public static final String NAME = "max_age"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxDocsCondition.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxDocsCondition.java index 8491b381fd9d3..6d67c61cf9758 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxDocsCondition.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxDocsCondition.java @@ -42,6 +42,8 @@ /** * Condition for maximum index docs. Evaluates to true * when the index has at least {@link #value} docs + * + * @opensearch.internal */ public class MaxDocsCondition extends Condition { public static final String NAME = "max_docs"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxSizeCondition.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxSizeCondition.java index 147d81a52961d..720a81fc167bb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxSizeCondition.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MaxSizeCondition.java @@ -44,6 +44,8 @@ /** * A size-based condition for an index size. * Evaluates to true if the index size is at least {@link #value}. + * + * @opensearch.internal */ public class MaxSizeCondition extends Condition { public static final String NAME = "max_size"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java index 19a7b8c95199b..e3e09442764e2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java @@ -69,6 +69,8 @@ /** * Service responsible for handling rollover requests for write aliases and data streams + * + * @opensearch.internal */ public class MetadataRolloverService { private static final Pattern INDEX_NAME_PATTERN = Pattern.compile("^.*-\\d+$"); @@ -92,6 +94,11 @@ public MetadataRolloverService( this.indexNameExpressionResolver = indexNameExpressionResolver; } + /** + * Result for rollover request + * + * @opensearch.internal + */ public static class RolloverResult { public final String rolloverIndexName; public final String sourceIndexName; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverAction.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverAction.java index f95cf1b83250a..e6c22cc48c1ad 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to rollover an index. + * + * @opensearch.internal + */ public class RolloverAction extends ActionType { public static final RolloverAction INSTANCE = new RolloverAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverInfo.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverInfo.java index 3fd145a7c7655..801238f213b6b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverInfo.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverInfo.java @@ -50,6 +50,8 @@ /** * Class for holding Rollover related information within an index + * + * @opensearch.internal */ public class RolloverInfo extends AbstractDiffable implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequest.java index 402b3741205a2..db5dd0af6ab2a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequest.java @@ -57,6 +57,8 @@ * * Note: there is a new class with the same name for the Java HLRC that uses a typeless format. * Any changes done to this class should also go to that client class. + * + * @opensearch.internal */ public class RolloverRequest extends AcknowledgedRequest implements IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequestBuilder.java index c74f71a70e09d..bec084450b389 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverRequestBuilder.java @@ -39,6 +39,11 @@ import org.opensearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.TimeValue; +/** + * Transport request to rollover an index. + * + * @opensearch.internal + */ public class RolloverRequestBuilder extends MasterNodeOperationRequestBuilder { public RolloverRequestBuilder(OpenSearchClient client, RolloverAction action) { super(client, action, new RolloverRequest()); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverResponse.java index 5600d05120abb..330d258f9461f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/RolloverResponse.java @@ -54,6 +54,8 @@ * * Note: there is a new class with the same name for the Java HLRC that uses a typeless format. * Any changes done to this class should also go to that client class. + * + * @opensearch.internal */ public final class RolloverResponse extends ShardsAcknowledgedResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/TransportRolloverAction.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/TransportRolloverAction.java index 38f25422a5956..1a2f4be522e2b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/TransportRolloverAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/TransportRolloverAction.java @@ -69,6 +69,8 @@ /** * Main class to swap the index pointed to by an alias, given some conditions + * + * @opensearch.internal */ public class TransportRolloverAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/package-info.java new file mode 100644 index 0000000000000..23b5b18e3ae87 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Rollover transport handlers. */ +package org.opensearch.action.admin.indices.rollover; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexSegments.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexSegments.java index 907f352a5ed89..88973ce094d8b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexSegments.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexSegments.java @@ -38,6 +38,11 @@ import java.util.List; import java.util.Map; +/** + * List of Index Segments + * + * @opensearch.internal + */ public class IndexSegments implements Iterable { private final String index; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexShardSegments.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexShardSegments.java index 470480c2ac064..e0633d3d557ae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexShardSegments.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndexShardSegments.java @@ -37,6 +37,11 @@ import java.util.Arrays; import java.util.Iterator; +/** + * List of Index Shard Segments + * + * @opensearch.internal + */ public class IndexShardSegments implements Iterable { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java index 82fe438236d0f..c3992f8d42967 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java @@ -55,6 +55,11 @@ import java.util.Map; import java.util.Set; +/** + * Transport response for retrieving indices segment information + * + * @opensearch.internal + */ public class IndicesSegmentResponse extends BroadcastResponse { private final ShardSegments[] shards; @@ -207,6 +212,11 @@ private static void toXContent(XContentBuilder builder, Accountable tree) throws builder.endObject(); } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsAction.java index 467de4590e746..54a10ce259190 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for retrieving indices segment information + * + * @opensearch.internal + */ public class IndicesSegmentsAction extends ActionType { public static final IndicesSegmentsAction INSTANCE = new IndicesSegmentsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequest.java index 14f6999692731..dd8c02a97c0f7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Transport request for retrieving indices segment information + * + * @opensearch.internal + */ public class IndicesSegmentsRequest extends BroadcastRequest { protected boolean verbose = false; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java index 4352344114f85..4b758e1f4bfb1 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.broadcast.BroadcastOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for retrieving indices segment information + * + * @opensearch.internal + */ public class IndicesSegmentsRequestBuilder extends BroadcastOperationRequestBuilder< IndicesSegmentsRequest, IndicesSegmentResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/ShardSegments.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/ShardSegments.java index a6e34d1d55823..7214d0203966c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/ShardSegments.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/ShardSegments.java @@ -42,6 +42,11 @@ import java.util.Iterator; import java.util.List; +/** + * Collection of shard segments + * + * @opensearch.internal + */ public class ShardSegments implements Writeable, Iterable { private final ShardRouting shardRouting; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java index 7ff7bb3591f1d..eb3d64188a6e7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java @@ -53,6 +53,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport response for retrieving indices segment information + * + * @opensearch.internal + */ public class TransportIndicesSegmentsAction extends TransportBroadcastByNodeAction< IndicesSegmentsRequest, IndicesSegmentResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/package-info.java new file mode 100644 index 0000000000000..0bbd0164b8205 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Segment level transport handlers. */ +package org.opensearch.action.admin.indices.segments; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsAction.java index cc64009682d43..e035b4d9ef622 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for getting index segments + * + * @opensearch.internal + */ public class GetSettingsAction extends ActionType { public static final GetSettingsAction INSTANCE = new GetSettingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequest.java index 739dfcae6287c..bf68a66d24c5a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequest.java @@ -45,6 +45,11 @@ import java.util.Arrays; import java.util.Objects; +/** + * Transport request for getting index segments + * + * @opensearch.internal + */ public class GetSettingsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java index 034d5d64f1ca7..d978ffd90386a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.util.ArrayUtils; +/** + * Transport request builder for getting index segments + * + * @opensearch.internal + */ public class GetSettingsRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetSettingsRequest, GetSettingsResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsResponse.java index 0694f93f585ee..d16c629dd082e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/GetSettingsResponse.java @@ -52,6 +52,11 @@ import java.util.Map; import java.util.Objects; +/** + * Transport response for getting index segments + * + * @opensearch.internal + */ public class GetSettingsResponse extends ActionResponse implements ToXContentObject { private final ImmutableOpenMap indexToSettings; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/TransportGetSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/TransportGetSettingsAction.java index 5e2c13b5037e2..4f55cf3c4b5ca 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/TransportGetSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/TransportGetSettingsAction.java @@ -55,6 +55,11 @@ import java.io.IOException; +/** + * Transport action for getting index settings + * + * @opensearch.internal + */ public class TransportGetSettingsAction extends TransportMasterNodeReadAction { private final SettingsFilter settingsFilter; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/package-info.java new file mode 100644 index 0000000000000..e767b1a8870e0 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Index Settings transport handler. */ +package org.opensearch.action.admin.indices.settings.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/package-info.java new file mode 100644 index 0000000000000..862dfad419bd4 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Settings transport handlers. */ +package org.opensearch.action.admin.indices.settings; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java index 8b81bb8d8a821..52ce7dffbad80 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java @@ -55,6 +55,11 @@ import java.io.IOException; +/** + * Transport action for updating index settings + * + * @opensearch.internal + */ public class TransportUpdateSettingsAction extends TransportMasterNodeAction { private static final Logger logger = LogManager.getLogger(TransportUpdateSettingsAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsAction.java index 7c0182b0704de..2333a2aad6bc6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Action for updating index settings + * + * @opensearch.internal + */ public class UpdateSettingsAction extends ActionType { public static final UpdateSettingsAction INSTANCE = new UpdateSettingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsClusterStateUpdateRequest.java index ce36e01ac465e..4b0dd05575309 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsClusterStateUpdateRequest.java @@ -37,6 +37,8 @@ /** * Cluster state update request that allows to update settings for some indices + * + * @opensearch.internal */ public class UpdateSettingsClusterStateUpdateRequest extends IndicesClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequest.java index 70f3dc683d599..2b0452301a5f5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequest.java @@ -58,6 +58,8 @@ /** * Request for an update index settings action + * + * @opensearch.internal */ public class UpdateSettingsRequest extends AcknowledgedRequest implements diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java index dd3b78ce901f4..7501f0c7798de 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java @@ -43,6 +43,8 @@ /** * Builder for an update index settings request + * + * @opensearch.internal */ public class UpdateSettingsRequestBuilder extends AcknowledgedRequestBuilder< UpdateSettingsRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/settings/put/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/package-info.java new file mode 100644 index 0000000000000..dc38136b72d57 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/settings/put/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Put Settings transport handler. */ +package org.opensearch.action.admin.indices.settings.put; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java index 8a5b8bea75119..6eec8ccb63d20 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java @@ -40,6 +40,8 @@ /** * Request builder for {@link IndicesShardStoresRequest} + * + * @opensearch.internal */ public class IndicesShardStoreRequestBuilder extends MasterNodeReadOperationRequestBuilder< IndicesShardStoresRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresAction.java index ec67ae051a5b1..79a6f88b1dbc4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresAction.java @@ -40,6 +40,8 @@ * Exposes shard store information for requested indices. * Shard store information reports which nodes hold shard copies, how recent they are * and any exceptions on opening the shard index or from previous engine failures + * + * @opensearch.internal */ public class IndicesShardStoresAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresRequest.java index ff5b5c4cf0c2a..0b66e314731d1 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresRequest.java @@ -45,6 +45,8 @@ /** * Request for {@link IndicesShardStoresAction} + * + * @opensearch.internal */ public class IndicesShardStoresRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java index d09bf99ca7258..bd5d9c651af7a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java @@ -56,11 +56,15 @@ * * Consists of {@link StoreStatus}s for requested indices grouped by * indices and shard ids and a list of encountered node {@link Failure}s + * + * @opensearch.internal */ public class IndicesShardStoresResponse extends ActionResponse implements ToXContentFragment { /** * Shard store information from a node + * + * @opensearch.internal */ public static class StoreStatus implements Writeable, ToXContentFragment, Comparable { private final DiscoveryNode node; @@ -231,6 +235,8 @@ public int compareTo(StoreStatus other) { /** * Single node failure while retrieving shard store information + * + * @opensearch.internal */ public static class Failure extends DefaultShardOperationFailedException { private String nodeId; @@ -367,6 +373,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java index 32acd9e305130..077bee78021c3 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java @@ -78,6 +78,8 @@ /** * Transport action that reads the cluster state for shards with the requested criteria (see {@link ClusterHealthStatus}) of specific * indices and fetches store information from all the nodes using {@link TransportNodesListGatewayStartedShards} + * + * @opensearch.internal */ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAction< IndicesShardStoresRequest, @@ -160,6 +162,11 @@ protected ClusterBlockException checkBlock(IndicesShardStoresRequest request, Cl .indicesBlockedException(ClusterBlockLevel.METADATA_READ, indexNameExpressionResolver.concreteIndexNames(state, request)); } + /** + * Information for async shard stores + * + * @opensearch.internal + */ private class AsyncShardStoresInfoFetches { private final DiscoveryNodes nodes; private final RoutingNodes routingNodes; @@ -193,6 +200,11 @@ void start() { } } + /** + * Internal async fetch + * + * @opensearch.internal + */ private class InternalAsyncFetch extends AsyncShardFetch { InternalAsyncFetch( @@ -307,6 +319,11 @@ protected void reroute(ShardId shardId, String reason) { // no-op } + /** + * Response for shard stores action + * + * @opensearch.internal + */ public class Response { private final ShardId shardId; private final List responses; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/package-info.java new file mode 100644 index 0000000000000..187ffc0714e7e --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Shards transport handlers. */ +package org.opensearch.action.admin.indices.shards; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeAction.java index 5ecdd62206177..7ea6391f1c429 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for resizing an index + * + * @opensearch.internal + */ public class ResizeAction extends ActionType { public static final ResizeAction INSTANCE = new ResizeAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequest.java index b74c6c8f8d195..50784e60a3f19 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequest.java @@ -55,6 +55,8 @@ /** * Request class to shrink an index into a single shard + * + * @opensearch.internal */ public class ResizeRequest extends AcknowledgedRequest implements IndicesRequest, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequestBuilder.java index 766ed78e63497..418e83a5431ec 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeRequestBuilder.java @@ -38,6 +38,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.settings.Settings; +/** + * Transport request builder for resizing an index + * + * @opensearch.internal + */ public class ResizeRequestBuilder extends AcknowledgedRequestBuilder { public ResizeRequestBuilder(OpenSearchClient client, ActionType action) { super(client, action, new ResizeRequest()); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeResponse.java index 3846591d26f3a..88c38856d5025 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeResponse.java @@ -41,6 +41,8 @@ /** * A response for a resize index action, either shrink or split index. + * + * @opensearch.internal */ public final class ResizeResponse extends CreateIndexResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeType.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeType.java index 62b20ed9d3dcf..6403ed735ae49 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeType.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ResizeType.java @@ -34,6 +34,8 @@ /** * The type of the resize operation + * + * @opensearch.internal */ public enum ResizeType { SHRINK, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ShrinkAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/ShrinkAction.java deleted file mode 100644 index 1fa894b265573..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/ShrinkAction.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.shrink; - -import org.opensearch.action.ActionType; - -public class ShrinkAction extends ActionType { - - public static final ShrinkAction INSTANCE = new ShrinkAction(); - public static final String NAME = "indices:admin/shrink"; - - private ShrinkAction() { - super(NAME, ResizeResponse::new); - } - -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/TransportResizeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/TransportResizeAction.java index b35febe60af31..24c5466c2ba0b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shrink/TransportResizeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/TransportResizeAction.java @@ -66,6 +66,8 @@ /** * Main class to initiate resizing (shrink / split) an index into a new index + * + * @opensearch.internal */ public class TransportResizeAction extends TransportMasterNodeAction { private final MetadataCreateIndexService createIndexService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shrink/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/shrink/package-info.java new file mode 100644 index 0000000000000..414095575f0d9 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/shrink/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Shrink Index transport handlers. */ +package org.opensearch.action.admin.indices.shrink; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java index 2949af00a30d0..472fb45f452dd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStats.java @@ -65,6 +65,11 @@ import java.util.Objects; import java.util.stream.Stream; +/** + * Common Stats for OpenSearch + * + * @opensearch.internal + */ public class CommonStats implements Writeable, ToXContentFragment { @Nullable diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java index e17b497ce312a..9eec34d87c384 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java @@ -43,6 +43,11 @@ import java.util.Collections; import java.util.EnumSet; +/** + * Common Stats Flags for OpenSearch + * + * @opensearch.internal + */ public class CommonStatsFlags implements Writeable, Cloneable { public static final CommonStatsFlags ALL = new CommonStatsFlags().all(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexShardStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexShardStats.java index b8ecd6d4bfc3d..6a423cf8d15ea 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexShardStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexShardStats.java @@ -41,6 +41,11 @@ import java.util.Arrays; import java.util.Iterator; +/** + * IndexShardStats for OpenSearch + * + * @opensearch.internal + */ public class IndexShardStats implements Iterable, Writeable { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java index f0eec4ebbd27a..c98d46a0caed6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java @@ -38,6 +38,11 @@ import java.util.List; import java.util.Map; +/** + * Index Stats for OpenSearch + * + * @opensearch.internal + */ public class IndexStats implements Iterable { private final String index; @@ -127,6 +132,11 @@ public CommonStats getPrimaries() { return stats; } + /** + * Builder for Index Stats + * + * @opensearch.internal + */ public static class IndexStatsBuilder { private final String indexName; private final String uuid; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsAction.java index c0a56c3f00536..bee33671ee291 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for retrieving index stats + * + * @opensearch.internal + */ public class IndicesStatsAction extends ActionType { public static final IndicesStatsAction INSTANCE = new IndicesStatsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequest.java index bbe69b700b876..06315377797d9 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequest.java @@ -45,6 +45,8 @@ *

    * All the stats to be returned can be cleared using {@link #clear()}, at which point, specific * stats can be enabled. + * + * @opensearch.internal */ public class IndicesStatsRequest extends BroadcastRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java index 23c33401966b4..c211812b32c48 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java @@ -44,6 +44,8 @@ *

    * All the stats to be returned can be cleared using {@link #clear()}, at which point, specific * stats can be enabled. + * + * @opensearch.internal */ public class IndicesStatsRequestBuilder extends BroadcastOperationRequestBuilder< IndicesStatsRequest, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java index 3614d8de6c884..5b3fe22df4d6e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java @@ -50,6 +50,11 @@ import static java.util.Collections.unmodifiableMap; +/** + * Transport response for retrieving indices stats + * + * @opensearch.internal + */ public class IndicesStatsResponse extends BroadcastResponse { private ShardStats[] shards; @@ -208,6 +213,11 @@ protected void addCustomXContentFields(XContentBuilder builder, Params params) t } } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java index c5d3fba2a5805..f6e7c0687b9e7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java @@ -46,6 +46,11 @@ import java.io.IOException; +/** + * Shard Stats for OpenSearch + * + * @opensearch.internal + */ public class ShardStats implements Writeable, ToXContentFragment { private ShardRouting shardRouting; @@ -172,6 +177,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String ROUTING = "routing"; static final String STATE = "state"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/TransportIndicesStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/TransportIndicesStatsAction.java index 11ca1462787e8..39e0338aac5f6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/TransportIndicesStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/TransportIndicesStatsAction.java @@ -58,6 +58,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport action for retrieving indices stats + * + * @opensearch.internal + */ public class TransportIndicesStatsAction extends TransportBroadcastByNodeAction { private final IndicesService indicesService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/package-info.java new file mode 100644 index 0000000000000..38241a0d3bcbb --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Stats transport handlers. */ +package org.opensearch.action.admin.indices.stats; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java index 1a4f0a1892ec7..70c5a42f6e7ae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java @@ -43,6 +43,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport action for deleting an index template component + * + * @opensearch.internal + */ public class DeleteComponentTemplateAction extends ActionType { public static final DeleteComponentTemplateAction INSTANCE = new DeleteComponentTemplateAction(); @@ -52,6 +57,11 @@ private DeleteComponentTemplateAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Inner Request class for deleting component template + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java index bc8b96f6259e8..ae1ca59d2ed56 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java @@ -44,6 +44,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport action for deleting a composable index template + * + * @opensearch.internal + */ public class DeleteComposableIndexTemplateAction extends ActionType { public static final DeleteComposableIndexTemplateAction INSTANCE = new DeleteComposableIndexTemplateAction(); @@ -53,6 +58,11 @@ private DeleteComposableIndexTemplateAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Inner Request class for deleting composable index template + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java index a91ec2850a107..789d03f8e8d8c 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for deleting an index template + * + * @opensearch.internal + */ public class DeleteIndexTemplateAction extends ActionType { public static final DeleteIndexTemplateAction INSTANCE = new DeleteIndexTemplateAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java index a3762bb62fb94..e3a92107670ff 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java @@ -42,6 +42,8 @@ /** * A request to delete an index template. + * + * @opensearch.internal */ public class DeleteIndexTemplateRequest extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java index b58cdd06da5e9..2fc958ba93c6b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for deleting an index template + * + * @opensearch.internal + */ public class DeleteIndexTemplateRequestBuilder extends MasterNodeOperationRequestBuilder< DeleteIndexTemplateRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComponentTemplateAction.java index 15ed0443525fb..491b3e520ee51 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComponentTemplateAction.java @@ -51,6 +51,11 @@ import java.io.IOException; +/** + * Transport action for deleting a component template + * + * @opensearch.internal + */ public class TransportDeleteComponentTemplateAction extends TransportMasterNodeAction< DeleteComponentTemplateAction.Request, AcknowledgedResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComposableIndexTemplateAction.java index 87b3a883a3c10..4e7f3f292d810 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteComposableIndexTemplateAction.java @@ -51,6 +51,11 @@ import java.io.IOException; +/** + * Transport action for deleting a composable index template + * + * @opensearch.internal + */ public class TransportDeleteComposableIndexTemplateAction extends TransportMasterNodeAction< DeleteComposableIndexTemplateAction.Request, AcknowledgedResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java index e75d3aafe6a85..89668fd0ed164 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java @@ -53,6 +53,8 @@ /** * Delete index action. + * + * @opensearch.internal */ public class TransportDeleteIndexTemplateAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/package-info.java new file mode 100644 index 0000000000000..f331c9dae4a38 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Delete Index Templates transport handlers. */ +package org.opensearch.action.admin.indices.template.delete; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java index 7f01ec0717332..6722be7a066a4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java @@ -50,6 +50,8 @@ /** * Action to retrieve one or more component templates + * + * @opensearch.internal */ public class GetComponentTemplateAction extends ActionType { @@ -62,6 +64,8 @@ private GetComponentTemplateAction() { /** * Request that to retrieve one or more component templates + * + * @opensearch.internal */ public static class Request extends MasterNodeReadRequest { @@ -106,6 +110,11 @@ public String name() { } } + /** + * Inner response for getting component template + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField NAME = new ParseField("name"); public static final ParseField COMPONENT_TEMPLATES = new ParseField("component_templates"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java index 5f7ccb0b4f90f..79760e9914784 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java @@ -48,6 +48,11 @@ import java.util.Map; import java.util.Objects; +/** + * Action to retrieve one or more Composable Index templates + * + * @opensearch.internal + */ public class GetComposableIndexTemplateAction extends ActionType { public static final GetComposableIndexTemplateAction INSTANCE = new GetComposableIndexTemplateAction(); @@ -59,6 +64,8 @@ private GetComposableIndexTemplateAction() { /** * Request that to retrieve one or more index templates + * + * @opensearch.internal */ public static class Request extends MasterNodeReadRequest { @@ -120,6 +127,11 @@ public boolean equals(Object obj) { } } + /** + * Inner response for getting composable index template + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField NAME = new ParseField("name"); public static final ParseField INDEX_TEMPLATES = new ParseField("index_templates"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesAction.java index 1194abbab1cbb..f380ad6fddb55 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesAction.java @@ -33,6 +33,11 @@ import org.opensearch.action.ActionType; +/** + * Action to retrieve one or more Index templates + * + * @opensearch.internal + */ public class GetIndexTemplatesAction extends ActionType { public static final GetIndexTemplatesAction INSTANCE = new GetIndexTemplatesAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java index da48bc4d8bc29..806b1ee0b9162 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java @@ -43,6 +43,8 @@ /** * Request that allows to retrieve index templates + * + * @opensearch.internal */ public class GetIndexTemplatesRequest extends MasterNodeReadRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java index 348075d051616..d5e5845955dae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java @@ -34,6 +34,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Request builder to retrieve one or more Index templates + * + * @opensearch.internal + */ public class GetIndexTemplatesRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetIndexTemplatesRequest, GetIndexTemplatesResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java index e6d487e0a40b3..556d809315edc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetIndexTemplatesResponse.java @@ -46,6 +46,11 @@ import static java.util.Collections.singletonMap; +/** + * Response for retrieving one or more Index templates + * + * @opensearch.internal + */ public class GetIndexTemplatesResponse extends ActionResponse implements ToXContentObject { private final List indexTemplates; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComponentTemplateAction.java index 62615465fbb4a..b7efb584ba92f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComponentTemplateAction.java @@ -52,6 +52,11 @@ import java.util.HashMap; import java.util.Map; +/** + * Action to retrieve one or more Component templates + * + * @opensearch.internal + */ public class TransportGetComponentTemplateAction extends TransportMasterNodeReadAction< GetComponentTemplateAction.Request, GetComponentTemplateAction.Response> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComposableIndexTemplateAction.java index efa6d4723ce0d..e3eb619b52569 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetComposableIndexTemplateAction.java @@ -52,6 +52,11 @@ import java.util.HashMap; import java.util.Map; +/** + * Transport Action to retrieve one or more Composable Index templates + * + * @opensearch.internal + */ public class TransportGetComposableIndexTemplateAction extends TransportMasterNodeReadAction< GetComposableIndexTemplateAction.Request, GetComposableIndexTemplateAction.Response> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java index df6531d0a3862..993f40fd4f625 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java @@ -52,6 +52,11 @@ import java.util.Arrays; import java.util.List; +/** + * Transport action to retrieve one or more Index templates + * + * @opensearch.internal + */ public class TransportGetIndexTemplatesAction extends TransportMasterNodeReadAction { @Inject diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/package-info.java new file mode 100644 index 0000000000000..e7173f4d6caaa --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Index Templates transport handlers. */ +package org.opensearch.action.admin.indices.template.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/template/package-info.java new file mode 100644 index 0000000000000..066a63f079232 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Index Templates transport handlers. */ +package org.opensearch.action.admin.indices.template; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateAction.java index 3e6a586638e58..66b15c8b807f8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateAction.java @@ -34,6 +34,12 @@ import org.opensearch.action.ActionType; +/** + * Transport Action for handling simulating an index template either by name (looking it up in the + * cluster state), or by a provided template configuration + * + * @opensearch.internal + */ public class SimulateIndexTemplateAction extends ActionType { public static final SimulateIndexTemplateAction INSTANCE = new SimulateIndexTemplateAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateRequest.java index 9d6735751ac7e..3db0ec47c5df2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateRequest.java @@ -43,6 +43,12 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport Request for handling simulating an index template either by name (looking it up in the + * cluster state), or by a provided template configuration + * + * @opensearch.internal + */ public class SimulateIndexTemplateRequest extends MasterNodeReadRequest { private String indexName; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateResponse.java index 9116db02459ef..517d61a1e4dbc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateIndexTemplateResponse.java @@ -49,6 +49,8 @@ /** * Contains the information on what V2 templates would match a given index. + * + * @opensearch.internal */ public class SimulateIndexTemplateResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java index f53925e8abd50..8cd5aa53f3373 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java @@ -47,6 +47,8 @@ /** * An action for simulating the complete composed settings of the specified * index template name, or index template configuration + * + * @opensearch.internal */ public class SimulateTemplateAction extends ActionType { @@ -57,6 +59,11 @@ private SimulateTemplateAction() { super(NAME, SimulateIndexTemplateResponse::new); } + /** + * Request for simulating a template action + * + * @opensearch.internal + */ public static class Request extends MasterNodeReadRequest { @Nullable diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateIndexTemplateAction.java index 598b5bdbf6d3b..89d04dc3f59f5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateIndexTemplateAction.java @@ -75,6 +75,12 @@ import static org.opensearch.cluster.metadata.MetadataIndexTemplateService.findV2Template; import static org.opensearch.cluster.metadata.MetadataIndexTemplateService.resolveSettings; +/** + * Transport Action for handling simulating an index template either by name (looking it up in the + * cluster state), or by a provided template configuration + * + * @opensearch.internal + */ public class TransportSimulateIndexTemplateAction extends TransportMasterNodeReadAction< SimulateIndexTemplateRequest, SimulateIndexTemplateResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateTemplateAction.java index e12544a02be4c..5b14d0a00ebfe 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/TransportSimulateTemplateAction.java @@ -64,6 +64,8 @@ /** * Handles simulating an index template either by name (looking it up in the * cluster state), or by a provided template configuration + * + * @opensearch.internal */ public class TransportSimulateTemplateAction extends TransportMasterNodeReadAction< SimulateTemplateAction.Request, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/package-info.java new file mode 100644 index 0000000000000..60b5a1d2abce8 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Post Index Templates transport handlers. */ +package org.opensearch.action.admin.indices.template.post; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java index 69149b953cc08..ff2fdeaab8582 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java @@ -48,6 +48,8 @@ /** * An action for putting a single component template into the cluster state + * + * @opensearch.internal */ public class PutComponentTemplateAction extends ActionType { @@ -60,6 +62,8 @@ private PutComponentTemplateAction() { /** * A request for putting a single component template into the cluster state + * + * @opensearch.internal */ public static class Request extends MasterNodeRequest { private final String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java index 059f3be745bb0..17cbe83faa625 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java @@ -51,6 +51,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * An action for putting a composable template into the cluster state + * + * @opensearch.internal + */ public class PutComposableIndexTemplateAction extends ActionType { public static final PutComposableIndexTemplateAction INSTANCE = new PutComposableIndexTemplateAction(); @@ -62,6 +67,8 @@ private PutComposableIndexTemplateAction() { /** * A request for putting a single index template into the cluster state + * + * @opensearch.internal */ public static class Request extends MasterNodeRequest implements IndicesRequest { private final String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateAction.java index e3c072908596f..06a9f6fbba409 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * An action for putting an index template into the cluster state + * + * @opensearch.internal + */ public class PutIndexTemplateAction extends ActionType { public static final PutIndexTemplateAction INSTANCE = new PutIndexTemplateAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequest.java index 608e3da699318..4c826477978fc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequest.java @@ -77,6 +77,8 @@ /** * A request to create an index template. + * + * @opensearch.internal */ public class PutIndexTemplateRequest extends MasterNodeRequest implements IndicesRequest, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java index e5a02acb4a6e9..df12dc5d66998 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java @@ -43,6 +43,11 @@ import java.util.List; import java.util.Map; +/** + * A request builder for putting an index template into the cluster state + * + * @opensearch.internal + */ public class PutIndexTemplateRequestBuilder extends MasterNodeOperationRequestBuilder< PutIndexTemplateRequest, AcknowledgedResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComponentTemplateAction.java index 022ffbeb7e03a..469c20e497822 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComponentTemplateAction.java @@ -54,6 +54,11 @@ import java.io.IOException; +/** + * An action for putting a single component template into the cluster state + * + * @opensearch.internal + */ public class TransportPutComponentTemplateAction extends TransportMasterNodeAction< PutComponentTemplateAction.Request, AcknowledgedResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComposableIndexTemplateAction.java index 7739c66b4cbd4..19485afe5d706 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutComposableIndexTemplateAction.java @@ -50,6 +50,11 @@ import java.io.IOException; +/** + * An action for putting a composable index template into the cluster state + * + * @opensearch.internal + */ public class TransportPutComposableIndexTemplateAction extends TransportMasterNodeAction< PutComposableIndexTemplateAction.Request, AcknowledgedResponse> { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java index 42d932c62da55..778e0b374e2aa 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java @@ -56,6 +56,8 @@ /** * Put index template action. + * + * @opensearch.internal */ public class TransportPutIndexTemplateAction extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/package-info.java new file mode 100644 index 0000000000000..a0033a434b7b3 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Put Index Templates transport handlers. */ +package org.opensearch.action.admin.indices.template.put; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexShardUpgradeStatus.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexShardUpgradeStatus.java index 954ab28542904..df937fab349ec 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexShardUpgradeStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexShardUpgradeStatus.java @@ -37,6 +37,11 @@ import java.util.Arrays; import java.util.Iterator; +/** + * Status for an Index Shard Upgrade + * + * @opensearch.internal + */ public class IndexShardUpgradeStatus implements Iterable { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java index 19f97faff3c61..2cff1f04d3fd2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/IndexUpgradeStatus.java @@ -38,6 +38,11 @@ import java.util.List; import java.util.Map; +/** + * Status for an Index Upgrade + * + * @opensearch.internal + */ public class IndexUpgradeStatus implements Iterable { private final String index; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/ShardUpgradeStatus.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/ShardUpgradeStatus.java index 579bd5e969eef..8ca8188899d02 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/ShardUpgradeStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/ShardUpgradeStatus.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Status for a Shard Upgrade + * + * @opensearch.internal + */ public class ShardUpgradeStatus extends BroadcastShardResponse { private ShardRouting shardRouting; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java index fcad2ccc6298d..b2f6cd62b1be7 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/TransportUpgradeStatusAction.java @@ -55,6 +55,11 @@ import java.io.IOException; import java.util.List; +/** + * Transport Action for Upgrading an Index + * + * @opensearch.internal + */ public class TransportUpgradeStatusAction extends TransportBroadcastByNodeAction< UpgradeStatusRequest, UpgradeStatusResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusAction.java index 7612bcb4464d4..a43d7580a571f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Action for Upgrading an Index + * + * @opensearch.internal + */ public class UpgradeStatusAction extends ActionType { public static final UpgradeStatusAction INSTANCE = new UpgradeStatusAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequest.java index bc7f0f31a6197..48a19ccdf0b94 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport Request for retrieving status of upgrading an Index + * + * @opensearch.internal + */ public class UpgradeStatusRequest extends BroadcastRequest { public UpgradeStatusRequest() { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java index 6f4f601a81d8a..c698c38fe12d5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.broadcast.BroadcastOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport Request Builder for retrieving status of upgrading an Index + * + * @opensearch.internal + */ public class UpgradeStatusRequestBuilder extends BroadcastOperationRequestBuilder< UpgradeStatusRequest, UpgradeStatusResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java index a8bb5cfc8bba1..311f86b0fe3b9 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java @@ -47,6 +47,11 @@ import java.util.Map; import java.util.Set; +/** + * Transport Response for retrieving status of upgrading an Index + * + * @opensearch.internal + */ public class UpgradeStatusResponse extends BroadcastResponse { private ShardUpgradeStatus[] shards; @@ -200,6 +205,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/package-info.java new file mode 100644 index 0000000000000..58ad55e715d94 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Get Upgrade Indices transport handlers. */ +package org.opensearch.action.admin.indices.upgrade.get; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/package-info.java new file mode 100644 index 0000000000000..ee5633c39fc2f --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Upgrade Indices transport handlers. */ +package org.opensearch.action.admin.indices.upgrade; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeRequest.java deleted file mode 100644 index fcc85e1a9cb5c..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeRequest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.upgrade.post; - -import org.opensearch.action.support.broadcast.BroadcastShardRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.index.shard.ShardId; - -import java.io.IOException; - -public final class ShardUpgradeRequest extends BroadcastShardRequest { - - private UpgradeRequest request; - - public ShardUpgradeRequest(StreamInput in) throws IOException { - super(in); - request = new UpgradeRequest(in); - } - - ShardUpgradeRequest(ShardId shardId, UpgradeRequest request) { - super(shardId, request); - this.request = request; - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - request.writeTo(out); - } - - public UpgradeRequest upgradeRequest() { - return this.request; - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeResult.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeResult.java index a4fcbaca55299..4eea1f01742bd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeResult.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/ShardUpgradeResult.java @@ -41,6 +41,11 @@ import java.io.IOException; import java.text.ParseException; +/** + * Result for Upgrading a Shard + * + * @opensearch.internal + */ class ShardUpgradeResult implements Writeable { private ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java index 1048de90b214e..e50c8a94d5e20 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeAction.java @@ -67,6 +67,8 @@ /** * Upgrade index/indices action. + * + * @opensearch.internal */ public class TransportUpgradeAction extends TransportBroadcastByNodeAction { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeSettingsAction.java index cacd341730e12..4c352a172c040 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/TransportUpgradeSettingsAction.java @@ -53,6 +53,11 @@ import java.io.IOException; +/** + * Transport action for upgrading index settings + * + * @opensearch.internal + */ public class TransportUpgradeSettingsAction extends TransportMasterNodeAction { private static final Logger logger = LogManager.getLogger(TransportUpgradeSettingsAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeAction.java index ee9da454ad141..369503bb54ecf 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeAction.java @@ -36,6 +36,8 @@ /** * Upgrade index/indices action. + * + * @opensearch.internal */ public class UpgradeAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java index 94d07075a8f3e..fc75da23c805e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java @@ -44,9 +44,16 @@ * @see org.opensearch.client.Requests#upgradeRequest(String...) * @see org.opensearch.client.IndicesAdminClient#upgrade(UpgradeRequest) * @see UpgradeResponse + * + * @opensearch.internal */ public class UpgradeRequest extends BroadcastRequest { + /** + * Default config for Upgrade Requests + * + * @opensearch.internal + */ public static final class Defaults { public static final boolean UPGRADE_ONLY_ANCIENT_SEGMENTS = false; } diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java index 5deff45aadc9b..8203f9d51b8e4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java @@ -38,6 +38,8 @@ /** * A request to upgrade one or more indices. In order to optimize on all the indices, pass an empty array or * {@code null} for the indices. + * + * @opensearch.internal */ public class UpgradeRequestBuilder extends BroadcastOperationRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeResponse.java index 07f9debbbf97b..ff1fd2b5635c0 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeResponse.java @@ -47,7 +47,7 @@ /** * A response for the upgrade action. * - * + * @opensearch.internal */ public class UpgradeResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsAction.java index f9ecc9ace9171..05944e781d109 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action for upgrading index settings + * + * @opensearch.internal + */ public class UpgradeSettingsAction extends ActionType { public static final UpgradeSettingsAction INSTANCE = new UpgradeSettingsAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsClusterStateUpdateRequest.java index cf24e20a44ee3..ee6c6161713ac 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsClusterStateUpdateRequest.java @@ -40,6 +40,8 @@ /** * Cluster state update request that allows to change minimum compatibility settings for some indices + * + * @opensearch.internal */ public class UpgradeSettingsClusterStateUpdateRequest extends ClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequest.java index dc3a60c62033b..d6b784e44befb 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequest.java @@ -46,6 +46,8 @@ /** * Request for an update index settings action + * + * @opensearch.internal */ public class UpgradeSettingsRequest extends AcknowledgedRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java deleted file mode 100644 index d3a8cc311bb8a..0000000000000 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -package org.opensearch.action.admin.indices.upgrade.post; - -import org.opensearch.Version; -import org.opensearch.action.support.master.AcknowledgedRequestBuilder; -import org.opensearch.action.support.master.AcknowledgedResponse; -import org.opensearch.client.OpenSearchClient; -import org.opensearch.common.collect.Tuple; - -import java.util.Map; - -/** - * Builder for an update index settings request - */ -public class UpgradeSettingsRequestBuilder extends AcknowledgedRequestBuilder< - UpgradeSettingsRequest, - AcknowledgedResponse, - UpgradeSettingsRequestBuilder> { - - public UpgradeSettingsRequestBuilder(OpenSearchClient client, UpgradeSettingsAction action) { - super(client, action, new UpgradeSettingsRequest()); - } - - /** - * Sets the index versions to be updated - */ - public UpgradeSettingsRequestBuilder setVersions(Map> versions) { - request.versions(versions); - return this; - } -} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/package-info.java new file mode 100644 index 0000000000000..ae8c8839acaba --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Post Upgrade Indices transport handlers. */ +package org.opensearch.action.admin.indices.upgrade.post; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/package-info.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/package-info.java new file mode 100644 index 0000000000000..ee210f7495e70 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Query Validation transport handlers. */ +package org.opensearch.action.admin.indices.validate; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/QueryExplanation.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/QueryExplanation.java index 3764cfd1e608b..087c5e4d2b1ab 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/QueryExplanation.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/QueryExplanation.java @@ -47,6 +47,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * Query Explanation + * + * @opensearch.internal + */ public class QueryExplanation implements Writeable, ToXContentFragment { public static final String INDEX_FIELD = "index"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java index 4d6525d002381..7df5a27929778 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java @@ -45,6 +45,8 @@ /** * Internal validate request executed directly against a specific index shard. + * + * @opensearch.internal */ public class ShardValidateQueryRequest extends BroadcastShardRequest { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java index 88080bd7667f3..7da73f5038e92 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java @@ -42,7 +42,7 @@ /** * Internal validate response of a shard validate request executed directly against a specific shard. * - * + * @opensearch.internal */ class ShardValidateQueryResponse extends BroadcastShardResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/TransportValidateQueryAction.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/TransportValidateQueryAction.java index 1849b41ce707f..431c5468d1850 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/TransportValidateQueryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/TransportValidateQueryAction.java @@ -72,6 +72,11 @@ import java.util.concurrent.atomic.AtomicReferenceArray; import java.util.function.LongSupplier; +/** + * Transport Action to Validate a Query + * + * @opensearch.internal + */ public class TransportValidateQueryAction extends TransportBroadcastAction< ValidateQueryRequest, ValidateQueryResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryAction.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryAction.java index a9b0954287c30..cdeb9e818a52f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Action to Validate a Query + * + * @opensearch.internal + */ public class ValidateQueryAction extends ActionType { public static final ValidateQueryAction INSTANCE = new ValidateQueryAction(); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequest.java index 1bb85c4e84483..75295f74582b9 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequest.java @@ -52,6 +52,8 @@ * A request to validate a specific query. *

    * The request requires the query to be set using {@link #query(QueryBuilder)} + * + * @opensearch.internal */ public class ValidateQueryRequest extends BroadcastRequest implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java index 88261e6536240..6209f41d88be2 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.index.query.QueryBuilder; +/** + * Transport Request Builder to Validate a Query + * + * @opensearch.internal + */ public class ValidateQueryRequestBuilder extends BroadcastOperationRequestBuilder< ValidateQueryRequest, ValidateQueryResponse, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryResponse.java index 53d1463c23351..2e843369f6af0 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/validate/query/ValidateQueryResponse.java @@ -52,7 +52,7 @@ /** * The response of the validate action. * - * + * @opensearch.internal */ public class ValidateQueryResponse extends BroadcastResponse { diff --git a/server/src/main/java/org/opensearch/action/admin/package-info.java b/server/src/main/java/org/opensearch/action/admin/package-info.java index 1ee6ebacef3a5..4be3b7cf12e9c 100644 --- a/server/src/main/java/org/opensearch/action/admin/package-info.java +++ b/server/src/main/java/org/opensearch/action/admin/package-info.java @@ -25,12 +25,12 @@ * under the License. */ -/** - * Administrative Actions. - */ /* * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ +/** + * Administrative Actions. + */ package org.opensearch.action.admin; diff --git a/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java b/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java index 50acd82ae9002..0b22ee04141ed 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java +++ b/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java @@ -53,6 +53,8 @@ * * * Note that backoff policies are exposed as Iterables in order to be consumed multiple times. + * + * @opensearch.internal */ public abstract class BackoffPolicy implements Iterable { private static final BackoffPolicy NO_BACKOFF = new NoBackoff(); @@ -117,6 +119,11 @@ private static TimeValue checkDelay(TimeValue delay) { return delay; } + /** + * Concrete No Back Off Policy + * + * @opensearch.internal + */ private static class NoBackoff extends BackoffPolicy { @Override public Iterator iterator() { @@ -134,6 +141,11 @@ public TimeValue next() { } } + /** + * Concrete Exponential Back Off Policy + * + * @opensearch.internal + */ private static class ExponentialBackoff extends BackoffPolicy { private final int start; @@ -152,6 +164,11 @@ public Iterator iterator() { } } + /** + * Concrete Exponential Back Off Iterator + * + * @opensearch.internal + */ private static class ExponentialBackoffIterator implements Iterator { private final int numberOfElements; @@ -180,6 +197,11 @@ public TimeValue next() { } } + /** + * Concrete Constant Back Off Policy + * + * @opensearch.internal + */ private static final class ConstantBackoff extends BackoffPolicy { private final TimeValue delay; @@ -197,6 +219,11 @@ public Iterator iterator() { } } + /** + * Concrete Constant Back Off Iterator + * + * @opensearch.internal + */ private static final class ConstantBackoffIterator implements Iterator { private final TimeValue delay; private final int numberOfElements; @@ -222,6 +249,11 @@ public TimeValue next() { } } + /** + * Concrete Wrapped Back Off Policy + * + * @opensearch.internal + */ private static final class WrappedBackoffPolicy extends BackoffPolicy { private final BackoffPolicy delegate; private final Runnable onBackoff; @@ -237,6 +269,11 @@ public Iterator iterator() { } } + /** + * Concrete Wrapped Back Off Iterator + * + * @opensearch.internal + */ private static final class WrappedBackoffIterator implements Iterator { private final Iterator delegate; private final Runnable onBackoff; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkAction.java b/server/src/main/java/org/opensearch/action/bulk/BulkAction.java index 031c8efa8cb84..f80ec32628b8a 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkAction.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkAction.java @@ -36,6 +36,11 @@ import org.opensearch.common.settings.Settings; import org.opensearch.transport.TransportRequestOptions; +/** + * Transport action for bulk indexing + * + * @opensearch.internal + */ public class BulkAction extends ActionType { public static final BulkAction INSTANCE = new BulkAction(); diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkItemRequest.java b/server/src/main/java/org/opensearch/action/bulk/BulkItemRequest.java index 2002d5864e966..f39ba589a3019 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkItemRequest.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkItemRequest.java @@ -45,6 +45,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport request for a Single bulk item + * + * @opensearch.internal + */ public class BulkItemRequest implements Writeable, Accountable { private static final long SHALLOW_SIZE = RamUsageEstimator.shallowSizeOfInstance(BulkItemRequest.class); diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java b/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java index fdb27a00bac2d..346e394bbb35e 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java @@ -67,6 +67,8 @@ /** * Represents a single item response for an action executed as part of the bulk API. Holds the index/type/id * of the relevant action, and if it has failed or not (with the failure message in case it failed). + * + * @opensearch.internal */ public class BulkItemResponse implements Writeable, StatusToXContentObject { @@ -176,6 +178,8 @@ public static BulkItemResponse fromXContent(XContentParser parser, int id) throw /** * Represents a failure. + * + * @opensearch.internal */ public static class Failure implements Writeable, ToXContentFragment { public static final String INDEX_FIELD = "index"; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkPrimaryExecutionContext.java b/server/src/main/java/org/opensearch/action/bulk/BulkPrimaryExecutionContext.java index 17bfa082295af..896456089ee3e 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkPrimaryExecutionContext.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkPrimaryExecutionContext.java @@ -48,6 +48,8 @@ * This is a utility class that holds the per request state needed to perform bulk operations on the primary. * More specifically, it maintains an index to the current executing bulk item, which allows execution * to stop and wait for external events such as mapping updates. + * + * @opensearch.internal */ class BulkPrimaryExecutionContext { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java b/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java index 90a177119cfd8..0ee289e8f5af7 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java @@ -63,6 +63,8 @@ * requests allowed to be executed in parallel. *

    * In order to create a new bulk processor, use the {@link Builder}. + * + * @opensearch.internal */ public class BulkProcessor implements Closeable { @@ -92,6 +94,8 @@ public interface Listener { /** * A builder used to create a build an instance of a bulk processor. + * + * @opensearch.internal */ public static class Builder { @@ -543,6 +547,11 @@ public void flush() { } } + /** + * Flush for bulk processor + * + * @opensearch.internal + */ class Flush implements Runnable { @Override public void run() { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkRequest.java b/server/src/main/java/org/opensearch/action/bulk/BulkRequest.java index e3bf5bced5072..25b335eae0bf1 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkRequest.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkRequest.java @@ -70,6 +70,8 @@ * * Note that we only support refresh on the bulk request not per item. * @see org.opensearch.client.Client#bulk(BulkRequest) + * + * @opensearch.internal */ public class BulkRequest extends ActionRequest implements CompositeIndicesRequest, WriteRequest, Accountable { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkRequestBuilder.java b/server/src/main/java/org/opensearch/action/bulk/BulkRequestBuilder.java index c58877e48a7eb..d2e0d558fcc1b 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkRequestBuilder.java @@ -50,6 +50,8 @@ /** * A bulk request holds an ordered {@link IndexRequest}s and {@link DeleteRequest}s and allows to executes * it in a single batch. + * + * @opensearch.internal */ public class BulkRequestBuilder extends ActionRequestBuilder implements WriteRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkRequestHandler.java b/server/src/main/java/org/opensearch/action/bulk/BulkRequestHandler.java index 5b4ec5cf8679a..541d29102ecd2 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkRequestHandler.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkRequestHandler.java @@ -44,6 +44,8 @@ /** * Implements the low-level details of bulk request handling + * + * @opensearch.internal */ public final class BulkRequestHandler { private final Logger logger; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkRequestParser.java b/server/src/main/java/org/opensearch/action/bulk/BulkRequestParser.java index 042e104f70c7f..675905cc60e75 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkRequestParser.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkRequestParser.java @@ -61,6 +61,8 @@ /** * Helper to parse bulk requests. This should be considered an internal class. + * + * @opensearch.internal */ public final class BulkRequestParser { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkResponse.java b/server/src/main/java/org/opensearch/action/bulk/BulkResponse.java index 751ad567c8639..6dec144f2ccf0 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkResponse.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkResponse.java @@ -55,6 +55,8 @@ * A response of a bulk execution. Holding a response for each item responding (in order) of the * bulk requests. Each item holds the index/type/id is operated on, and if it failed or not (with the * failure message). + * + * @opensearch.internal */ public class BulkResponse extends ActionResponse implements Iterable, StatusToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkShardRequest.java b/server/src/main/java/org/opensearch/action/bulk/BulkShardRequest.java index b082395263875..a7d0de98981ba 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkShardRequest.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkShardRequest.java @@ -47,6 +47,11 @@ import java.util.Set; import java.util.stream.Stream; +/** + * A bulk shard request targeting a specific shard ID + * + * @opensearch.internal + */ public class BulkShardRequest extends ReplicatedWriteRequest implements Accountable { public static final Version COMPACT_SHARD_ID_VERSION = LegacyESVersion.V_7_9_0; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkShardResponse.java b/server/src/main/java/org/opensearch/action/bulk/BulkShardResponse.java index 18d954a4feb23..b96ebcb3a3c0a 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkShardResponse.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkShardResponse.java @@ -43,6 +43,11 @@ import java.io.IOException; +/** + * Transport response for a bulk shard request + * + * @opensearch.internal + */ public class BulkShardResponse extends ReplicationResponse implements WriteResponse { private static final Version COMPACT_SHARD_ID_VERSION = LegacyESVersion.V_7_9_0; diff --git a/server/src/main/java/org/opensearch/action/bulk/MappingUpdatePerformer.java b/server/src/main/java/org/opensearch/action/bulk/MappingUpdatePerformer.java index ebfe82eb6ed38..688912afe0537 100644 --- a/server/src/main/java/org/opensearch/action/bulk/MappingUpdatePerformer.java +++ b/server/src/main/java/org/opensearch/action/bulk/MappingUpdatePerformer.java @@ -36,6 +36,11 @@ import org.opensearch.index.mapper.Mapping; import org.opensearch.index.shard.ShardId; +/** + * Updates the mappings on the cluster manager + * + * @opensearch.internal + */ public interface MappingUpdatePerformer { /** diff --git a/server/src/main/java/org/opensearch/action/bulk/Retry.java b/server/src/main/java/org/opensearch/action/bulk/Retry.java index bb1197699d894..fdd4447144008 100644 --- a/server/src/main/java/org/opensearch/action/bulk/Retry.java +++ b/server/src/main/java/org/opensearch/action/bulk/Retry.java @@ -49,6 +49,8 @@ /** * Encapsulates synchronous and asynchronous retry logic. + * + * @opensearch.internal */ public class Retry { private final BackoffPolicy backoffPolicy; @@ -92,6 +94,11 @@ public PlainActionFuture withBackoff( return future; } + /** + * Retry handler + * + * @opensearch.internal + */ static class RetryHandler implements ActionListener { private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS; private static final Logger logger = LogManager.getLogger(RetryHandler.class); diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java index 560fd1d8a45b3..1fabc3b1a7ea8 100644 --- a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java @@ -112,6 +112,8 @@ /** * Groups bulk request items by shard, optionally creating non-existent indices and * delegates to {@link TransportShardBulkAction} for shard-level bulk execution + * + * @opensearch.internal */ public class TransportBulkAction extends HandledTransportAction { @@ -481,7 +483,9 @@ private long buildTookInMillis(long startTimeNanos) { /** * retries on retryable cluster blocks, resolves item requests, * constructs shard bulk requests and delegates execution to shard bulk action - * */ + * + * @opensearch.internal + */ private final class BulkOperation extends ActionRunnable { private final Task task; private BulkRequest bulkRequest; // set to null once all requests are sent out @@ -770,6 +774,11 @@ void executeBulk( new BulkOperation(task, bulkRequest, listener, responses, startTimeNanos, indicesThatCannotBeCreated).run(); } + /** + * Concrete indices + * + * @opensearch.internal + */ private static class ConcreteIndices { private final ClusterState state; private final IndexNameExpressionResolver indexNameExpressionResolver; @@ -872,6 +881,11 @@ public boolean isForceExecution() { ); } + /** + * A modifier for a bulk request + * + * @opensearch.internal + */ static final class BulkRequestModifier implements Iterator> { final BulkRequest bulkRequest; diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java index 5311186fee0dc..f1c3e56b02eca 100644 --- a/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java +++ b/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java @@ -94,7 +94,11 @@ import java.util.function.Function; import java.util.function.LongSupplier; -/** Performs shard-level bulk (index, delete or update) operations */ +/** + * Performs shard-level bulk (index, delete or update) operations + * + * @opensearch.internal + */ public class TransportShardBulkAction extends TransportWriteAction { public static final String ACTION_NAME = BulkAction.NAME + "[s]"; diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportSingleItemBulkWriteAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportSingleItemBulkWriteAction.java index a833687d591de..e5f96fdab9c96 100644 --- a/server/src/main/java/org/opensearch/action/bulk/TransportSingleItemBulkWriteAction.java +++ b/server/src/main/java/org/opensearch/action/bulk/TransportSingleItemBulkWriteAction.java @@ -45,7 +45,11 @@ import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; -/** use transport bulk action directly */ +/** + * use transport bulk action directly + * + * @opensearch.internal + */ @Deprecated public abstract class TransportSingleItemBulkWriteAction< Request extends ReplicatedWriteRequest, diff --git a/server/src/main/java/org/opensearch/action/bulk/package-info.java b/server/src/main/java/org/opensearch/action/bulk/package-info.java new file mode 100644 index 0000000000000..45c42c0efa3f2 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/bulk/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Bulk API transport handlers. */ +package org.opensearch.action.bulk; diff --git a/server/src/main/java/org/opensearch/action/delete/DeleteAction.java b/server/src/main/java/org/opensearch/action/delete/DeleteAction.java index dc58ebee6c356..b93867ca12efe 100644 --- a/server/src/main/java/org/opensearch/action/delete/DeleteAction.java +++ b/server/src/main/java/org/opensearch/action/delete/DeleteAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to delete a document from an index + * + * @opensearch.internal + */ public class DeleteAction extends ActionType { public static final DeleteAction INSTANCE = new DeleteAction(); diff --git a/server/src/main/java/org/opensearch/action/delete/DeleteRequest.java b/server/src/main/java/org/opensearch/action/delete/DeleteRequest.java index c40933ba9c92e..ce723df0c383a 100644 --- a/server/src/main/java/org/opensearch/action/delete/DeleteRequest.java +++ b/server/src/main/java/org/opensearch/action/delete/DeleteRequest.java @@ -64,6 +64,8 @@ * @see DeleteResponse * @see org.opensearch.client.Client#delete(DeleteRequest) * @see org.opensearch.client.Requests#deleteRequest(String) + * + * @opensearch.internal */ public class DeleteRequest extends ReplicatedWriteRequest implements diff --git a/server/src/main/java/org/opensearch/action/delete/DeleteRequestBuilder.java b/server/src/main/java/org/opensearch/action/delete/DeleteRequestBuilder.java index f6ee0f4a7b278..0436962ce01d2 100644 --- a/server/src/main/java/org/opensearch/action/delete/DeleteRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/delete/DeleteRequestBuilder.java @@ -40,6 +40,8 @@ /** * A delete document action request builder. + * + * @opensearch.internal */ public class DeleteRequestBuilder extends ReplicationRequestBuilder implements diff --git a/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java b/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java index 6b000561ad282..46049cdad58bd 100644 --- a/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java +++ b/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java @@ -47,6 +47,8 @@ * * @see org.opensearch.action.delete.DeleteRequest * @see org.opensearch.client.Client#delete(DeleteRequest) + * + * @opensearch.internal */ public class DeleteResponse extends DocWriteResponse { @@ -109,6 +111,8 @@ public static void parseXContentFields(XContentParser parser, Builder context) t * Builder class for {@link DeleteResponse}. This builder is usually used during xcontent parsing to * temporarily store the parsed values, then the {@link DocWriteResponse.Builder#build()} method is called to * instantiate the {@link DeleteResponse}. + * + * @opensearch.internal */ public static class Builder extends DocWriteResponse.Builder { diff --git a/server/src/main/java/org/opensearch/action/delete/TransportDeleteAction.java b/server/src/main/java/org/opensearch/action/delete/TransportDeleteAction.java index adeebcba28a89..039214459ac21 100644 --- a/server/src/main/java/org/opensearch/action/delete/TransportDeleteAction.java +++ b/server/src/main/java/org/opensearch/action/delete/TransportDeleteAction.java @@ -42,6 +42,8 @@ * Performs the delete operation. * * Deprecated use TransportBulkAction with a single item instead + * + * @opensearch.internal */ @Deprecated public class TransportDeleteAction extends TransportSingleItemBulkWriteAction { diff --git a/server/src/main/java/org/opensearch/action/explain/ExplainAction.java b/server/src/main/java/org/opensearch/action/explain/ExplainAction.java index ff534dbf82f6d..e955ecc8a1e45 100644 --- a/server/src/main/java/org/opensearch/action/explain/ExplainAction.java +++ b/server/src/main/java/org/opensearch/action/explain/ExplainAction.java @@ -36,6 +36,8 @@ /** * Entry point for the explain feature. + * + * @opensearch.internal */ public class ExplainAction extends ActionType { diff --git a/server/src/main/java/org/opensearch/action/explain/ExplainRequest.java b/server/src/main/java/org/opensearch/action/explain/ExplainRequest.java index 1543c2c95b269..8abdff55a82cc 100644 --- a/server/src/main/java/org/opensearch/action/explain/ExplainRequest.java +++ b/server/src/main/java/org/opensearch/action/explain/ExplainRequest.java @@ -53,6 +53,8 @@ /** * Explain request encapsulating the explain query and document identifier to get an explanation for. + * + * @opensearch.internal */ public class ExplainRequest extends SingleShardRequest implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/explain/ExplainRequestBuilder.java b/server/src/main/java/org/opensearch/action/explain/ExplainRequestBuilder.java index 6839479079845..a582b29346665 100644 --- a/server/src/main/java/org/opensearch/action/explain/ExplainRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/explain/ExplainRequestBuilder.java @@ -41,6 +41,8 @@ /** * A builder for {@link ExplainRequest}. + * + * @opensearch.internal */ public class ExplainRequestBuilder extends SingleShardOperationRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/explain/ExplainResponse.java b/server/src/main/java/org/opensearch/action/explain/ExplainResponse.java index 6dd1945a38ffc..eca7add66047c 100644 --- a/server/src/main/java/org/opensearch/action/explain/ExplainResponse.java +++ b/server/src/main/java/org/opensearch/action/explain/ExplainResponse.java @@ -55,6 +55,8 @@ /** * Response containing the score explanation. + * + * @opensearch.internal */ public class ExplainResponse extends ActionResponse implements StatusToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/explain/TransportExplainAction.java b/server/src/main/java/org/opensearch/action/explain/TransportExplainAction.java index 9fb16eec7d36b..5752860af4f16 100644 --- a/server/src/main/java/org/opensearch/action/explain/TransportExplainAction.java +++ b/server/src/main/java/org/opensearch/action/explain/TransportExplainAction.java @@ -68,6 +68,8 @@ /** * Explain transport action. Computes the explain on the targeted shard. + * + * @opensearch.internal */ // TODO: AggregatedDfs. Currently the idf can be different then when executing a normal search with explain. public class TransportExplainAction extends TransportSingleShardAction { diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java index ffc059f08c70f..4fdf8d551af61 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java @@ -59,6 +59,8 @@ /** * Describes the capabilities of a field optionally merged across multiple indices. + * + * @opensearch.internal */ public class FieldCapabilities implements Writeable, ToXContentObject { @@ -296,6 +298,11 @@ public String toString() { return Strings.toString(this); } + /** + * Builder for field capabilities + * + * @opensearch.internal + */ static class Builder { private String name; private String type; @@ -385,6 +392,11 @@ FieldCapabilities build(boolean withIndices) { } } + /** + * Inner index capabilities + * + * @opensearch.internal + */ private static class IndexCaps { final String name; final boolean isSearchable; diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesAction.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesAction.java index d10fa5ee69811..e8585e60c8ffd 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesAction.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for a field capabilities request + * + * @opensearch.internal + */ public class FieldCapabilitiesAction extends ActionType { public static final FieldCapabilitiesAction INSTANCE = new FieldCapabilitiesAction(); diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexRequest.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexRequest.java index b349d8e2ca26f..3cfd21087582d 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexRequest.java @@ -46,6 +46,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Transport Request for Retrieving Field Capabilities for an Index + * + * @opensearch.internal + */ public class FieldCapabilitiesIndexRequest extends ActionRequest implements IndicesRequest { public static final IndicesOptions INDICES_OPTIONS = IndicesOptions.strictSingleIndexNoExpandForbidClosed(); diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexResponse.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexResponse.java index 0d7fd91a6bfd8..9225e0cdc6571 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesIndexResponse.java @@ -44,6 +44,8 @@ /** * Response for {@link TransportFieldCapabilitiesIndexAction}. + * + * @opensearch.internal */ public class FieldCapabilitiesIndexResponse extends ActionResponse implements Writeable { private final String indexName; diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequest.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequest.java index c8391fddf564d..688568ba9a6d6 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequest.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequest.java @@ -51,6 +51,9 @@ import java.util.Objects; import java.util.Set; +/** + * Transport request for retrieving field capabilities for an explicit list of fields + */ public final class FieldCapabilitiesRequest extends ActionRequest implements IndicesRequest.Replaceable, ToXContentObject { public static final String NAME = "field_caps_request"; diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java index 3c1f11c047ef4..70a90b98bdf25 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.index.query.QueryBuilder; +/** + * Transport request builder for retrieving field capabilities + * + * @opensearch.internal + */ public class FieldCapabilitiesRequestBuilder extends ActionRequestBuilder { public FieldCapabilitiesRequestBuilder(OpenSearchClient client, FieldCapabilitiesAction action, String... indices) { super(client, action, new FieldCapabilitiesRequest().indices(indices)); diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesResponse.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesResponse.java index 90b35d6e14e4e..e5f644987182c 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesResponse.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilitiesResponse.java @@ -56,6 +56,8 @@ /** * Response for {@link FieldCapabilitiesRequest} requests. + * + * @opensearch.internal */ public class FieldCapabilitiesResponse extends ActionResponse implements ToXContentObject { private static final ParseField INDICES_FIELD = new ParseField("indices"); diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/IndexFieldCapabilities.java b/server/src/main/java/org/opensearch/action/fieldcaps/IndexFieldCapabilities.java index d0629a46c9d4a..062e5bc1af7e5 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/IndexFieldCapabilities.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/IndexFieldCapabilities.java @@ -46,6 +46,8 @@ /** * Describes the capabilities of a field in a single index. + * + * @opensearch.internal */ public class IndexFieldCapabilities implements Writeable { diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesAction.java b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesAction.java index 07254db46d567..2d669a5f1aad9 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesAction.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesAction.java @@ -58,6 +58,11 @@ import java.util.Map; import java.util.Set; +/** + * Transport action for field capabilities requests + * + * @opensearch.internal + */ public class TransportFieldCapabilitiesAction extends HandledTransportAction { private final ThreadPool threadPool; private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java index a4807eff1acb4..99962741299ca 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java @@ -85,6 +85,11 @@ import static org.opensearch.action.support.TransportActions.isShardNotAvailableException; +/** + * Transport action for field capabilities request in an index + * + * @opensearch.internal + */ public class TransportFieldCapabilitiesIndexAction extends HandledTransportAction< FieldCapabilitiesIndexRequest, FieldCapabilitiesIndexResponse> { @@ -212,6 +217,8 @@ private ClusterBlockException checkRequestBlock(ClusterState state, String concr * An action that executes on each shard sequentially until it finds one that can match the provided * {@link FieldCapabilitiesIndexRequest#indexFilter()}. In which case the shard is used * to create the final {@link FieldCapabilitiesIndexResponse}. + * + * @opensearch.internal */ class AsyncShardsAction { private final FieldCapabilitiesIndexRequest request; @@ -336,6 +343,11 @@ public void handleException(TransportException exp) { } } + /** + * Shard transport handler for field capabilities index action + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override public void messageReceived(final FieldCapabilitiesIndexRequest request, final TransportChannel channel, Task task) diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/package-info.java b/server/src/main/java/org/opensearch/action/fieldcaps/package-info.java new file mode 100644 index 0000000000000..c7b7c01875d2b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/fieldcaps/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Field Capabilities transport handlers. */ +package org.opensearch.action.fieldcaps; diff --git a/server/src/main/java/org/opensearch/action/get/GetAction.java b/server/src/main/java/org/opensearch/action/get/GetAction.java index f90fbc9b3be1c..05544591f030e 100644 --- a/server/src/main/java/org/opensearch/action/get/GetAction.java +++ b/server/src/main/java/org/opensearch/action/get/GetAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to get a document + * + * @opensearch.internal + */ public class GetAction extends ActionType { public static final GetAction INSTANCE = new GetAction(); diff --git a/server/src/main/java/org/opensearch/action/get/GetRequest.java b/server/src/main/java/org/opensearch/action/get/GetRequest.java index 9badf2db92f67..5f740ba789bb2 100644 --- a/server/src/main/java/org/opensearch/action/get/GetRequest.java +++ b/server/src/main/java/org/opensearch/action/get/GetRequest.java @@ -60,6 +60,8 @@ * @see GetResponse * @see org.opensearch.client.Requests#getRequest(String) * @see org.opensearch.client.Client#get(GetRequest) + * + * @opensearch.internal */ public class GetRequest extends SingleShardRequest implements RealtimeRequest { diff --git a/server/src/main/java/org/opensearch/action/get/GetRequestBuilder.java b/server/src/main/java/org/opensearch/action/get/GetRequestBuilder.java index 492a88b9d3821..078c32adeb7c9 100644 --- a/server/src/main/java/org/opensearch/action/get/GetRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/get/GetRequestBuilder.java @@ -41,6 +41,8 @@ /** * A get document action request builder. + * + * @opensearch.internal */ public class GetRequestBuilder extends SingleShardOperationRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/get/GetResponse.java b/server/src/main/java/org/opensearch/action/get/GetResponse.java index a15607d696195..1118c3bb64f95 100644 --- a/server/src/main/java/org/opensearch/action/get/GetResponse.java +++ b/server/src/main/java/org/opensearch/action/get/GetResponse.java @@ -56,6 +56,8 @@ * * @see GetRequest * @see org.opensearch.client.Client#get(GetRequest) + * + * @opensearch.internal */ public class GetResponse extends ActionResponse implements Iterable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetAction.java b/server/src/main/java/org/opensearch/action/get/MultiGetAction.java index f7df277585250..bed5d0bd9e55e 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetAction.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for a multi get + * + * @opensearch.internal + */ public class MultiGetAction extends ActionType { public static final MultiGetAction INSTANCE = new MultiGetAction(); diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetItemResponse.java b/server/src/main/java/org/opensearch/action/get/MultiGetItemResponse.java index 1ff684fcc5872..dcc296c4b6e0b 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetItemResponse.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetItemResponse.java @@ -40,6 +40,8 @@ /** * A single multi get response. + * + * @opensearch.internal */ public class MultiGetItemResponse implements Writeable { diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java b/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java index 974799dd7bf4c..00df8657736ae 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java @@ -66,6 +66,11 @@ import java.util.List; import java.util.Locale; +/** + * Transport request for a multi get. + * + * @opensearch.internal + */ public class MultiGetRequest extends ActionRequest implements Iterable, @@ -85,6 +90,8 @@ public class MultiGetRequest extends ActionRequest /** * A single get item. + * + * @opensearch.internal */ public static class Item implements Writeable, IndicesRequest, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetRequestBuilder.java b/server/src/main/java/org/opensearch/action/get/MultiGetRequestBuilder.java index 56ac6cbd1b8c9..c317edc07da8b 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetRequestBuilder.java @@ -37,6 +37,8 @@ /** * A multi get document action request builder. + * + * @opensearch.internal */ public class MultiGetRequestBuilder extends ActionRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java b/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java index ca6249861dd50..b3664935b9489 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java @@ -52,6 +52,11 @@ import java.util.Iterator; import java.util.List; +/** + * Transport response for a multi get. + * + * @opensearch.internal + */ public class MultiGetResponse extends ActionResponse implements Iterable, ToXContentObject { private static final ParseField INDEX = new ParseField("_index"); @@ -61,6 +66,8 @@ public class MultiGetResponse extends ActionResponse implements Iterable { private int shardId; diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetShardResponse.java b/server/src/main/java/org/opensearch/action/get/MultiGetShardResponse.java index 2393fa4749876..069f9875185f8 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetShardResponse.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetShardResponse.java @@ -41,6 +41,11 @@ import java.util.ArrayList; import java.util.List; +/** + * Transport response for multi get shards. + * + * @opensearch.internal + */ public class MultiGetShardResponse extends ActionResponse { final IntArrayList locations; diff --git a/server/src/main/java/org/opensearch/action/get/TransportGetAction.java b/server/src/main/java/org/opensearch/action/get/TransportGetAction.java index 999cc8c12190b..6d6798fb64178 100644 --- a/server/src/main/java/org/opensearch/action/get/TransportGetAction.java +++ b/server/src/main/java/org/opensearch/action/get/TransportGetAction.java @@ -54,6 +54,8 @@ /** * Performs the get operation. + * + * @opensearch.internal */ public class TransportGetAction extends TransportSingleShardAction { diff --git a/server/src/main/java/org/opensearch/action/get/TransportMultiGetAction.java b/server/src/main/java/org/opensearch/action/get/TransportMultiGetAction.java index 33f1e559a072c..1e0566e23fff4 100644 --- a/server/src/main/java/org/opensearch/action/get/TransportMultiGetAction.java +++ b/server/src/main/java/org/opensearch/action/get/TransportMultiGetAction.java @@ -50,6 +50,11 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +/** + * Perform the multi get action. + * + * @opensearch.internal + */ public class TransportMultiGetAction extends HandledTransportAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/get/TransportShardMultiGetAction.java b/server/src/main/java/org/opensearch/action/get/TransportShardMultiGetAction.java index db35af9c3e20f..e882ffdc8c344 100644 --- a/server/src/main/java/org/opensearch/action/get/TransportShardMultiGetAction.java +++ b/server/src/main/java/org/opensearch/action/get/TransportShardMultiGetAction.java @@ -53,6 +53,11 @@ import java.io.IOException; +/** + * Perform the shard multi get action + * + * @opensearch.internal + */ public class TransportShardMultiGetAction extends TransportSingleShardAction { private static final String ACTION_NAME = MultiGetAction.NAME + "[shard]"; diff --git a/server/src/main/java/org/opensearch/action/index/IndexAction.java b/server/src/main/java/org/opensearch/action/index/IndexAction.java index 3f28af9b39d8a..0383cafba2958 100644 --- a/server/src/main/java/org/opensearch/action/index/IndexAction.java +++ b/server/src/main/java/org/opensearch/action/index/IndexAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for indexing a document. + * + * @opensearch.internal + */ public class IndexAction extends ActionType { public static final IndexAction INSTANCE = new IndexAction(); diff --git a/server/src/main/java/org/opensearch/action/index/IndexRequest.java b/server/src/main/java/org/opensearch/action/index/IndexRequest.java index 7bf6b876fa652..f863c4a11340e 100644 --- a/server/src/main/java/org/opensearch/action/index/IndexRequest.java +++ b/server/src/main/java/org/opensearch/action/index/IndexRequest.java @@ -88,6 +88,8 @@ * @see IndexResponse * @see org.opensearch.client.Requests#indexRequest(String) * @see org.opensearch.client.Client#index(IndexRequest) + * + * @opensearch.internal */ public class IndexRequest extends ReplicatedWriteRequest implements DocWriteRequest, CompositeIndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/index/IndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/index/IndexRequestBuilder.java index cef5ef0f85c62..2902ffd347c6a 100644 --- a/server/src/main/java/org/opensearch/action/index/IndexRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/index/IndexRequestBuilder.java @@ -46,6 +46,8 @@ /** * An index document action request builder. + * + * @opensearch.internal */ public class IndexRequestBuilder extends ReplicationRequestBuilder implements diff --git a/server/src/main/java/org/opensearch/action/index/IndexResponse.java b/server/src/main/java/org/opensearch/action/index/IndexResponse.java index be0826ce84f96..40811f2ae6583 100644 --- a/server/src/main/java/org/opensearch/action/index/IndexResponse.java +++ b/server/src/main/java/org/opensearch/action/index/IndexResponse.java @@ -48,6 +48,8 @@ * * @see IndexRequest * @see org.opensearch.client.Client#index(IndexRequest) + * + * @opensearch.internal */ public class IndexResponse extends DocWriteResponse { @@ -112,6 +114,8 @@ public static void parseXContentFields(XContentParser parser, Builder context) t * Builder class for {@link IndexResponse}. This builder is usually used during xcontent parsing to * temporarily store the parsed values, then the {@link Builder#build()} method is called to * instantiate the {@link IndexResponse}. + * + * @opensearch.internal */ public static class Builder extends DocWriteResponse.Builder { @Override diff --git a/server/src/main/java/org/opensearch/action/index/TransportIndexAction.java b/server/src/main/java/org/opensearch/action/index/TransportIndexAction.java index dcee695620498..fe4f80bf0c065 100644 --- a/server/src/main/java/org/opensearch/action/index/TransportIndexAction.java +++ b/server/src/main/java/org/opensearch/action/index/TransportIndexAction.java @@ -49,6 +49,8 @@ * * * Deprecated use TransportBulkAction with a single item instead + * + * @opensearch.internal */ @Deprecated public class TransportIndexAction extends TransportSingleItemBulkWriteAction { diff --git a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineAction.java b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineAction.java index 5ea978db3d5d4..6017be9747912 100644 --- a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action to delete a pipeline + * + * @opensearch.internal + */ public class DeletePipelineAction extends ActionType { public static final DeletePipelineAction INSTANCE = new DeletePipelineAction(); diff --git a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequest.java b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequest.java index 98bc125ce40dc..0bd102849eee8 100644 --- a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequest.java +++ b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequest.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.Objects; +/** + * transport request to delete a pipeline + * + * @opensearch.internal + */ public class DeletePipelineRequest extends AcknowledgedRequest { private String id; diff --git a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequestBuilder.java b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequestBuilder.java index 53b5080f414e0..6a2eb494e8d3f 100644 --- a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineRequestBuilder.java @@ -36,6 +36,11 @@ import org.opensearch.action.support.master.AcknowledgedResponse; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder to delete a pipeline + * + * @opensearch.internal + */ public class DeletePipelineRequestBuilder extends ActionRequestBuilder { public DeletePipelineRequestBuilder(OpenSearchClient client, DeletePipelineAction action) { diff --git a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineTransportAction.java b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineTransportAction.java index de2cf1ca74254..62fa2cbc595a6 100644 --- a/server/src/main/java/org/opensearch/action/ingest/DeletePipelineTransportAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/DeletePipelineTransportAction.java @@ -48,6 +48,11 @@ import java.io.IOException; +/** + * Perform the action of deleting a pipeline + * + * @opensearch.internal + */ public class DeletePipelineTransportAction extends TransportMasterNodeAction { private final IngestService ingestService; diff --git a/server/src/main/java/org/opensearch/action/ingest/GetPipelineAction.java b/server/src/main/java/org/opensearch/action/ingest/GetPipelineAction.java index 33b9d8f09d053..8371d82b8911e 100644 --- a/server/src/main/java/org/opensearch/action/ingest/GetPipelineAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/GetPipelineAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to get a pipeline + * + * @opensearch.internal + */ public class GetPipelineAction extends ActionType { public static final GetPipelineAction INSTANCE = new GetPipelineAction(); diff --git a/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequest.java b/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequest.java index 322fd1b8e1a52..f6ae98a5ea193 100644 --- a/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequest.java +++ b/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequest.java @@ -40,6 +40,11 @@ import java.io.IOException; +/** + * transport request to get a pipeline + * + * @opensearch.internal + */ public class GetPipelineRequest extends MasterNodeReadRequest { private String[] ids; diff --git a/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequestBuilder.java b/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequestBuilder.java index 45d9abc6b0adc..6ba0d4fbfe2f7 100644 --- a/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/ingest/GetPipelineRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder to get a pipeline + * + * @opensearch.internal + */ public class GetPipelineRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetPipelineRequest, GetPipelineResponse, diff --git a/server/src/main/java/org/opensearch/action/ingest/GetPipelineResponse.java b/server/src/main/java/org/opensearch/action/ingest/GetPipelineResponse.java index bf7dd909e390b..9e1895fc01857 100644 --- a/server/src/main/java/org/opensearch/action/ingest/GetPipelineResponse.java +++ b/server/src/main/java/org/opensearch/action/ingest/GetPipelineResponse.java @@ -53,6 +53,11 @@ import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +/** + * transport response for getting a pipeline + * + * @opensearch.internal + */ public class GetPipelineResponse extends ActionResponse implements StatusToXContentObject { private List pipelines; diff --git a/server/src/main/java/org/opensearch/action/ingest/GetPipelineTransportAction.java b/server/src/main/java/org/opensearch/action/ingest/GetPipelineTransportAction.java index a62201d097d12..9c7af1cfe3419 100644 --- a/server/src/main/java/org/opensearch/action/ingest/GetPipelineTransportAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/GetPipelineTransportAction.java @@ -48,6 +48,11 @@ import java.io.IOException; +/** + * Perform the action of getting a pipeline + * + * @opensearch.internal + */ public class GetPipelineTransportAction extends TransportMasterNodeReadAction { @Inject diff --git a/server/src/main/java/org/opensearch/action/ingest/IngestActionForwarder.java b/server/src/main/java/org/opensearch/action/ingest/IngestActionForwarder.java index 3ab3e3367fc6d..9df82c474c498 100644 --- a/server/src/main/java/org/opensearch/action/ingest/IngestActionForwarder.java +++ b/server/src/main/java/org/opensearch/action/ingest/IngestActionForwarder.java @@ -48,6 +48,8 @@ * A utility for forwarding ingest requests to ingest nodes in a round-robin fashion. * * TODO: move this into IngestService and make index/bulk actions call that + * + * @opensearch.internal */ public final class IngestActionForwarder implements ClusterStateApplier { diff --git a/server/src/main/java/org/opensearch/action/ingest/PutPipelineAction.java b/server/src/main/java/org/opensearch/action/ingest/PutPipelineAction.java index d61a1ae1041cb..1fcbd783d246b 100644 --- a/server/src/main/java/org/opensearch/action/ingest/PutPipelineAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/PutPipelineAction.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; +/** + * Transport action to put a new pipeline + * + * @opensearch.internal + */ public class PutPipelineAction extends ActionType { public static final PutPipelineAction INSTANCE = new PutPipelineAction(); diff --git a/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequest.java b/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequest.java index 526da7c4a74dc..d5fbaa46810f7 100644 --- a/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequest.java +++ b/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequest.java @@ -44,6 +44,11 @@ import java.io.IOException; import java.util.Objects; +/** + * transport request to put a pipeline + * + * @opensearch.internal + */ public class PutPipelineRequest extends AcknowledgedRequest implements ToXContentObject { private String id; diff --git a/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequestBuilder.java b/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequestBuilder.java index 8279e2f3756e9..fec2cdef089e4 100644 --- a/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/ingest/PutPipelineRequestBuilder.java @@ -38,6 +38,11 @@ import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentType; +/** + * Transport request builder to put a pipeline + * + * @opensearch.internal + */ public class PutPipelineRequestBuilder extends ActionRequestBuilder { public PutPipelineRequestBuilder(OpenSearchClient client, PutPipelineAction action) { diff --git a/server/src/main/java/org/opensearch/action/ingest/PutPipelineTransportAction.java b/server/src/main/java/org/opensearch/action/ingest/PutPipelineTransportAction.java index 89d1c1efed8a6..6f21744e5df08 100644 --- a/server/src/main/java/org/opensearch/action/ingest/PutPipelineTransportAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/PutPipelineTransportAction.java @@ -58,6 +58,11 @@ import static org.opensearch.ingest.IngestService.INGEST_ORIGIN; +/** + * Perform the action of putting a pipeline + * + * @opensearch.internal + */ public class PutPipelineTransportAction extends TransportMasterNodeAction { private final IngestService ingestService; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentBaseResult.java b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentBaseResult.java index 10ccb2003969d..2440a1802912b 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentBaseResult.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentBaseResult.java @@ -47,6 +47,8 @@ /** * Holds the end result of what a pipeline did to sample document provided via the simulate api. + * + * */ public final class SimulateDocumentBaseResult implements SimulateDocumentResult { private final WriteableIngestDocument ingestDocument; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentResult.java b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentResult.java index 3beaf43d2a1ae..77ee75fcb9663 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentResult.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentResult.java @@ -34,6 +34,11 @@ import org.opensearch.common.io.stream.Writeable; import org.opensearch.common.xcontent.ToXContentObject; +/** + * Interface to simulate a document result + * + * @opensearch.internal + */ public interface SimulateDocumentResult extends Writeable, ToXContentObject { } diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentVerboseResult.java b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentVerboseResult.java index 07d9b628fe35d..591a3e103fccf 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentVerboseResult.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulateDocumentVerboseResult.java @@ -47,6 +47,8 @@ /** * Holds the result of what a pipeline did to a sample document via the simulate api, but instead of {@link SimulateDocumentBaseResult} * this result class holds the intermediate result each processor did to the sample document. + * + * @opensearch.internal */ public final class SimulateDocumentVerboseResult implements SimulateDocumentResult { public static final String PROCESSOR_RESULT_FIELD = "processor_results"; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulateExecutionService.java b/server/src/main/java/org/opensearch/action/ingest/SimulateExecutionService.java index 8c620c707b3ac..ae66dafc954f9 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulateExecutionService.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulateExecutionService.java @@ -46,6 +46,11 @@ import static org.opensearch.ingest.TrackingResultProcessor.decorate; +/** + * Service to simulate pipeline execution + * + * @opensearch.internal + */ class SimulateExecutionService { private static final String THREAD_POOL_NAME = ThreadPool.Names.MANAGEMENT; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineAction.java b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineAction.java index 8039a83b5953e..df2cfda778d06 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action to simulate a pipeline + * + * @opensearch.internal + */ public class SimulatePipelineAction extends ActionType { public static final SimulatePipelineAction INSTANCE = new SimulatePipelineAction(); diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequest.java b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequest.java index bc0317e076319..23bbc535fcf5a 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequest.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequest.java @@ -55,6 +55,11 @@ import java.util.Map; import java.util.Objects; +/** + * transport request to simulate a pipeline + * + * @opensearch.internal + */ public class SimulatePipelineRequest extends ActionRequest implements ToXContentObject { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(SimulatePipelineRequest.class); @@ -125,6 +130,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ public static final class Fields { static final String PIPELINE = "pipeline"; static final String DOCS = "docs"; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequestBuilder.java b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequestBuilder.java index 6befbea774685..0cf71b66fe936 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentType; +/** + * Transport request builder to simulate a pipeline + * + * @opensearch.internal + */ public class SimulatePipelineRequestBuilder extends ActionRequestBuilder { /** diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineResponse.java b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineResponse.java index c3540e4e9b8fd..b0c4865984a14 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineResponse.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineResponse.java @@ -51,6 +51,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +/** + * transport response for simulating a pipeline + * + * @opensearch.internal + */ public class SimulatePipelineResponse extends ActionResponse implements ToXContentObject { private String pipelineId; private boolean verbose; @@ -173,6 +178,11 @@ public static SimulatePipelineResponse fromXContent(XContentParser parser) { return PARSER.apply(parser, null); } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String DOCUMENTS = "docs"; } diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineTransportAction.java b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineTransportAction.java index 7348035deaafe..daffbbf61a1bb 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineTransportAction.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulatePipelineTransportAction.java @@ -45,6 +45,11 @@ import java.util.Map; +/** + * Perform the action of simulating a pipeline + * + * @opensearch.internal + */ public class SimulatePipelineTransportAction extends HandledTransportAction { private final IngestService ingestService; diff --git a/server/src/main/java/org/opensearch/action/ingest/SimulateProcessorResult.java b/server/src/main/java/org/opensearch/action/ingest/SimulateProcessorResult.java index eae36cc4efd7c..e971aca855c30 100644 --- a/server/src/main/java/org/opensearch/action/ingest/SimulateProcessorResult.java +++ b/server/src/main/java/org/opensearch/action/ingest/SimulateProcessorResult.java @@ -51,6 +51,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * Simulates an ingest processor result + * + * @opensearch.internal + */ public class SimulateProcessorResult implements Writeable, ToXContentObject { private static final String IGNORED_ERROR_FIELD = "ignored_error"; diff --git a/server/src/main/java/org/opensearch/action/ingest/WriteableIngestDocument.java b/server/src/main/java/org/opensearch/action/ingest/WriteableIngestDocument.java index 2f8c65486c22f..9ceb1d7e3f890 100644 --- a/server/src/main/java/org/opensearch/action/ingest/WriteableIngestDocument.java +++ b/server/src/main/java/org/opensearch/action/ingest/WriteableIngestDocument.java @@ -52,6 +52,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; +/** + * An ingest document that implements writeable + * + * @opensearch.internal + */ final class WriteableIngestDocument implements Writeable, ToXContentFragment { static final String SOURCE_FIELD = "_source"; diff --git a/server/src/main/java/org/opensearch/action/ingest/package-info.java b/server/src/main/java/org/opensearch/action/ingest/package-info.java new file mode 100644 index 0000000000000..42414f2090b41 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/ingest/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Ingest API transport handlers. */ +package org.opensearch.action.ingest; diff --git a/server/src/main/java/org/opensearch/action/main/MainAction.java b/server/src/main/java/org/opensearch/action/main/MainAction.java index 46de6f9e2b0f0..c5cbac824ec83 100644 --- a/server/src/main/java/org/opensearch/action/main/MainAction.java +++ b/server/src/main/java/org/opensearch/action/main/MainAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * The main OpenSearch Action + * + * @opensearch.internal + */ public class MainAction extends ActionType { public static final String NAME = "cluster:monitor/main"; diff --git a/server/src/main/java/org/opensearch/action/main/MainRequest.java b/server/src/main/java/org/opensearch/action/main/MainRequest.java index f5cafecb87375..e1c1844f9d4dc 100644 --- a/server/src/main/java/org/opensearch/action/main/MainRequest.java +++ b/server/src/main/java/org/opensearch/action/main/MainRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request for main action + * + * @opensearch.internal + */ public class MainRequest extends ActionRequest { public MainRequest() {} diff --git a/server/src/main/java/org/opensearch/action/main/MainRequestBuilder.java b/server/src/main/java/org/opensearch/action/main/MainRequestBuilder.java index 8f73f316194ba..bd62882551c44 100644 --- a/server/src/main/java/org/opensearch/action/main/MainRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/main/MainRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * Transport request builder for the main opensearch action + * + * @opensearch.internal + */ public class MainRequestBuilder extends ActionRequestBuilder { public MainRequestBuilder(OpenSearchClient client, MainAction action) { diff --git a/server/src/main/java/org/opensearch/action/main/MainResponse.java b/server/src/main/java/org/opensearch/action/main/MainResponse.java index 1f460e5dfb019..691bbda512275 100644 --- a/server/src/main/java/org/opensearch/action/main/MainResponse.java +++ b/server/src/main/java/org/opensearch/action/main/MainResponse.java @@ -48,6 +48,11 @@ import java.io.IOException; import java.util.Objects; +/** + * The main response of opensearch + * + * @opensearch.internal + */ public class MainResponse extends ActionResponse implements ToXContentObject { private String nodeName; diff --git a/server/src/main/java/org/opensearch/action/main/TransportMainAction.java b/server/src/main/java/org/opensearch/action/main/TransportMainAction.java index 5170b23977b1e..2916c3dd88d49 100644 --- a/server/src/main/java/org/opensearch/action/main/TransportMainAction.java +++ b/server/src/main/java/org/opensearch/action/main/TransportMainAction.java @@ -45,6 +45,11 @@ import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; +/** + * Performs the main action + * + * @opensearch.internal + */ public class TransportMainAction extends HandledTransportAction { private final String nodeName; diff --git a/server/src/main/java/org/opensearch/action/main/package-info.java b/server/src/main/java/org/opensearch/action/main/package-info.java new file mode 100644 index 0000000000000..dc08f0a7b6303 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/main/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Main Response transport handlers. */ +package org.opensearch.action.main; diff --git a/server/src/main/java/org/opensearch/action/resync/ResyncReplicationRequest.java b/server/src/main/java/org/opensearch/action/resync/ResyncReplicationRequest.java index 2ecbc49384fe5..0cbca15232e44 100644 --- a/server/src/main/java/org/opensearch/action/resync/ResyncReplicationRequest.java +++ b/server/src/main/java/org/opensearch/action/resync/ResyncReplicationRequest.java @@ -43,6 +43,8 @@ /** * Represents a batch of operations sent from the primary to its replicas during the primary-replica resync. + * + * @opensearch.internal */ public final class ResyncReplicationRequest extends ReplicatedWriteRequest { diff --git a/server/src/main/java/org/opensearch/action/resync/ResyncReplicationResponse.java b/server/src/main/java/org/opensearch/action/resync/ResyncReplicationResponse.java index 1e052c5d80e80..22507ee717a1c 100644 --- a/server/src/main/java/org/opensearch/action/resync/ResyncReplicationResponse.java +++ b/server/src/main/java/org/opensearch/action/resync/ResyncReplicationResponse.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Transport response for resyncing replication + * + * @opensearch.internal + */ public final class ResyncReplicationResponse extends ReplicationResponse implements WriteResponse { public ResyncReplicationResponse() {} diff --git a/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java b/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java index ea596b12f262f..2249c7cace943 100644 --- a/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java @@ -64,6 +64,11 @@ import java.util.function.Function; import java.util.stream.Stream; +/** + * Perform replication resync + * + * @opensearch.internal + */ public class TransportResyncReplicationAction extends TransportWriteAction< ResyncReplicationRequest, ResyncReplicationRequest, @@ -253,6 +258,8 @@ public void handleException(TransportException exp) { * A proxy for primary-replica resync operations which are performed on replicas when a new primary is promoted. * Replica shards fail to execute resync operations will be failed but won't be marked as stale. * This avoids marking shards as stale during cluster restart but enforces primary-replica resync mandatory. + * + * @opensearch.internal */ class ResyncActionReplicasProxy extends ReplicasProxy { diff --git a/server/src/main/java/org/opensearch/action/resync/package-info.java b/server/src/main/java/org/opensearch/action/resync/package-info.java new file mode 100644 index 0000000000000..61c46d85aecda --- /dev/null +++ b/server/src/main/java/org/opensearch/action/resync/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Resync action transport handlers. */ +package org.opensearch.action.resync; diff --git a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java index 190904145b091..1d6d3f284d546 100644 --- a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java @@ -78,6 +78,8 @@ * referred to as the {@code shardIndex}. * The fan out and collect algorithm is traditionally used as the initial phase which can either be a query execution or collection of * distributed frequencies + * + * @opensearch.internal */ abstract class AbstractSearchAsyncAction extends SearchPhase implements SearchPhaseContext { private static final float DEFAULT_INDEX_BOOST = 1.0f; @@ -749,6 +751,11 @@ void executeNext(Runnable runnable, Thread originalThread) { } } + /** + * Pending Executions + * + * @opensearch.internal + */ private static final class PendingExecutions { private final int permits; private int permitsTaken = 0; diff --git a/server/src/main/java/org/opensearch/action/search/ArraySearchPhaseResults.java b/server/src/main/java/org/opensearch/action/search/ArraySearchPhaseResults.java index 58cffe2ed5b8c..61c81e6cda97a 100644 --- a/server/src/main/java/org/opensearch/action/search/ArraySearchPhaseResults.java +++ b/server/src/main/java/org/opensearch/action/search/ArraySearchPhaseResults.java @@ -39,6 +39,8 @@ /** * This class acts as a basic result collection that can be extended to do on-the-fly reduction or result processing + * + * @opensearch.internal */ class ArraySearchPhaseResults extends SearchPhaseResults { final AtomicArray results; diff --git a/server/src/main/java/org/opensearch/action/search/BottomSortValuesCollector.java b/server/src/main/java/org/opensearch/action/search/BottomSortValuesCollector.java index 64f50d2f37cdb..c831c80b6455c 100644 --- a/server/src/main/java/org/opensearch/action/search/BottomSortValuesCollector.java +++ b/server/src/main/java/org/opensearch/action/search/BottomSortValuesCollector.java @@ -41,6 +41,8 @@ /** * Utility class to keep track of the bottom doc's sort values in a distributed search. + * + * @opensearch.internal */ class BottomSortValuesCollector { private final int topNSize; diff --git a/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java b/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java index 2e67e6aa93a72..ec4d45a0a7124 100644 --- a/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java +++ b/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java @@ -67,6 +67,8 @@ * When the query primary sort is perform on a field, this phase extracts the min/max value in each shard and * sort them according to the provided order. This can be useful for instance to ensure that shards that contain recent * data are executed first when sorting by descending timestamp. + * + * @opensearch.internal */ final class CanMatchPreFilterSearchPhase extends AbstractSearchAsyncAction { @@ -202,6 +204,11 @@ private static Comparator shardComparator( return comparator.thenComparing(index -> shardsIts.get(index).shardId()); } + /** + * Inner class for determining if canMatch search phase results + * + * @opensearch.internal + */ private static final class CanMatchSearchPhaseResults extends SearchPhaseResults { private final FixedBitSet possibleMatches; private final MinAndMax[] minAndMaxes; diff --git a/server/src/main/java/org/opensearch/action/search/ClearScrollAction.java b/server/src/main/java/org/opensearch/action/search/ClearScrollAction.java index 91ae4b2109ae1..70072e5ec9156 100644 --- a/server/src/main/java/org/opensearch/action/search/ClearScrollAction.java +++ b/server/src/main/java/org/opensearch/action/search/ClearScrollAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport Action for clearing a scroll + * + * @opensearch.internal + */ public class ClearScrollAction extends ActionType { public static final ClearScrollAction INSTANCE = new ClearScrollAction(); diff --git a/server/src/main/java/org/opensearch/action/search/ClearScrollController.java b/server/src/main/java/org/opensearch/action/search/ClearScrollController.java index 390f5e2b99e63..4bb3cbb88ba01 100644 --- a/server/src/main/java/org/opensearch/action/search/ClearScrollController.java +++ b/server/src/main/java/org/opensearch/action/search/ClearScrollController.java @@ -53,6 +53,11 @@ import java.util.function.BiFunction; import java.util.stream.Collectors; +/** + * Main controller for clearing a scroll + * + * @opensearch.internal + */ public final class ClearScrollController implements Runnable { private final DiscoveryNodes nodes; private final SearchTransportService searchTransportService; diff --git a/server/src/main/java/org/opensearch/action/search/ClearScrollRequest.java b/server/src/main/java/org/opensearch/action/search/ClearScrollRequest.java index 3fb1ebcd6fcc2..4105f5ece5221 100644 --- a/server/src/main/java/org/opensearch/action/search/ClearScrollRequest.java +++ b/server/src/main/java/org/opensearch/action/search/ClearScrollRequest.java @@ -47,6 +47,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for clearing a search scroll + * + * @opensearch.internal + */ public class ClearScrollRequest extends ActionRequest implements ToXContentObject { private List scrollIds; diff --git a/server/src/main/java/org/opensearch/action/search/ClearScrollRequestBuilder.java b/server/src/main/java/org/opensearch/action/search/ClearScrollRequestBuilder.java index ba76b641c8f56..63f64e02a9dd2 100644 --- a/server/src/main/java/org/opensearch/action/search/ClearScrollRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/search/ClearScrollRequestBuilder.java @@ -37,6 +37,11 @@ import java.util.List; +/** + * Transport request builder for clearing a search scroll + * + * @opensearch.internal + */ public class ClearScrollRequestBuilder extends ActionRequestBuilder { public ClearScrollRequestBuilder(OpenSearchClient client, ClearScrollAction action) { diff --git a/server/src/main/java/org/opensearch/action/search/ClearScrollResponse.java b/server/src/main/java/org/opensearch/action/search/ClearScrollResponse.java index 7a989e646e4d0..e836860fd1990 100644 --- a/server/src/main/java/org/opensearch/action/search/ClearScrollResponse.java +++ b/server/src/main/java/org/opensearch/action/search/ClearScrollResponse.java @@ -49,6 +49,11 @@ import static org.opensearch.rest.RestStatus.NOT_FOUND; import static org.opensearch.rest.RestStatus.OK; +/** + * Transport response for clearing a search scroll + * + * @opensearch.internal + */ public class ClearScrollResponse extends ActionResponse implements StatusToXContentObject { private static final ParseField SUCCEEDED = new ParseField("succeeded"); diff --git a/server/src/main/java/org/opensearch/action/search/CountedCollector.java b/server/src/main/java/org/opensearch/action/search/CountedCollector.java index cb00902b52b7c..c73c4be2fa662 100644 --- a/server/src/main/java/org/opensearch/action/search/CountedCollector.java +++ b/server/src/main/java/org/opensearch/action/search/CountedCollector.java @@ -40,6 +40,8 @@ * This is a simple base class to simplify fan out to shards and collect their results. Each results passed to * {@link #onResult(SearchPhaseResult)} will be set to the provided result array * where the given index is used to set the result on the array. + * + * @opensearch.internal */ final class CountedCollector { private final ArraySearchPhaseResults resultConsumer; diff --git a/server/src/main/java/org/opensearch/action/search/CreatePitAction.java b/server/src/main/java/org/opensearch/action/search/CreatePitAction.java index 73788bee88542..1af56a044205b 100644 --- a/server/src/main/java/org/opensearch/action/search/CreatePitAction.java +++ b/server/src/main/java/org/opensearch/action/search/CreatePitAction.java @@ -15,7 +15,7 @@ */ public class CreatePitAction extends ActionType { public static final CreatePitAction INSTANCE = new CreatePitAction(); - public static final String NAME = "indices:data/read/pit"; + public static final String NAME = "indices:data/read/point_in_time"; private CreatePitAction() { super(NAME, CreatePitResponse::new); diff --git a/server/src/main/java/org/opensearch/action/search/CreatePitController.java b/server/src/main/java/org/opensearch/action/search/CreatePitController.java index 1e74ab1922d8c..4ed2e5b3de0a3 100644 --- a/server/src/main/java/org/opensearch/action/search/CreatePitController.java +++ b/server/src/main/java/org/opensearch/action/search/CreatePitController.java @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.Map; import java.util.Set; import java.util.function.BiFunction; @@ -53,8 +54,8 @@ public class CreatePitController { private final ActionListener listener; private final CreatePitRequest request; private static final Logger logger = LogManager.getLogger(CreatePitController.class); - public static final Setting PIT_CREATE_PHASE_KEEP_ALIVE = Setting.positiveTimeSetting( - "pit.create.phase.keep_alive", + public static final Setting PIT_INIT_KEEP_ALIVE = Setting.positiveTimeSetting( + "pit.init.keep_alive", timeValueSeconds(30), Setting.Property.NodeScope ); @@ -77,19 +78,6 @@ public CreatePitController( this.request = request; } - private TimeValue getCreatePitTemporaryKeepAlive() { - return PIT_CREATE_PHASE_KEEP_ALIVE.get(clusterService.getSettings()); - } - - public void execute() { - final StepListener createPitListener = new StepListener<>(); - final ActionListener updatePitIdListener = ActionListener.wrap(r -> listener.onResponse(r), e -> { - logger.error("PIT creation failed while updating PIT ID", e); - listener.onFailure(e); - }); - executeCreatePit(createPitListener, updatePitIdListener); - } - /** * This method creates PIT reader context */ @@ -99,14 +87,12 @@ public void executeCreatePit(StepListener createPitListener, Act searchRequest.routing(request.getRouting()); searchRequest.indicesOptions(request.getIndicesOptions()); searchRequest.allowPartialSearchResults(request.shouldAllowPartialPitCreation()); - - SearchTask searchTask = new SearchTask( + SearchTask searchTask = searchRequest.createTask( task.getId(), task.getType(), task.getAction(), - () -> task.getDescription(), task.getParentTaskId(), - null + Collections.emptyMap() ); /** * Phase 1 of create PIT @@ -117,7 +103,7 @@ public void executeCreatePit(StepListener createPitListener, Act * Phase 2 of create PIT where we update pit id in pit contexts */ createPitListener.whenComplete( - searchResponse -> { executeUpdatePitId(request, searchResponse, updatePitIdListener); }, + searchResponse -> { executeUpdatePitId(request, searchRequest, searchResponse, updatePitIdListener); }, updatePitIdListener::onFailure ); } @@ -144,7 +130,10 @@ public void executeOnShardTarget( ) { searchTransportService.createPitContext( connection, - new TransportCreatePitAction.CreateReaderContextRequest(target.getShardId(), getCreatePitTemporaryKeepAlive()), + new TransportCreatePitAction.CreateReaderContextRequest( + target.getShardId(), + PIT_INIT_KEEP_ALIVE.get(clusterService.getSettings()) + ), searchTask, ActionListener.wrap(r -> searchPhaseResultActionListener.onResponse(r), searchPhaseResultActionListener::onFailure) ); @@ -159,6 +148,7 @@ public void executeOnShardTarget( */ void executeUpdatePitId( CreatePitRequest request, + SearchRequest searchRequest, SearchResponse searchResponse, ActionListener updatePitIdListener ) { @@ -172,7 +162,13 @@ void executeUpdatePitId( * store the create time ( same create time for all PIT contexts across shards ) to be used * for list PIT api */ - final long creationTime = System.currentTimeMillis(); + final long relativeStartNanos = System.nanoTime(); + final TransportSearchAction.SearchTimeProvider timeProvider = new TransportSearchAction.SearchTimeProvider( + searchRequest.getOrCreateAbsoluteStartMillis(), + relativeStartNanos, + System::nanoTime + ); + final long creationTime = timeProvider.getAbsoluteStartMillis(); CreatePitResponse createPITResponse = new CreatePitResponse( searchResponse.pointInTimeId(), creationTime, @@ -223,27 +219,17 @@ void executeUpdatePitId( } } }, updatePitIdListener::onFailure); - } private StepListener> getConnectionLookupListener(SearchContextId contextId) { ClusterState state = clusterService.state(); - final Set clusters = contextId.shards() .values() .stream() .filter(ctx -> Strings.isEmpty(ctx.getClusterAlias()) == false) .map(SearchContextIdForNode::getClusterAlias) .collect(Collectors.toSet()); - - final StepListener> lookupListener = new StepListener<>(); - - if (clusters.isEmpty()) { - lookupListener.onResponse((cluster, nodeId) -> state.getNodes().get(nodeId)); - } else { - searchTransportService.getRemoteClusterService().collectNodes(clusters, lookupListener); - } - return lookupListener; + return SearchUtils.getConnectionLookupListener(searchTransportService, state, clusters); } private ActionListener getGroupedListener( diff --git a/server/src/main/java/org/opensearch/action/search/DfsQueryPhase.java b/server/src/main/java/org/opensearch/action/search/DfsQueryPhase.java index 6152f4cfdc599..c5747842614c7 100644 --- a/server/src/main/java/org/opensearch/action/search/DfsQueryPhase.java +++ b/server/src/main/java/org/opensearch/action/search/DfsQueryPhase.java @@ -50,6 +50,8 @@ * retry on another shard if any of the shards are failing. Failures are treated as shard failures and are counted as a non-successful * operation. * @see CountedCollector#onFailure(int, SearchShardTarget, Exception) + * + * @opensearch.internal */ final class DfsQueryPhase extends SearchPhase { private final ArraySearchPhaseResults queryResult; diff --git a/server/src/main/java/org/opensearch/action/search/ExpandSearchPhase.java b/server/src/main/java/org/opensearch/action/search/ExpandSearchPhase.java index 6c131697cb31e..cdefe7c2c1712 100644 --- a/server/src/main/java/org/opensearch/action/search/ExpandSearchPhase.java +++ b/server/src/main/java/org/opensearch/action/search/ExpandSearchPhase.java @@ -53,6 +53,8 @@ * This search phase is an optional phase that will be executed once all hits are fetched from the shards that executes * field-collapsing on the inner hits. This phase only executes if field collapsing is requested in the search request and otherwise * forwards to the next phase immediately. + * + * @opensearch.internal */ final class ExpandSearchPhase extends SearchPhase { private final SearchPhaseContext context; diff --git a/server/src/main/java/org/opensearch/action/search/FetchSearchPhase.java b/server/src/main/java/org/opensearch/action/search/FetchSearchPhase.java index c106c5e2f8069..31ec896856ce6 100644 --- a/server/src/main/java/org/opensearch/action/search/FetchSearchPhase.java +++ b/server/src/main/java/org/opensearch/action/search/FetchSearchPhase.java @@ -56,6 +56,8 @@ /** * This search phase merges the query results from the previous phase together and calculates the topN hits for this search. * Then it reaches out to all relevant shards to fetch the topN hits. + * + * @opensearch.internal */ final class FetchSearchPhase extends SearchPhase { private final ArraySearchPhaseResults fetchResults; diff --git a/server/src/main/java/org/opensearch/action/search/MaxScoreCollector.java b/server/src/main/java/org/opensearch/action/search/MaxScoreCollector.java index fce1de8cecbda..d7e0ba6d30fec 100644 --- a/server/src/main/java/org/opensearch/action/search/MaxScoreCollector.java +++ b/server/src/main/java/org/opensearch/action/search/MaxScoreCollector.java @@ -40,6 +40,8 @@ /** * A collector that computes the maximum score. + * + * @opensearch.internal */ public class MaxScoreCollector extends SimpleCollector { diff --git a/server/src/main/java/org/opensearch/action/search/MultiSearchAction.java b/server/src/main/java/org/opensearch/action/search/MultiSearchAction.java index fc8416536bf0a..84c18855324a9 100644 --- a/server/src/main/java/org/opensearch/action/search/MultiSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/MultiSearchAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for executing a multi search + * + * @opensearch.internal + */ public class MultiSearchAction extends ActionType { public static final MultiSearchAction INSTANCE = new MultiSearchAction(); diff --git a/server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java b/server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java index c45b6477d30f0..810c5f4a11258 100644 --- a/server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java +++ b/server/src/main/java/org/opensearch/action/search/MultiSearchRequest.java @@ -70,6 +70,8 @@ /** * A multi search API request. + * + * @opensearch.internal */ public class MultiSearchRequest extends ActionRequest implements CompositeIndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/search/MultiSearchRequestBuilder.java b/server/src/main/java/org/opensearch/action/search/MultiSearchRequestBuilder.java index e8db52b949425..f9bb90c69d925 100644 --- a/server/src/main/java/org/opensearch/action/search/MultiSearchRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/search/MultiSearchRequestBuilder.java @@ -38,6 +38,8 @@ /** * A request builder for multiple search requests. + * + * @opensearch.internal */ public class MultiSearchRequestBuilder extends ActionRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java b/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java index 3869d909cce6e..6c25a16a65c75 100644 --- a/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java +++ b/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java @@ -58,6 +58,8 @@ /** * A multi search response. + * + * @opensearch.internal */ public class MultiSearchResponse extends ActionResponse implements Iterable, ToXContentObject { @@ -75,6 +77,8 @@ public class MultiSearchResponse extends ActionResponse implements Iterable implements Releasable { private static final Logger logger = LogManager.getLogger(QueryPhaseResultConsumer.class); @@ -240,6 +242,11 @@ public int getNumReducePhases() { return pendingMerges.numReducePhases; } + /** + * Class representing pending merges + * + * @opensearch.internal + */ private class PendingMerges implements Releasable { private final int batchReduceSize; private final List buffer = new ArrayList<>(); @@ -496,6 +503,11 @@ public synchronized List consumeAggs() { } } + /** + * A single merge result + * + * @opensearch.internal + */ private static class MergeResult { private final List processedShards; private final TopDocs reducedTopDocs; @@ -515,6 +527,11 @@ private MergeResult( } } + /** + * A single merge task + * + * @opensearch.internal + */ private static class MergeTask { private final List emptyResults; private QuerySearchResult[] buffer; diff --git a/server/src/main/java/org/opensearch/action/search/ReduceSearchPhaseException.java b/server/src/main/java/org/opensearch/action/search/ReduceSearchPhaseException.java index 88558ceb6f7d9..57c1da5b25795 100644 --- a/server/src/main/java/org/opensearch/action/search/ReduceSearchPhaseException.java +++ b/server/src/main/java/org/opensearch/action/search/ReduceSearchPhaseException.java @@ -40,7 +40,7 @@ * A failure during a reduce phase (when receiving results from several shards, and reducing them * into one or more results and possible actions). * - * + * @opensearch.internal */ public class ReduceSearchPhaseException extends SearchPhaseExecutionException { diff --git a/server/src/main/java/org/opensearch/action/search/SearchAction.java b/server/src/main/java/org/opensearch/action/search/SearchAction.java index e3a906f8b30ce..c94b3b7352196 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for executing a search + * + * @opensearch.internal + */ public class SearchAction extends ActionType { public static final SearchAction INSTANCE = new SearchAction(); diff --git a/server/src/main/java/org/opensearch/action/search/SearchActionListener.java b/server/src/main/java/org/opensearch/action/search/SearchActionListener.java index c081dba3fe9c5..6983eed18b7b3 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchActionListener.java +++ b/server/src/main/java/org/opensearch/action/search/SearchActionListener.java @@ -38,6 +38,8 @@ /** * A base action listener that ensures shard target and shard index is set on all responses * received by this listener. + * + * @opensearch.internal */ abstract class SearchActionListener implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/search/SearchContextId.java b/server/src/main/java/org/opensearch/action/search/SearchContextId.java index 6d36e5985c8a1..8a9cf1dc9772d 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchContextId.java +++ b/server/src/main/java/org/opensearch/action/search/SearchContextId.java @@ -57,6 +57,11 @@ import java.util.Map; import java.util.Set; +/** + * Id for a serach context. + * + * @opensearch.internal + */ public class SearchContextId { private final Map shards; private final Map aliasFilter; diff --git a/server/src/main/java/org/opensearch/action/search/SearchContextIdForNode.java b/server/src/main/java/org/opensearch/action/search/SearchContextIdForNode.java index 379b268042e52..8f16a6e3ee226 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchContextIdForNode.java +++ b/server/src/main/java/org/opensearch/action/search/SearchContextIdForNode.java @@ -40,6 +40,11 @@ import java.io.IOException; +/** + * Id for a search context per node. + * + * @opensearch.internal + */ public final class SearchContextIdForNode implements Writeable { private final String node; private final ShardSearchContextId searchContextId; diff --git a/server/src/main/java/org/opensearch/action/search/SearchDfsQueryThenFetchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/SearchDfsQueryThenFetchAsyncAction.java index 50aac3daed52d..71a986c0e15f7 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchDfsQueryThenFetchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchDfsQueryThenFetchAsyncAction.java @@ -49,6 +49,11 @@ import java.util.concurrent.Executor; import java.util.function.BiFunction; +/** + * Async action for DFS Query Then Fetch + * + * @opensearch.internal + */ final class SearchDfsQueryThenFetchAsyncAction extends AbstractSearchAsyncAction { private final SearchPhaseController searchPhaseController; diff --git a/server/src/main/java/org/opensearch/action/search/SearchExecutionStatsCollector.java b/server/src/main/java/org/opensearch/action/search/SearchExecutionStatsCollector.java index ce77a6368f2b6..7082e33dfd5c5 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchExecutionStatsCollector.java +++ b/server/src/main/java/org/opensearch/action/search/SearchExecutionStatsCollector.java @@ -46,6 +46,8 @@ * A wrapper of search action listeners (search results) that unwraps the query * result to get the piggybacked queue size and service time EWMA, adding those * values to the coordinating nodes' {@link ResponseCollectorService}. + * + * @opensearch.internal */ public final class SearchExecutionStatsCollector implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhase.java b/server/src/main/java/org/opensearch/action/search/SearchPhase.java index 18509a2694cd1..50f0940754078 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhase.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhase.java @@ -38,6 +38,8 @@ /** * Base class for all individual search phases like collecting distributed frequencies, fetching documents, querying shards. + * + * @opensearch.internal */ abstract class SearchPhase implements CheckedRunnable { private final String name; diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhaseContext.java b/server/src/main/java/org/opensearch/action/search/SearchPhaseContext.java index 2f30d28a0924c..be364fbcb9c84 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhaseContext.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhaseContext.java @@ -47,6 +47,8 @@ /** * This class provide contextual state and access to resources across multiple search phases. + * + * @opensearch.internal */ interface SearchPhaseContext extends Executor { // TODO maybe we can make this concrete later - for now we just implement this in the base class for all initial phases diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java b/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java index 8c3b1d20b33a0..d32e7753cd153 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java @@ -84,6 +84,11 @@ import java.util.function.IntFunction; import java.util.stream.Collectors; +/** + * Controller for the search phase. + * + * @opensearch.internal + */ public final class SearchPhaseController { private static final ScoreDoc[] EMPTY_DOCS = new ScoreDoc[0]; @@ -608,6 +613,11 @@ static int getTopDocsSize(SearchRequest request) { : source.from()); } + /** + * The reduced query phase + * + * @opensearch.internal + */ public static final class ReducedQueryPhase { // the sum of all hits across all reduces shards final TotalHits totalHits; @@ -709,6 +719,11 @@ QueryPhaseResultConsumer newSearchPhaseResults( ); } + /** + * The top docs statistics + * + * @opensearch.internal + */ static final class TopDocsStats { final int trackTotalHitsUpTo; long totalHits; @@ -773,6 +788,11 @@ void add(TopDocsAndMaxScore topDocs, boolean timedOut, Boolean terminatedEarly) } } + /** + * Top docs that have been sorted + * + * @opensearch.internal + */ static final class SortedTopDocs { static final SortedTopDocs EMPTY = new SortedTopDocs(EMPTY_DOCS, false, null, null, null); // the searches merged top docs diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhaseExecutionException.java b/server/src/main/java/org/opensearch/action/search/SearchPhaseExecutionException.java index fbe6ef667f4f7..cb24118408abf 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhaseExecutionException.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhaseExecutionException.java @@ -46,6 +46,11 @@ import java.util.Arrays; import java.util.List; +/** + * Main exception thrown when there is an error in the search phase + * + * @opensearch.internal + */ public class SearchPhaseExecutionException extends OpenSearchException { private final String phaseName; private final ShardSearchFailure[] shardFailures; diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhaseResults.java b/server/src/main/java/org/opensearch/action/search/SearchPhaseResults.java index 3fa520f1fb5d6..1baea0e721c44 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhaseResults.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhaseResults.java @@ -39,6 +39,8 @@ /** * This class acts as a basic result collection that can be extended to do on-the-fly reduction or result processing + * + * @opensearch.internal */ abstract class SearchPhaseResults { private final int numShards; diff --git a/server/src/main/java/org/opensearch/action/search/SearchProgressActionListener.java b/server/src/main/java/org/opensearch/action/search/SearchProgressActionListener.java index 088aac6d71d30..3f24eea0bfe1e 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchProgressActionListener.java +++ b/server/src/main/java/org/opensearch/action/search/SearchProgressActionListener.java @@ -37,5 +37,7 @@ /** * An {@link ActionListener} for search requests that allows to track progress of the {@link SearchAction}. * See {@link SearchProgressListener}. + * + * @opensearch.internal */ public abstract class SearchProgressActionListener extends SearchProgressListener implements ActionListener {} diff --git a/server/src/main/java/org/opensearch/action/search/SearchProgressListener.java b/server/src/main/java/org/opensearch/action/search/SearchProgressListener.java index 78b1dd19dadaa..ffc64682cb07d 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchProgressListener.java +++ b/server/src/main/java/org/opensearch/action/search/SearchProgressListener.java @@ -50,6 +50,8 @@ /** * A listener that allows to track progress of the {@link SearchAction}. + * + * @opensearch.api */ public abstract class SearchProgressListener { private static final Logger logger = LogManager.getLogger(SearchProgressListener.class); diff --git a/server/src/main/java/org/opensearch/action/search/SearchQueryThenFetchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/SearchQueryThenFetchAsyncAction.java index 93ce3cfd8c715..1ead14aac6b51 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchQueryThenFetchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchQueryThenFetchAsyncAction.java @@ -50,6 +50,11 @@ import java.util.concurrent.Executor; import java.util.function.BiFunction; +/** + * Async transport action for query then fetch + * + * @opensearch.internal + */ class SearchQueryThenFetchAsyncAction extends AbstractSearchAsyncAction { private final SearchPhaseController searchPhaseController; diff --git a/server/src/main/java/org/opensearch/action/search/SearchRequest.java b/server/src/main/java/org/opensearch/action/search/SearchRequest.java index c4b97c35bc405..da34dab6383d9 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchRequest.java +++ b/server/src/main/java/org/opensearch/action/search/SearchRequest.java @@ -69,6 +69,8 @@ * @see org.opensearch.client.Requests#searchRequest(String...) * @see org.opensearch.client.Client#search(SearchRequest) * @see SearchResponse + * + * @opensearch.internal */ public class SearchRequest extends ActionRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/search/SearchRequestBuilder.java b/server/src/main/java/org/opensearch/action/search/SearchRequestBuilder.java index 6def33f82b7bd..8e3d9d3968fc6 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/search/SearchRequestBuilder.java @@ -57,6 +57,8 @@ /** * A search action request builder. + * + * @opensearch.internal */ public class SearchRequestBuilder extends ActionRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/search/SearchResponse.java b/server/src/main/java/org/opensearch/action/search/SearchResponse.java index e1175dc079ee0..06ac642a0547f 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchResponse.java +++ b/server/src/main/java/org/opensearch/action/search/SearchResponse.java @@ -69,6 +69,8 @@ /** * A response of a search request. + * + * @opensearch.internal */ public class SearchResponse extends ActionResponse implements StatusToXContentObject { @@ -473,6 +475,8 @@ public String toString() { /** * Holds info about the clusters that the search was executed on: how many in total, how many of them were successful * and how many of them were skipped. + * + * @opensearch.internal */ public static class Clusters implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java b/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java index 528c0693fbcd8..20a7f576071b2 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java +++ b/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java @@ -79,6 +79,8 @@ * - scroll requests are not supported * - field collapsing is supported, but whenever inner_hits are requested, they will be retrieved by each cluster locally after the fetch * phase, through the {@link ExpandSearchPhase}. Such inner_hits are not merged together as part of hits reduction. + * + * @opensearch.internal */ // TODO it may make sense to integrate the remote clusters responses as a shard response in the initial search phase and ignore hits coming // from the remote clusters in the fetch phase. This would be identical to the removed QueryAndFetch strategy except that only the remote @@ -408,6 +410,11 @@ private static SearchHits topDocsToSearchHits(TopDocs topDocs, SearchPhaseContro ); } + /** + * Holds a field search hit and doc + * + * @opensearch.internal + */ private static final class FieldDocAndSearchHit extends FieldDoc { private final SearchHit searchHit; @@ -424,6 +431,8 @@ private static final class FieldDocAndSearchHit extends FieldDoc { * (see TopDocs#tieBreakLessThan line 86). Generally, indices with same names on different clusters have different index uuids which * make their ShardIds different, which is not the case if the index is really the same one from the same cluster, in which case we * need to look at the cluster alias and make sure to assign a different shardIndex based on that. + * + * @opensearch.internal */ private static final class ShardIdAndClusterAlias implements Comparable { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/search/SearchResponseSections.java b/server/src/main/java/org/opensearch/action/search/SearchResponseSections.java index e146859bb295f..5fc584f76eb46 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchResponseSections.java +++ b/server/src/main/java/org/opensearch/action/search/SearchResponseSections.java @@ -52,6 +52,8 @@ * The reason why this class exists is that the high level REST client uses its own classes * to parse aggregations into, which are not serializable. This is the common part that can be * shared between core and client. + * + * @opensearch.internal */ public class SearchResponseSections implements ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollAction.java b/server/src/main/java/org/opensearch/action/search/SearchScrollAction.java index 4aec3d39e6f47..1f466d35f0ac2 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Transport action for a search scroll + * + * @opensearch.internal + */ public class SearchScrollAction extends ActionType { public static final SearchScrollAction INSTANCE = new SearchScrollAction(); diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollAsyncAction.java b/server/src/main/java/org/opensearch/action/search/SearchScrollAsyncAction.java index f98a75d37988c..ffa944ae62763 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollAsyncAction.java @@ -62,6 +62,8 @@ * Abstract base class for scroll execution modes. This class encapsulates the basic logic to * fan out to nodes and execute the query part of the scroll request. Subclasses can for instance * run separate fetch phases etc. + * + * @opensearch.internal */ abstract class SearchScrollAsyncAction implements Runnable { protected final Logger logger; diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollQueryAndFetchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/SearchScrollQueryAndFetchAsyncAction.java index 59ce2567bdf18..c1b4f56f7adc3 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollQueryAndFetchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollQueryAndFetchAsyncAction.java @@ -44,6 +44,11 @@ import java.util.function.BiFunction; +/** + * Async action for a search scroll query then fetch + * + * @opensearch.internal + */ final class SearchScrollQueryAndFetchAsyncAction extends SearchScrollAsyncAction { private final SearchTask task; diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollQueryThenFetchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/SearchScrollQueryThenFetchAsyncAction.java index effe5afd0cad6..4119cb1cf28a0 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollQueryThenFetchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollQueryThenFetchAsyncAction.java @@ -50,6 +50,11 @@ import java.util.function.BiFunction; +/** + * async action for a search scroll query then fetch + * + * @opensearch.internal + */ final class SearchScrollQueryThenFetchAsyncAction extends SearchScrollAsyncAction { private final SearchTask task; diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollRequest.java b/server/src/main/java/org/opensearch/action/search/SearchScrollRequest.java index 828228e869831..8b53d1f3096fb 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollRequest.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollRequest.java @@ -50,6 +50,11 @@ import static org.opensearch.action.ValidateActions.addValidationError; +/** + * Transport request for a search scroll + * + * @opensearch.internal + */ public class SearchScrollRequest extends ActionRequest implements ToXContentObject { private String scrollId; diff --git a/server/src/main/java/org/opensearch/action/search/SearchScrollRequestBuilder.java b/server/src/main/java/org/opensearch/action/search/SearchScrollRequestBuilder.java index 79bd952333de2..638c595216631 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchScrollRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/search/SearchScrollRequestBuilder.java @@ -39,6 +39,8 @@ /** * A search scroll action request builder. + * + * @opensearch.internal */ public class SearchScrollRequestBuilder extends ActionRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/search/SearchShard.java b/server/src/main/java/org/opensearch/action/search/SearchShard.java index 110209e3e9af0..cdfc4e816b455 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchShard.java +++ b/server/src/main/java/org/opensearch/action/search/SearchShard.java @@ -41,6 +41,8 @@ /** * A class that encapsulates the {@link ShardId} and the cluster alias * of a shard used during the search action. + * + * @opensearch.internal */ public final class SearchShard implements Comparable { @Nullable diff --git a/server/src/main/java/org/opensearch/action/search/SearchShardIterator.java b/server/src/main/java/org/opensearch/action/search/SearchShardIterator.java index 1ae0d8f78aa9c..72951f60c286e 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchShardIterator.java +++ b/server/src/main/java/org/opensearch/action/search/SearchShardIterator.java @@ -53,6 +53,8 @@ * of the search request (useful especially with cross-cluster search, as each cluster has its own set of original indices) as well as * the cluster alias. * @see OriginalIndices + * + * @opensearch.internal */ public final class SearchShardIterator implements Comparable, Countable { diff --git a/server/src/main/java/org/opensearch/action/search/SearchShardTask.java b/server/src/main/java/org/opensearch/action/search/SearchShardTask.java index 2e506c6fe181b..e5f25595b9ec8 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchShardTask.java +++ b/server/src/main/java/org/opensearch/action/search/SearchShardTask.java @@ -42,6 +42,8 @@ /** * Task storing information about a currently running search shard request. * See {@link ShardSearchRequest}, {@link ShardFetchSearchRequest}, ... + * + * @opensearch.internal */ public class SearchShardTask extends CancellableTask { diff --git a/server/src/main/java/org/opensearch/action/search/SearchTask.java b/server/src/main/java/org/opensearch/action/search/SearchTask.java index 7f80f7836be6c..89f23bb9bdaeb 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchTask.java +++ b/server/src/main/java/org/opensearch/action/search/SearchTask.java @@ -43,6 +43,8 @@ /** * Task storing information about a currently running {@link SearchRequest}. + * + * @opensearch.internal */ public class SearchTask extends CancellableTask { // generating description in a lazy way since source can be quite big diff --git a/server/src/main/java/org/opensearch/action/search/SearchTransportService.java b/server/src/main/java/org/opensearch/action/search/SearchTransportService.java index ee8b51c73ef01..1bb2b4aa26eb7 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchTransportService.java +++ b/server/src/main/java/org/opensearch/action/search/SearchTransportService.java @@ -79,6 +79,8 @@ /** * An encapsulation of {@link org.opensearch.search.SearchService} operations exposed through * transport. + * + * @opensearch.internal */ public class SearchTransportService { @@ -365,6 +367,11 @@ public Map getPendingSearchRequests() { return new HashMap<>(clientConnections); } + /** + * A scroll free context request + * + * @opensearch.internal + */ static class ScrollFreeContextRequest extends TransportRequest { private ShardSearchContextId contextId; @@ -416,6 +423,11 @@ public ShardSearchContextId id() { } + /** + * A search free context request + * + * @opensearch.internal + */ static class SearchFreeContextRequest extends ScrollFreeContextRequest implements IndicesRequest { private OriginalIndices originalIndices; @@ -453,6 +465,11 @@ public IndicesOptions indicesOptions() { } + /** + * A search free context response + * + * @opensearch.internal + */ public static class SearchFreeContextResponse extends TransportResponse { private boolean freed; @@ -717,6 +734,11 @@ public Transport.Connection getConnection(@Nullable String clusterAlias, Discove } } + /** + * A handler that counts connections + * + * @opensearch.internal + */ final class ConnectionCountingHandler extends ActionListenerResponseHandler { private final Map clientConnections; private final String nodeId; diff --git a/server/src/main/java/org/opensearch/action/search/SearchType.java b/server/src/main/java/org/opensearch/action/search/SearchType.java index ea50ea4b93491..cb86c0d6c1b4a 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchType.java +++ b/server/src/main/java/org/opensearch/action/search/SearchType.java @@ -35,7 +35,7 @@ /** * Search type represent the manner at which the search operation is executed. * - * + * @opensearch.internal */ public enum SearchType { /** diff --git a/server/src/main/java/org/opensearch/action/search/SearchUtils.java b/server/src/main/java/org/opensearch/action/search/SearchUtils.java new file mode 100644 index 0000000000000..0fdb1331d8ad6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/search/SearchUtils.java @@ -0,0 +1,42 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.action.search; + +import org.opensearch.action.StepListener; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; + +import java.util.Set; +import java.util.function.BiFunction; + +/** + * Helper class for common search functions + */ +public class SearchUtils { + + public SearchUtils() {} + + /** + * Get connection lookup listener for list of clusters passed + */ + public static StepListener> getConnectionLookupListener( + SearchTransportService searchTransportService, + ClusterState state, + Set clusters + ) { + final StepListener> lookupListener = new StepListener<>(); + + if (clusters.isEmpty()) { + lookupListener.onResponse((cluster, nodeId) -> state.getNodes().get(nodeId)); + } else { + searchTransportService.getRemoteClusterService().collectNodes(clusters, lookupListener); + } + return lookupListener; + } +} diff --git a/server/src/main/java/org/opensearch/action/search/ShardSearchFailure.java b/server/src/main/java/org/opensearch/action/search/ShardSearchFailure.java index 228eac89f48d5..03bca93d5f001 100644 --- a/server/src/main/java/org/opensearch/action/search/ShardSearchFailure.java +++ b/server/src/main/java/org/opensearch/action/search/ShardSearchFailure.java @@ -55,6 +55,8 @@ /** * Represents a failure to search on a specific shard. + * + * @opensearch.internal */ public class ShardSearchFailure extends ShardOperationFailedException { diff --git a/server/src/main/java/org/opensearch/action/search/TransportClearScrollAction.java b/server/src/main/java/org/opensearch/action/search/TransportClearScrollAction.java index 1158dbe2b06e8..c9b6e967d153c 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportClearScrollAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportClearScrollAction.java @@ -41,6 +41,11 @@ import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; +/** + * Perform transport action to clear a search scroll + * + * @opensearch.internal + */ public class TransportClearScrollAction extends HandledTransportAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/search/TransportCreatePitAction.java b/server/src/main/java/org/opensearch/action/search/TransportCreatePitAction.java index 1d15e9d018211..3ec821dbed9c4 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportCreatePitAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportCreatePitAction.java @@ -8,7 +8,9 @@ package org.opensearch.action.search; +import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.ActionListener; +import org.opensearch.action.StepListener; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.cluster.service.ClusterService; @@ -25,6 +27,7 @@ import org.opensearch.transport.TransportService; import java.io.IOException; +import java.util.Arrays; /** * Transport action for creating PIT reader context @@ -57,21 +60,31 @@ public TransportCreatePitAction( @Override protected void doExecute(Task task, CreatePitRequest request, ActionListener listener) { - Thread t = new Thread(() -> { - CreatePitController controller = new CreatePitController( - request, - searchTransportService, - clusterService, - transportSearchAction, - namedWriteableRegistry, - task, - listener + CreatePitController controller = new CreatePitController( + request, + searchTransportService, + clusterService, + transportSearchAction, + namedWriteableRegistry, + task, + listener + ); + final StepListener createPitListener = new StepListener<>(); + final ActionListener updatePitIdListener = ActionListener.wrap(r -> listener.onResponse(r), e -> { + logger.error( + () -> new ParameterizedMessage( + "PIT creation failed while updating PIT ID for indices [{}]", + Arrays.toString(request.indices()) + ) ); - controller.execute(); + listener.onFailure(e); }); - t.start(); + controller.executeCreatePit(createPitListener, updatePitIdListener); } + /** + * Request to create pit reader context with keep alive + */ public static class CreateReaderContextRequest extends TransportRequest { private final ShardId shardId; private final TimeValue keepAlive; @@ -103,6 +116,9 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Create pit reader context response which holds the contextId + */ public static class CreateReaderContextResponse extends SearchPhaseResult { public CreateReaderContextResponse(ShardSearchContextId shardSearchContextId) { this.contextId = shardSearchContextId; diff --git a/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java b/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java index 6c54136254832..58eb617a3d5fe 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java @@ -54,6 +54,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.LongSupplier; +/** + * Perform action for a multi search + * + * @opensearch.internal + */ public class TransportMultiSearchAction extends HandledTransportAction { private final int allocatedProcessors; @@ -215,6 +220,11 @@ private long buildTookInMillis() { }); } + /** + * Slots a search request + * + * @opensearch.internal + */ static final class SearchRequestSlot { final SearchRequest request; diff --git a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java index 73eb7b0a98fef..6ab49d975cddd 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java @@ -117,6 +117,11 @@ import static org.opensearch.action.search.SearchType.QUERY_THEN_FETCH; import static org.opensearch.search.sort.FieldSortBuilder.hasPrimaryFieldSort; +/** + * Perform search action + * + * @opensearch.internal + */ public class TransportSearchAction extends HandledTransportAction { /** The maximum number of shards for a single search request. */ @@ -227,6 +232,8 @@ private Map resolveIndexBoosts(SearchRequest searchRequest, Clust * clock for measuring how long an operation took (they often lack precision, they are subject * to moving backwards due to NTP and other such complexities, etc.). There are also issues with * using a relative clock for reporting real time. Thus, we simply separate these two uses. + * + * @opensearch.internal */ static final class SearchTimeProvider { @@ -1217,6 +1224,11 @@ private static void failIfOverShardCountLimit(ClusterService clusterService, int } } + /** + * xcluster search listener + * + * @opensearch.internal + */ abstract static class CCSActionListener implements ActionListener { private final String clusterAlias; private final boolean skipUnavailable; diff --git a/server/src/main/java/org/opensearch/action/search/TransportSearchHelper.java b/server/src/main/java/org/opensearch/action/search/TransportSearchHelper.java index 7ddfdfec34cb1..3e5c76aa1f66f 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportSearchHelper.java +++ b/server/src/main/java/org/opensearch/action/search/TransportSearchHelper.java @@ -48,6 +48,11 @@ import java.io.UncheckedIOException; import java.util.Base64; +/** + * Helper class for the search transport + * + * @opensearch.internal + */ final class TransportSearchHelper { private static final String INCLUDE_CONTEXT_UUID = "include_context_uuid"; diff --git a/server/src/main/java/org/opensearch/action/search/TransportSearchScrollAction.java b/server/src/main/java/org/opensearch/action/search/TransportSearchScrollAction.java index cb7c0b4a1873b..b67270ec9c9a5 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportSearchScrollAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportSearchScrollAction.java @@ -41,6 +41,11 @@ import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; +/** + * Perform the search scroll + * + * @opensearch.internal + */ public class TransportSearchScrollAction extends HandledTransportAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/support/ActionFilter.java b/server/src/main/java/org/opensearch/action/support/ActionFilter.java index 414ef2a329214..2fe32b120d4a9 100644 --- a/server/src/main/java/org/opensearch/action/support/ActionFilter.java +++ b/server/src/main/java/org/opensearch/action/support/ActionFilter.java @@ -39,6 +39,8 @@ /** * A filter allowing to filter transport actions + * + * @opensearch.internal */ public interface ActionFilter { diff --git a/server/src/main/java/org/opensearch/action/support/ActionFilterChain.java b/server/src/main/java/org/opensearch/action/support/ActionFilterChain.java index 65821f14167f7..1eb5682343ffa 100644 --- a/server/src/main/java/org/opensearch/action/support/ActionFilterChain.java +++ b/server/src/main/java/org/opensearch/action/support/ActionFilterChain.java @@ -39,6 +39,8 @@ /** * A filter chain allowing to continue and process the transport action request + * + * @opensearch.internal */ public interface ActionFilterChain { diff --git a/server/src/main/java/org/opensearch/action/support/ActionFilters.java b/server/src/main/java/org/opensearch/action/support/ActionFilters.java index 452b7e7f5238f..95cafbea4d7c1 100644 --- a/server/src/main/java/org/opensearch/action/support/ActionFilters.java +++ b/server/src/main/java/org/opensearch/action/support/ActionFilters.java @@ -38,6 +38,8 @@ /** * Holds the action filters injected through plugins, properly sorted by {@link org.opensearch.action.support.ActionFilter#order()} + * + * @opensearch.internal */ public class ActionFilters { diff --git a/server/src/main/java/org/opensearch/action/support/ActiveShardCount.java b/server/src/main/java/org/opensearch/action/support/ActiveShardCount.java index 9edd9bba0ef6e..10699690d0aff 100644 --- a/server/src/main/java/org/opensearch/action/support/ActiveShardCount.java +++ b/server/src/main/java/org/opensearch/action/support/ActiveShardCount.java @@ -49,6 +49,8 @@ /** * A class whose instances represent a value for counting the number * of active shard copies for a given shard in an index. + * + * @opensearch.internal */ public final class ActiveShardCount implements Writeable { diff --git a/server/src/main/java/org/opensearch/action/support/ActiveShardsObserver.java b/server/src/main/java/org/opensearch/action/support/ActiveShardsObserver.java index 064ae2ee522f9..7a4ae0e31cf55 100644 --- a/server/src/main/java/org/opensearch/action/support/ActiveShardsObserver.java +++ b/server/src/main/java/org/opensearch/action/support/ActiveShardsObserver.java @@ -49,6 +49,8 @@ /** * This class provides primitives for waiting for a configured number of shards * to become active before sending a response on an {@link ActionListener}. + * + * @opensearch.internal */ public class ActiveShardsObserver { diff --git a/server/src/main/java/org/opensearch/action/support/AdapterActionFuture.java b/server/src/main/java/org/opensearch/action/support/AdapterActionFuture.java index aa197d1e255f9..93430a049d3a9 100644 --- a/server/src/main/java/org/opensearch/action/support/AdapterActionFuture.java +++ b/server/src/main/java/org/opensearch/action/support/AdapterActionFuture.java @@ -42,6 +42,11 @@ import java.util.concurrent.TimeUnit; +/** + * Future adapter action + * + * @opensearch.internal + */ public abstract class AdapterActionFuture extends BaseFuture implements ActionFuture, ActionListener { @Override diff --git a/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java b/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java index 322dfc85fbf54..f0c8a9a7a11ba 100644 --- a/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java +++ b/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java @@ -52,6 +52,8 @@ /** * Encapsulates the logic of whether a new index should be automatically created when * a write operation is about to happen in a non existing index. + * + * @opensearch.internal */ public final class AutoCreateIndex { @@ -142,6 +144,11 @@ void setAutoCreate(AutoCreate autoCreate) { this.autoCreate = autoCreate; } + /** + * An auto create object + * + * @opensearch.internal + */ static class AutoCreate { private final boolean autoCreateIndex; private final List> expressions; diff --git a/server/src/main/java/org/opensearch/action/support/ChannelActionListener.java b/server/src/main/java/org/opensearch/action/support/ChannelActionListener.java index 288c91b243cb1..5b0475093d3c2 100644 --- a/server/src/main/java/org/opensearch/action/support/ChannelActionListener.java +++ b/server/src/main/java/org/opensearch/action/support/ChannelActionListener.java @@ -37,6 +37,11 @@ import org.opensearch.transport.TransportRequest; import org.opensearch.transport.TransportResponse; +/** + * Listener for transport channel actions + * + * @opensearch.internal + */ public final class ChannelActionListener implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/support/ContextPreservingActionListener.java b/server/src/main/java/org/opensearch/action/support/ContextPreservingActionListener.java index b83e0541cb6d0..6eadc0b67ffbd 100644 --- a/server/src/main/java/org/opensearch/action/support/ContextPreservingActionListener.java +++ b/server/src/main/java/org/opensearch/action/support/ContextPreservingActionListener.java @@ -39,6 +39,8 @@ /** * Restores the given {@link org.opensearch.common.util.concurrent.ThreadContext.StoredContext} * once the listener is invoked + * + * @opensearch.internal */ public final class ContextPreservingActionListener implements ActionListener { diff --git a/server/src/main/java/org/opensearch/action/support/DefaultShardOperationFailedException.java b/server/src/main/java/org/opensearch/action/support/DefaultShardOperationFailedException.java index 19f2c22d79496..1d3b056a7de66 100644 --- a/server/src/main/java/org/opensearch/action/support/DefaultShardOperationFailedException.java +++ b/server/src/main/java/org/opensearch/action/support/DefaultShardOperationFailedException.java @@ -49,6 +49,11 @@ import static org.opensearch.ExceptionsHelper.detailedMessage; import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; +/** + * Exception for a default shard operation + * + * @opensearch.internal + */ public class DefaultShardOperationFailedException extends ShardOperationFailedException implements Writeable { private static final String INDEX = "index"; diff --git a/server/src/main/java/org/opensearch/action/support/DestructiveOperations.java b/server/src/main/java/org/opensearch/action/support/DestructiveOperations.java index ce9a0d7c7aece..84b3287322301 100644 --- a/server/src/main/java/org/opensearch/action/support/DestructiveOperations.java +++ b/server/src/main/java/org/opensearch/action/support/DestructiveOperations.java @@ -39,6 +39,8 @@ /** * Helper for dealing with destructive operations and wildcard usage. + * + * @opensearch.internal */ public final class DestructiveOperations { diff --git a/server/src/main/java/org/opensearch/action/support/GroupedActionListener.java b/server/src/main/java/org/opensearch/action/support/GroupedActionListener.java index 515ed73ae2392..3d15d63289d9e 100644 --- a/server/src/main/java/org/opensearch/action/support/GroupedActionListener.java +++ b/server/src/main/java/org/opensearch/action/support/GroupedActionListener.java @@ -46,6 +46,8 @@ * it has received N results (either successes or failures). This allows synchronous * tasks to be forked off in a loop with the same listener and respond to a * higher level listener once all tasks responded. + * + * @opensearch.internal */ public final class GroupedActionListener implements ActionListener { private final CountDown countDown; diff --git a/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java b/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java index 9613b55cc7641..0bc46b21be3b8 100644 --- a/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java +++ b/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java @@ -42,6 +42,8 @@ /** * A TransportAction that self registers a handler into the transport service + * + * @opensearch.internal */ public abstract class HandledTransportAction extends TransportAction< Request, @@ -88,6 +90,11 @@ protected HandledTransportAction( transportService.registerRequestHandler(actionName, executor, false, canTripCircuitBreaker, requestReader, new TransportHandler()); } + /** + * Inner transport handler + * + * @opensearch.internal + */ class TransportHandler implements TransportRequestHandler { @Override public final void messageReceived(final Request request, final TransportChannel channel, Task task) { diff --git a/server/src/main/java/org/opensearch/action/support/IndicesOptions.java b/server/src/main/java/org/opensearch/action/support/IndicesOptions.java index 09b691787dffe..292a2c4b7d3da 100644 --- a/server/src/main/java/org/opensearch/action/support/IndicesOptions.java +++ b/server/src/main/java/org/opensearch/action/support/IndicesOptions.java @@ -55,6 +55,8 @@ /** * Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded * to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices. + * + * @opensearch.internal */ public class IndicesOptions implements ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java b/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java index c31ca9b100624..b01320369af6a 100644 --- a/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java +++ b/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java @@ -41,6 +41,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; +/** + * Supports timeouts on listeners + * + * @opensearch.internal + */ public class ListenerTimeouts { /** @@ -91,6 +96,11 @@ public static ActionListener wrapWithTimeout( return wrappedListener; } + /** + * Listener that can time out + * + * @opensearch.internal + */ private static class TimeoutableListener implements ActionListener, Runnable { private final AtomicBoolean isDone = new AtomicBoolean(false); diff --git a/server/src/main/java/org/opensearch/action/support/PlainActionFuture.java b/server/src/main/java/org/opensearch/action/support/PlainActionFuture.java index d7235a3b0ee46..abe63d8abd473 100644 --- a/server/src/main/java/org/opensearch/action/support/PlainActionFuture.java +++ b/server/src/main/java/org/opensearch/action/support/PlainActionFuture.java @@ -34,6 +34,11 @@ import org.opensearch.common.CheckedConsumer; +/** + * Creates a new future for a plain action. + * + * @opensearch.internal + */ public class PlainActionFuture extends AdapterActionFuture { public static PlainActionFuture newFuture() { diff --git a/server/src/main/java/org/opensearch/action/support/PlainListenableActionFuture.java b/server/src/main/java/org/opensearch/action/support/PlainListenableActionFuture.java index 16a82b91145ae..ac5f7d25efb18 100644 --- a/server/src/main/java/org/opensearch/action/support/PlainListenableActionFuture.java +++ b/server/src/main/java/org/opensearch/action/support/PlainListenableActionFuture.java @@ -38,6 +38,11 @@ import java.util.ArrayList; import java.util.List; +/** + * Future for a plain listenable action + * + * @opensearch.internal + */ public class PlainListenableActionFuture extends AdapterActionFuture implements ListenableActionFuture { volatile Object listeners; diff --git a/server/src/main/java/org/opensearch/action/support/RetryableAction.java b/server/src/main/java/org/opensearch/action/support/RetryableAction.java index e330948209b5c..38b7e6ec2a8a0 100644 --- a/server/src/main/java/org/opensearch/action/support/RetryableAction.java +++ b/server/src/main/java/org/opensearch/action/support/RetryableAction.java @@ -50,6 +50,8 @@ * The executor the action will be executed on can be defined in the constructor. Otherwise, SAME is the * default. The action will be retried with exponentially increasing delay periods until the timeout period * has been reached. + * + * @opensearch.internal */ public abstract class RetryableAction { diff --git a/server/src/main/java/org/opensearch/action/support/ThreadedActionListener.java b/server/src/main/java/org/opensearch/action/support/ThreadedActionListener.java index f6a4c87c57344..17ef64aa901c0 100644 --- a/server/src/main/java/org/opensearch/action/support/ThreadedActionListener.java +++ b/server/src/main/java/org/opensearch/action/support/ThreadedActionListener.java @@ -41,6 +41,8 @@ /** * An action listener that wraps another action listener and threading its execution. + * + * @opensearch.internal */ public final class ThreadedActionListener implements ActionListener { private final Logger logger; diff --git a/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java b/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java index e132555a3c071..a98df5b832bf5 100644 --- a/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java +++ b/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java @@ -29,6 +29,11 @@ import static org.opensearch.action.admin.cluster.node.tasks.get.GetTaskAction.TASKS_ORIGIN; import static org.opensearch.action.search.TransportSearchAction.SEARCH_CANCEL_AFTER_TIME_INTERVAL_SETTING; +/** + * Utility to cancel a timeout task + * + * @opensearch.internal + */ public class TimeoutTaskCancellationUtility { private static final Logger logger = LogManager.getLogger(TimeoutTaskCancellationUtility.class); @@ -99,6 +104,8 @@ public static ActionListener wrapWithCancellationListener( * Timeout listener which executes the provided runnable after timeout is expired and if a response/failure is not yet received. * If either a response/failure is received before timeout then the scheduled task is cancelled and response/failure is sent back to * the original listener. + * + * @opensearch.internal */ private static class TimeoutRunnableListener implements ActionListener, Runnable { diff --git a/server/src/main/java/org/opensearch/action/support/TransportAction.java b/server/src/main/java/org/opensearch/action/support/TransportAction.java index 84ece8cfec530..a60648e50ff31 100644 --- a/server/src/main/java/org/opensearch/action/support/TransportAction.java +++ b/server/src/main/java/org/opensearch/action/support/TransportAction.java @@ -48,6 +48,11 @@ import java.util.concurrent.atomic.AtomicInteger; +/** + * Base class for a transport action + * + * @opensearch.internal + */ public abstract class TransportAction { public final String actionName; @@ -171,6 +176,11 @@ public final void execute(Task task, Request request, ActionListener l protected abstract void doExecute(Task task, Request request, ActionListener listener); + /** + * A request filter chain + * + * @opensearch.internal + */ private static class RequestFilterChain implements ActionFilterChain { @@ -205,6 +215,8 @@ public void proceed(Task task, String actionName, Request request, ActionListene /** * Wrapper for an action listener that stores the result at the end of the execution + * + * @opensearch.internal */ private static class TaskResultStoringActionListener implements ActionListener { private final ActionListener delegate; diff --git a/server/src/main/java/org/opensearch/action/support/TransportActions.java b/server/src/main/java/org/opensearch/action/support/TransportActions.java index d79059d39f407..03e7509b3b8e3 100644 --- a/server/src/main/java/org/opensearch/action/support/TransportActions.java +++ b/server/src/main/java/org/opensearch/action/support/TransportActions.java @@ -40,6 +40,11 @@ import org.opensearch.index.shard.IllegalIndexShardStateException; import org.opensearch.index.shard.ShardNotFoundException; +/** + * Utility class for transport actions + * + * @opensearch.internal + */ public class TransportActions { public static boolean isShardNotAvailableException(final Throwable e) { diff --git a/server/src/main/java/org/opensearch/action/support/WriteRequest.java b/server/src/main/java/org/opensearch/action/support/WriteRequest.java index 65737ffedeecb..81faf9a8f88ca 100644 --- a/server/src/main/java/org/opensearch/action/support/WriteRequest.java +++ b/server/src/main/java/org/opensearch/action/support/WriteRequest.java @@ -46,6 +46,8 @@ /** * Interface implemented by requests that modify the documents in an index like {@link IndexRequest}, {@link UpdateRequest}, and * {@link BulkRequest}. Rather than implement this directly most implementers should extend {@link ReplicatedWriteRequest}. + * + * @opensearch.internal */ public interface WriteRequest> extends Writeable { /** diff --git a/server/src/main/java/org/opensearch/action/support/WriteRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/WriteRequestBuilder.java index c26a08ad6ab60..899d7a8cd65fe 100644 --- a/server/src/main/java/org/opensearch/action/support/WriteRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/WriteRequestBuilder.java @@ -34,6 +34,11 @@ import org.opensearch.action.support.WriteRequest.RefreshPolicy; +/** + * Builder for a write request operations + * + * @opensearch.internal + */ public interface WriteRequestBuilder> { WriteRequest request(); diff --git a/server/src/main/java/org/opensearch/action/support/WriteResponse.java b/server/src/main/java/org/opensearch/action/support/WriteResponse.java index 89b04bbdb8362..786f851d88542 100644 --- a/server/src/main/java/org/opensearch/action/support/WriteResponse.java +++ b/server/src/main/java/org/opensearch/action/support/WriteResponse.java @@ -42,6 +42,8 @@ /** * Interface implemented by responses for actions that modify the documents in an index like {@link IndexResponse}, {@link UpdateResponse}, * and {@link BulkResponse}. Rather than implement this directly most implementers should extend {@link DocWriteResponse}. + * + * @opensearch.internal */ public interface WriteResponse { /** diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastOperationRequestBuilder.java index 2eaa029e687f4..d732a28c32ea3 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastOperationRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.action.support.IndicesOptions; import org.opensearch.client.OpenSearchClient; +/** + * Request builder for broadcast operations + * + * @opensearch.internal + */ public abstract class BroadcastOperationRequestBuilder< Request extends BroadcastRequest, Response extends BroadcastResponse, diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastRequest.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastRequest.java index 457f97acbe98b..84cb2965e6e61 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastRequest.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastRequest.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * Transport request for broadcast operations + * + * @opensearch.internal + */ public class BroadcastRequest> extends ActionRequest implements IndicesRequest.Replaceable { protected String[] indices; diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastResponse.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastResponse.java index 89dcec7bf75ae..9d0973a5f7307 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastResponse.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastResponse.java @@ -52,6 +52,8 @@ /** * Base class for all broadcast operation based responses. + * + * @opensearch.internal */ public class BroadcastResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardOperationFailedException.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardOperationFailedException.java index f91de7f3ced7a..ed84b48f38387 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardOperationFailedException.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardOperationFailedException.java @@ -42,7 +42,7 @@ /** * An exception indicating that a failure occurred performing an operation on the shard. * - * + * @opensearch.internal */ public class BroadcastShardOperationFailedException extends OpenSearchException implements OpenSearchWrapperException { diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardRequest.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardRequest.java index e89a1437784b9..02fc305d4eb0d 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardRequest.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardRequest.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * Base class for broadcasting shard requests + * + * @opensearch.internal + */ public abstract class BroadcastShardRequest extends TransportRequest implements IndicesRequest { private ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardResponse.java b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardResponse.java index 96245ec4d91f1..b3045d52450cc 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardResponse.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/BroadcastShardResponse.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Base class for broadcasting response + * + * @opensearch.internal + */ public abstract class BroadcastShardResponse extends TransportResponse { ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java b/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java index 32dda0af3970d..a69853dc6a3c0 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java @@ -63,6 +63,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReferenceArray; +/** + * Base transport broadcast action class + * + * @opensearch.internal + */ public abstract class TransportBroadcastAction< Request extends BroadcastRequest, Response extends BroadcastResponse, @@ -119,6 +124,11 @@ protected void doExecute(Task task, Request request, ActionListener li protected abstract ClusterBlockException checkRequestBlock(ClusterState state, Request request, String[] concreteIndices); + /** + * Asynchronous broadcast action + * + * @opensearch.internal + */ protected class AsyncBroadcastAction { private final Task task; @@ -315,6 +325,11 @@ void setFailure(ShardIterator shardIt, int shardIndex, Exception e) { } } + /** + * A shard transport handler + * + * @opensearch.internal + */ class ShardTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java b/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java index 6eb3c7a0cfe89..f849be4db4e2b 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java @@ -86,6 +86,8 @@ * @param the underlying client request * @param the response to the client request * @param per-shard operation results + * + * @opensearch.internal */ public abstract class TransportBroadcastByNodeAction< Request extends BroadcastRequest, @@ -271,6 +273,11 @@ protected void doExecute(Task task, Request request, ActionListener li new AsyncAction(task, request, listener).start(); } + /** + * Asynchronous action + * + * @opensearch.internal + */ protected class AsyncAction { private final Task task; private final Request request; @@ -441,6 +448,11 @@ protected void onCompletion() { } } + /** + * Broadcast by a node's transport request handler + * + * @opensearch.internal + */ class BroadcastByNodeTransportRequestHandler implements TransportRequestHandler { @Override public void messageReceived(final NodeRequest request, TransportChannel channel, Task task) throws Exception { @@ -520,6 +532,11 @@ private void onShardOperation( } } + /** + * A node request + * + * @opensearch.internal + */ public class NodeRequest extends TransportRequest implements IndicesRequest { private String nodeId; @@ -567,6 +584,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * A node response + * + * @opensearch.internal + */ class NodeResponse extends TransportResponse { protected String nodeId; protected int totalShards; @@ -631,6 +653,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * Can be used for implementations of {@link #shardOperation(BroadcastRequest, ShardRouting) shardOperation} for * which there is no shard-level return value. + * + * @opensearch.internal */ public static final class EmptyResult implements Writeable { public static EmptyResult INSTANCE = new EmptyResult(); diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/node/package-info.java b/server/src/main/java/org/opensearch/action/support/broadcast/node/package-info.java new file mode 100644 index 0000000000000..1d5ebaf244f77 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/broadcast/node/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node Level Broadcast transport handlers. */ +package org.opensearch.action.support.broadcast.node; diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/package-info.java b/server/src/main/java/org/opensearch/action/support/broadcast/package-info.java new file mode 100644 index 0000000000000..00b5c640fd3a1 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/broadcast/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Broadcast info transport handlers. */ +package org.opensearch.action.support.broadcast; diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java index 278c4f287b4f5..7f665b4e658a1 100644 --- a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java @@ -43,6 +43,8 @@ /** * Abstract class that allows to mark action requests that support acknowledgements. * Facilitates consistency across different api. + * + * @opensearch.internal */ public abstract class AcknowledgedRequest> extends MasterNodeRequest implements diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java index daed5a09bb0f3..7a0824c6d30ca 100644 --- a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java @@ -37,6 +37,8 @@ /** * Base request builder for cluster-manager node operations that support acknowledgements + * + * @opensearch.internal */ public abstract class AcknowledgedRequestBuilder< Request extends AcknowledgedRequest, diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java index dca3096b99440..415e52b68e368 100644 --- a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java @@ -48,6 +48,8 @@ /** * A response that indicates that a request has been acknowledged + * + * @opensearch.internal */ public class AcknowledgedResponse extends ActionResponse implements ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java index 98996e222b30a..b327e76a25873 100644 --- a/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java @@ -40,6 +40,8 @@ /** * Base request builder for cluster-manager node operations + * + * @opensearch.internal */ public abstract class MasterNodeOperationRequestBuilder< Request extends MasterNodeRequest, diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java index 99e6b37debd8f..d36b419577cab 100644 --- a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java @@ -38,6 +38,8 @@ /** * Base request builder for cluster-manager node read operations that can be executed on the local node as well + * + * @opensearch.internal */ public abstract class MasterNodeReadOperationRequestBuilder< Request extends MasterNodeReadRequest, diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java index 9842c47652a97..3188f632c5ec8 100644 --- a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java @@ -39,6 +39,8 @@ /** * Base request for cluster-manager based read operations that allows to read the cluster state from the local node if needed + * + * @opensearch.internal */ public abstract class MasterNodeReadRequest> extends MasterNodeRequest { diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java index f7ea962f7c4a1..34a8c65dde491 100644 --- a/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java @@ -41,6 +41,8 @@ /** * A based request for cluster-manager based operation. + * + * @opensearch.internal */ public abstract class MasterNodeRequest> extends ActionRequest { diff --git a/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java b/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java index 5964867d2d618..d100874296844 100644 --- a/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java +++ b/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java @@ -44,6 +44,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; +/** + * Transport response for shard acknowledgements + * + * @opensearch.internal + */ public abstract class ShardsAcknowledgedResponse extends AcknowledgedResponse { protected static final ParseField SHARDS_ACKNOWLEDGED = new ParseField("shards_acknowledged"); diff --git a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java index 083bea079174c..4e0a180fe0cd4 100644 --- a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java +++ b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java @@ -68,6 +68,8 @@ /** * A base class for operations that needs to be performed on the cluster-manager node. + * + * @opensearch.internal */ public abstract class TransportMasterNodeAction, Response extends ActionResponse> extends HandledTransportAction { @@ -140,6 +142,11 @@ protected void doExecute(Task task, final Request request, ActionListener listener; diff --git a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java index b8be63dd6564b..8514174bca8c7 100644 --- a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java +++ b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java @@ -43,6 +43,8 @@ /** * A base class for read operations that needs to be performed on the cluster-manager node. * Can also be executed on the local node if needed. + * + * @opensearch.internal */ public abstract class TransportMasterNodeReadAction, Response extends ActionResponse> extends TransportMasterNodeAction { diff --git a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java index 0b392caa3e588..ae3b2350f574c 100644 --- a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java +++ b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * Transport request for cluster information + * + * @opensearch.internal + */ public abstract class ClusterInfoRequest> extends MasterNodeReadRequest implements IndicesRequest.Replaceable { diff --git a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java index d806f96eb9ff2..09ed9b590d9c4 100644 --- a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java @@ -38,6 +38,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.util.ArrayUtils; +/** + * Transport request builder for cluster information + * + * @opensearch.internal + */ public abstract class ClusterInfoRequestBuilder< Request extends ClusterInfoRequest, Response extends ActionResponse, diff --git a/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java b/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java index 9bcfaea056a89..e3ad4afcad02e 100644 --- a/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java +++ b/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java @@ -44,6 +44,11 @@ import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; +/** + * Perform cluster information action + * + * @opensearch.internal + */ public abstract class TransportClusterInfoAction, Response extends ActionResponse> extends TransportMasterNodeReadAction { diff --git a/server/src/main/java/org/opensearch/action/support/master/info/package-info.java b/server/src/main/java/org/opensearch/action/support/master/info/package-info.java new file mode 100644 index 0000000000000..6ae2eb5465db5 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/info/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Master Node Information transport handlers. */ +package org.opensearch.action.support.master.info; diff --git a/server/src/main/java/org/opensearch/action/support/master/package-info.java b/server/src/main/java/org/opensearch/action/support/master/package-info.java new file mode 100644 index 0000000000000..b0f6f7942b688 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Master Node transport handlers. */ +package org.opensearch.action.support.master; diff --git a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeRequest.java b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeRequest.java index 27d9cb8b6c002..b5ff1d60ff75b 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeRequest.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeRequest.java @@ -39,7 +39,15 @@ import java.io.IOException; +/** + * Base class for node transport requests + * + * @opensearch.internal + * + * @deprecated this class is deprecated and classes will extend TransportRequest directly + */ // TODO: this class can be removed in main once 7.x is bumped to 7.4.0 +@Deprecated public abstract class BaseNodeRequest extends TransportRequest { public BaseNodeRequest() {} diff --git a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeResponse.java b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeResponse.java index 13d9293c21123..62e814d7e7ec0 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeResponse.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodeResponse.java @@ -41,6 +41,8 @@ /** * A base class for node level operations. + * + * @opensearch.internal */ public abstract class BaseNodeResponse extends TransportResponse { diff --git a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesRequest.java b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesRequest.java index b36fc585e99a8..f4b25a43dc206 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesRequest.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesRequest.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * Base class for requests targeting a list of nodes + * + * @opensearch.internal + */ public abstract class BaseNodesRequest> extends ActionRequest { /** diff --git a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesResponse.java b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesResponse.java index 2ba00d77d0660..a47eb4be898ca 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesResponse.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/BaseNodesResponse.java @@ -44,6 +44,11 @@ import java.util.Map; import java.util.Objects; +/** + * Transport response for nodes requests + * + * @opensearch.internal + */ public abstract class BaseNodesResponse extends ActionResponse { private ClusterName clusterName; diff --git a/server/src/main/java/org/opensearch/action/support/nodes/NodesOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/nodes/NodesOperationRequestBuilder.java index d8017ace7d3e6..9d5e1b3ab4ed4 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/NodesOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/NodesOperationRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.unit.TimeValue; +/** + * Builder for Operation Requests + * + * @opensearch.internal + */ public abstract class NodesOperationRequestBuilder< Request extends BaseNodesRequest, Response extends BaseNodesResponse, diff --git a/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java b/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java index 030b14678c0e5..18fcdfad0bcc4 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java @@ -62,6 +62,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReferenceArray; +/** + * Base action class for transport nodes + * + * @opensearch.internal + */ public abstract class TransportNodesAction< NodesRequest extends BaseNodesRequest, NodesResponse extends BaseNodesResponse, @@ -211,6 +216,11 @@ protected String getTransportNodeAction(DiscoveryNode node) { return transportNodeAction; } + /** + * Asynchronous action + * + * @opensearch.internal + */ class AsyncAction { private final NodesRequest request; @@ -306,6 +316,11 @@ private void finishHim() { } } + /** + * A node transport handler + * + * @opensearch.internal + */ class NodeTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/nodes/package-info.java b/server/src/main/java/org/opensearch/action/support/nodes/package-info.java new file mode 100644 index 0000000000000..f388527e30d8b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/nodes/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Node request transport handlers. */ +package org.opensearch.action.support.nodes; diff --git a/server/src/main/java/org/opensearch/action/support/package-info.java b/server/src/main/java/org/opensearch/action/support/package-info.java new file mode 100644 index 0000000000000..58dd4c5190d8b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Transport handler Support Classes. */ +package org.opensearch.action.support; diff --git a/server/src/main/java/org/opensearch/action/support/replication/BasicReplicationRequest.java b/server/src/main/java/org/opensearch/action/support/replication/BasicReplicationRequest.java index 1022a476bf885..bd0663fc3d352 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/BasicReplicationRequest.java +++ b/server/src/main/java/org/opensearch/action/support/replication/BasicReplicationRequest.java @@ -42,6 +42,8 @@ * Unfortunately ReplicationRequest can't be declared as a type parameter * because it has a self referential type parameter of its own. So use this * instead. + * + * @opensearch.internal */ public class BasicReplicationRequest extends ReplicationRequest { /** diff --git a/server/src/main/java/org/opensearch/action/support/replication/PendingReplicationActions.java b/server/src/main/java/org/opensearch/action/support/replication/PendingReplicationActions.java index 1e554913e527d..b305c4c8c83a7 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/PendingReplicationActions.java +++ b/server/src/main/java/org/opensearch/action/support/replication/PendingReplicationActions.java @@ -46,6 +46,11 @@ import java.util.Set; import java.util.function.Consumer; +/** + * Pending Replication Actions + * + * @opensearch.internal + */ public class PendingReplicationActions implements Consumer, Releasable { private final Map>> onGoingReplicationActions = ConcurrentCollections.newConcurrentMap(); diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicatedWriteRequest.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicatedWriteRequest.java index e18765d7a3546..8018de175b47e 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicatedWriteRequest.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicatedWriteRequest.java @@ -46,6 +46,8 @@ /** * Requests that are both {@linkplain ReplicationRequest}s (run on a shard's primary first, then the replica) and {@linkplain WriteRequest} * (modify documents on a shard), for example {@link BulkShardRequest}, {@link IndexRequest}, and {@link DeleteRequest}. + * + * @opensearch.internal */ public abstract class ReplicatedWriteRequest> extends ReplicationRequest implements WriteRequest { private RefreshPolicy refreshPolicy = RefreshPolicy.NONE; diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java index f7fd6acf8be23..cf40e872fe9b8 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java @@ -67,6 +67,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.LongSupplier; +/** + * Operation for a replication request + * + * @opensearch.internal + */ public class ReplicationOperation< Request extends ReplicationRequest, ReplicaRequest extends ReplicationRequest, @@ -591,6 +596,11 @@ public interface ReplicaResponse { } + /** + * Thrown if there are any errors retrying on primary + * + * @opensearch.internal + */ public static class RetryOnPrimaryException extends OpenSearchException { RetryOnPrimaryException(ShardId shardId, String msg) { this(shardId, msg, null); diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequest.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequest.java index e7428e2913f1a..72214e73b9180 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequest.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequest.java @@ -56,6 +56,8 @@ /** * Requests that are run on a particular replica, first on the primary and then on the replicas like {@link IndexRequest} or * {@link TransportShardRefreshAction}. + * + * @opensearch.internal */ public abstract class ReplicationRequest> extends ActionRequest implements IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequestBuilder.java index 1994c70aec17c..df60e585e7272 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationRequestBuilder.java @@ -39,6 +39,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.unit.TimeValue; +/** + * Transport request builder for a replication operation + * + * @opensearch.internal + */ public abstract class ReplicationRequestBuilder< Request extends ReplicationRequest, Response extends ActionResponse, diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java index 6434d36861c6f..1dfa9e53c5fee 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java @@ -56,6 +56,8 @@ /** * Base class for write action responses. + * + * @opensearch.internal */ public class ReplicationResponse extends ActionResponse { @@ -83,6 +85,11 @@ public void setShardInfo(ShardInfo shardInfo) { this.shardInfo = shardInfo; } + /** + * Holds shard information + * + * @opensearch.internal + */ public static class ShardInfo implements Writeable, ToXContentObject { private static final String TOTAL = "total"; @@ -225,6 +232,11 @@ public String toString() { return "ShardInfo{" + "total=" + total + ", successful=" + successful + ", failures=" + Arrays.toString(failures) + '}'; } + /** + * Holds failure information + * + * @opensearch.internal + */ public static class Failure extends ShardOperationFailedException implements ToXContentObject { private static final String _INDEX = "_index"; diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java index b24dcd0648043..b599dc405b8ab 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java @@ -46,6 +46,8 @@ /** * Task that tracks replication actions. + * + * @opensearch.internal */ public class ReplicationTask extends Task { private volatile String phase = "starting"; @@ -73,6 +75,11 @@ public Status getStatus() { return new Status(phase); } + /** + * Status of the replication task + * + * @opensearch.internal + */ public static class Status implements Task.Status { public static final String NAME = "replication"; diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportBroadcastReplicationAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportBroadcastReplicationAction.java index dd1ce9f70a28a..b4bacefad8ad2 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportBroadcastReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportBroadcastReplicationAction.java @@ -61,6 +61,8 @@ /** * Base class for requests that should be executed on all shards of an index or several indices. * This action sends shard requests to all primary shards of the indices and they are then replicated like write requests + * + * @opensearch.internal */ public abstract class TransportBroadcastReplicationAction< Request extends BroadcastRequest, diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java index 0ea08eccae33d..9d3ee8e49e8c2 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java @@ -103,6 +103,8 @@ * The action samples cluster state on the receiving node to reroute to node with primary copy and on the * primary node to validate request before primary operation followed by sampling state again for resolving * nodes with replica copies to perform replication. + * + * @opensearch.internal */ public abstract class TransportReplicationAction< Request extends ReplicationRequest, @@ -384,6 +386,11 @@ protected Releasable checkPrimaryLimits(final Request request, boolean rerouteWa return () -> {}; } + /** + * Asynchronous primary action + * + * @opensearch.internal + */ class AsyncPrimaryAction extends AbstractRunnable { private final ActionListener onCompletionListener; private final ReplicationTask replicationTask; @@ -552,6 +559,11 @@ protected void adaptResponse(Response response, IndexShard indexShard) { } + /** + * The Primary Result + * + * @opensearch.internal + */ public static class PrimaryResult, Response extends ReplicationResponse> implements ReplicationOperation.PrimaryResult { @@ -601,6 +613,11 @@ public void runPostReplicationActions(ActionListener listener) { } } + /** + * The replica result + * + * @opensearch.internal + */ public static class ReplicaResult { final Exception finalFailure; @@ -643,6 +660,11 @@ protected Releasable checkReplicaLimits(final ReplicaRequest request) { return () -> {}; } + /** + * Thrown if there are any errors retrying on the replica + * + * @opensearch.internal + */ public static class RetryOnReplicaException extends OpenSearchException { public RetryOnReplicaException(ShardId shardId, String msg) { @@ -655,6 +677,11 @@ public RetryOnReplicaException(StreamInput in) throws IOException { } } + /** + * Asynchronous replica action + * + * @opensearch.internal + */ private final class AsyncReplicaAction extends AbstractRunnable implements ActionListener { private final ActionListener onCompletionListener; private final IndexShard replica; @@ -797,6 +824,8 @@ private IndexShard getIndexShard(final ShardId shardId) { * node with primary copy. * * Resolves index and shard id for the request before routing it to target node + * + * @opensearch.internal */ final class ReroutePhase extends AbstractRunnable { private final ActionListener listener; @@ -1131,6 +1160,11 @@ protected void acquireReplicaOperationPermit( replica.acquireReplicaOperationPermit(primaryTerm, globalCheckpoint, maxSeqNoOfUpdatesOrDeletes, onAcquired, executor, request); } + /** + * The primary shard reference + * + * @opensearch.internal + */ class PrimaryShardReference implements Releasable, @@ -1223,6 +1257,11 @@ public PendingReplicationActions getPendingReplicationActions() { } } + /** + * The replica response + * + * @opensearch.internal + */ public static class ReplicaResponse extends ActionResponse implements ReplicationOperation.ReplicaResponse { private long localCheckpoint; private long globalCheckpoint; @@ -1279,6 +1318,8 @@ public int hashCode() { * interface that performs the actual {@code ReplicaRequest} on the replica * shards. It also encapsulates the logic required for failing the replica * if deemed necessary as well as marking it as stale when needed. + * + * @opensearch.internal */ protected class ReplicasProxy implements ReplicationOperation.Replicas { @@ -1336,7 +1377,11 @@ public void markShardCopyAsStaleIfNeeded(ShardId shardId, String allocationId, l } } - /** a wrapper class to encapsulate a request when being sent to a specific allocation id **/ + /** + * a wrapper class to encapsulate a request when being sent to a specific allocation id + * + * @opensearch.internal + */ public static class ConcreteShardRequest extends TransportRequest { /** {@link AllocationId#getId()} of the shard this request is sent to **/ @@ -1440,6 +1485,11 @@ public String toString() { } } + /** + * Internal request for concrete replica + * + * @opensearch.internal + */ protected static final class ConcreteReplicaRequest extends ConcreteShardRequest { private final long globalCheckpoint; diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java index c9fb959306b9c..39fb89bc48568 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java @@ -69,6 +69,8 @@ /** * Base class for transport actions that modify data in some shard like index, delete, and shardBulk. * Allows performing async actions (e.g. refresh) after performing write operations on primary and replica shards + * + * @opensearch.internal */ public abstract class TransportWriteAction< Request extends ReplicatedWriteRequest, @@ -265,6 +267,8 @@ protected abstract void dispatchedShardOperationOnReplica( * Result of taking the action on the primary. * * NOTE: public for testing + * + * @opensearch.internal */ public static class WritePrimaryResult< ReplicaRequest extends ReplicatedWriteRequest, @@ -320,6 +324,8 @@ public void onFailure(Exception ex) { /** * Result of taking the action on the replica. + * + * @opensearch.internal */ public static class WriteReplicaResult> extends ReplicaResult { public final Location location; @@ -392,6 +398,8 @@ interface RespondingWriteResult { * This class encapsulates post write actions like async waits for * translog syncs or waiting for a refresh to happen making the write operation * visible. + * + * @opensearch.internal */ static final class AsyncAfterWriteAction { private final Location location; @@ -490,6 +498,8 @@ void run() { * * This extends {@code TransportReplicationAction.ReplicasProxy} to do the * failing and stale-ing. + * + * @opensearch.internal */ class WriteActionReplicasProxy extends ReplicasProxy { diff --git a/server/src/main/java/org/opensearch/action/support/replication/package-info.java b/server/src/main/java/org/opensearch/action/support/replication/package-info.java new file mode 100644 index 0000000000000..912cd9197b10f --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/replication/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Replication transport handlers. */ +package org.opensearch.action.support.replication; diff --git a/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequest.java b/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequest.java index 0dd72671fb8c3..85c15e1a01921 100644 --- a/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequest.java +++ b/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequest.java @@ -46,8 +46,13 @@ import java.io.IOException; import java.util.concurrent.TimeUnit; +/** + * Transport Request for an Index Shard Operation + * + * @opensearch.internal + */ // TODO: This request and its associated transport action can be folded into UpdateRequest which is its only concrete production code -// implementation +// implementation public abstract class InstanceShardOperationRequest> extends ActionRequest implements IndicesRequest { diff --git a/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java index 7bbbd7d11e6ab..6fe7b503e4602 100644 --- a/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java @@ -38,6 +38,11 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.common.unit.TimeValue; +/** + * Request builder for a shard operation + * + * @opensearch.internal + */ public abstract class InstanceShardOperationRequestBuilder< Request extends InstanceShardOperationRequest, Response extends ActionResponse, diff --git a/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java b/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java index f91b2e8ce2e98..bb9d685deedcd 100644 --- a/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java +++ b/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java @@ -69,6 +69,11 @@ import static org.opensearch.cluster.metadata.IndexNameExpressionResolver.EXCLUDED_DATA_STREAMS_KEY; +/** + * Base class for a single operation action + * + * @opensearch.internal + */ public abstract class TransportInstanceSingleOperationAction< Request extends InstanceShardOperationRequest, Response extends ActionResponse> extends HandledTransportAction { @@ -135,6 +140,11 @@ protected TransportRequestOptions transportOptions() { */ protected abstract ShardIterator shards(ClusterState clusterState, Request request); + /** + * Asynchronous single action + * + * @opensearch.internal + */ class AsyncSingleAction { private final ActionListener listener; @@ -286,6 +296,11 @@ public void onTimeout(TimeValue timeout) { } } + /** + * Transport handler per shard + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/single/instance/package-info.java b/server/src/main/java/org/opensearch/action/support/single/instance/package-info.java new file mode 100644 index 0000000000000..1acd5c1503ed0 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/single/instance/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Single Instance transport handlers. */ +package org.opensearch.action.support.single.instance; diff --git a/server/src/main/java/org/opensearch/action/support/single/package-info.java b/server/src/main/java/org/opensearch/action/support/single/package-info.java new file mode 100644 index 0000000000000..918a755936fe3 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/single/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Single instance transport handlers. */ +package org.opensearch.action.support.single; diff --git a/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardOperationRequestBuilder.java index d981bfaf60f2c..cf93947cd4afe 100644 --- a/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardOperationRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardOperationRequestBuilder.java @@ -37,6 +37,11 @@ import org.opensearch.action.ActionResponse; import org.opensearch.client.OpenSearchClient; +/** + * Request builder for a single shard operation request + * + * @opensearch.internal + */ public abstract class SingleShardOperationRequestBuilder< Request extends SingleShardRequest, Response extends ActionResponse, diff --git a/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardRequest.java b/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardRequest.java index faae069b4b7fa..61777e2b7bae2 100644 --- a/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardRequest.java +++ b/server/src/main/java/org/opensearch/action/support/single/shard/SingleShardRequest.java @@ -44,6 +44,11 @@ import java.io.IOException; +/** + * Single shard request. + * + * @opensearch.internal + */ public abstract class SingleShardRequest> extends ActionRequest implements IndicesRequest { public static final IndicesOptions INDICES_OPTIONS = IndicesOptions.strictSingleIndexNoExpandForbidClosed(); diff --git a/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java b/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java index 2a03abac733cd..df39bd29493dd 100644 --- a/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java +++ b/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java @@ -71,6 +71,8 @@ * A base class for operations that need to perform a read operation on a single shard copy. If the operation fails, * the read operation can be performed on other shard copies. Concrete implementations can provide their own list * of candidate shards to try the read operation on. + * + * @opensearch.internal */ public abstract class TransportSingleShardAction, Response extends ActionResponse> extends TransportAction { @@ -151,6 +153,11 @@ protected void resolveRequest(ClusterState state, InternalRequest request) { @Nullable protected abstract ShardsIterator shards(ClusterState state, InternalRequest request); + /** + * Asynchronous single action + * + * @opensearch.internal + */ class AsyncSingleAction { private final ActionListener listener; @@ -297,6 +304,11 @@ public void handleException(TransportException exp) { } } + /** + * Internal transport handler + * + * @opensearch.internal + */ private class TransportHandler implements TransportRequestHandler { @Override @@ -306,6 +318,11 @@ public void messageReceived(Request request, final TransportChannel channel, Tas } } + /** + * Shard level transport handler + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override @@ -319,6 +336,8 @@ public void messageReceived(final Request request, final TransportChannel channe /** * Internal request class that gets built on each node. Holds the original request plus additional info. + * + * @opensearch.internal */ protected class InternalRequest { final Request request; diff --git a/server/src/main/java/org/opensearch/action/support/single/shard/package-info.java b/server/src/main/java/org/opensearch/action/support/single/shard/package-info.java new file mode 100644 index 0000000000000..0d93688ece5f1 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/single/shard/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Single Shard transport handlers. */ +package org.opensearch.action.support.single.shard; diff --git a/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksRequest.java b/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksRequest.java index bbe7b918b26a5..34a8412ea4129 100644 --- a/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksRequest.java +++ b/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksRequest.java @@ -49,6 +49,8 @@ /** * A base class for task requests + * + * @opensearch.internal */ public class BaseTasksRequest> extends ActionRequest { diff --git a/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksResponse.java b/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksResponse.java index 3ba32cf2a3b12..dce52d078ffe8 100644 --- a/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksResponse.java +++ b/server/src/main/java/org/opensearch/action/support/tasks/BaseTasksResponse.java @@ -54,6 +54,8 @@ /** * Base class for responses of task-related operations + * + * @opensearch.internal */ public class BaseTasksResponse extends ActionResponse { protected static final String TASK_FAILURES = "task_failures"; diff --git a/server/src/main/java/org/opensearch/action/support/tasks/TasksRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/tasks/TasksRequestBuilder.java index 0dd0f585ae9e6..a15d008fea475 100644 --- a/server/src/main/java/org/opensearch/action/support/tasks/TasksRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/support/tasks/TasksRequestBuilder.java @@ -39,6 +39,8 @@ /** * Builder for task-based requests + * + * @opensearch.internal */ public class TasksRequestBuilder< Request extends BaseTasksRequest, diff --git a/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java b/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java index 7bd5a8503b123..460a0f7875558 100644 --- a/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java +++ b/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java @@ -73,6 +73,8 @@ /** * The base class for transport actions that are interacting with currently running tasks. + * + * @opensearch.internal */ public abstract class TransportTasksAction< OperationTask extends Task, @@ -235,6 +237,11 @@ protected TasksResponse newResponse(TasksRequest request, AtomicReferenceArray r */ protected abstract void taskOperation(TasksRequest request, OperationTask task, ActionListener listener); + /** + * Asynchronous single action + * + * @opensearch.internal + */ private class AsyncAction { private final TasksRequest request; @@ -351,6 +358,11 @@ private void finishHim() { } } + /** + * Node level transport handler + * + * @opensearch.internal + */ class NodeTransportHandler implements TransportRequestHandler { @Override @@ -366,6 +378,11 @@ public void messageReceived(final NodeTaskRequest request, final TransportChanne } } + /** + * Node level task request + * + * @opensearch.internal + */ private class NodeTaskRequest extends TransportRequest { private TasksRequest tasksRequest; @@ -387,6 +404,11 @@ protected NodeTaskRequest(TasksRequest tasksRequest) { } + /** + * Node level task response + * + * @opensearch.internal + */ private class NodeTasksResponse extends TransportResponse { protected String nodeId; protected List exceptions; diff --git a/server/src/main/java/org/opensearch/action/support/tasks/package-info.java b/server/src/main/java/org/opensearch/action/support/tasks/package-info.java new file mode 100644 index 0000000000000..30924e1433c7b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/tasks/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Base Task Request transport handlers. */ +package org.opensearch.action.support.tasks; diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsAction.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsAction.java index a14ae0ce94cc7..27d93f2a8e916 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsAction.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * A single multi term action. + * + * @opensearch.internal + */ public class MultiTermVectorsAction extends ActionType { public static final MultiTermVectorsAction INSTANCE = new MultiTermVectorsAction(); diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsItemResponse.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsItemResponse.java index 037f4b95e3c73..0367c01d7e4b7 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsItemResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsItemResponse.java @@ -39,7 +39,9 @@ import java.io.IOException; /** - * A single multi get response. + * A single multi term response. + * + * @opensearch.internal */ public class MultiTermVectorsItemResponse implements Writeable { diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequest.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequest.java index aada19b081a1c..b07472a1bb5d7 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequest.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequest.java @@ -51,6 +51,11 @@ import java.util.List; import java.util.Set; +/** + * A single multi get request. + * + * @opensearch.internal + */ public class MultiTermVectorsRequest extends ActionRequest implements Iterable, diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequestBuilder.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequestBuilder.java index 51711c01beb44..04dfd39112d6e 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsRequestBuilder.java @@ -35,6 +35,11 @@ import org.opensearch.action.ActionRequestBuilder; import org.opensearch.client.OpenSearchClient; +/** + * A single multi get request builder. + * + * @opensearch.internal + */ public class MultiTermVectorsRequestBuilder extends ActionRequestBuilder { public MultiTermVectorsRequestBuilder(OpenSearchClient client, MultiTermVectorsAction action) { diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java index 599c2fa883dc7..1a9ec0b63f46c 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java @@ -45,10 +45,17 @@ import java.util.Arrays; import java.util.Iterator; +/** + * A multi get response. + * + * @opensearch.internal + */ public class MultiTermVectorsResponse extends ActionResponse implements Iterable, ToXContentObject { /** * Represents a failure. + * + * @opensearch.internal */ public static class Failure implements Writeable { private final String index; @@ -146,6 +153,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String DOCS = "docs"; static final String _INDEX = "_index"; diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardRequest.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardRequest.java index 85491b37b4914..d8c0c918cb821 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardRequest.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardRequest.java @@ -42,6 +42,11 @@ import java.util.ArrayList; import java.util.List; +/** + * A multi get shard request. + * + * @opensearch.internal + */ public class MultiTermVectorsShardRequest extends SingleShardRequest { private int shardId; diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardResponse.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardResponse.java index b01582230ed85..c819c591468ea 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsShardResponse.java @@ -41,6 +41,11 @@ import java.util.ArrayList; import java.util.List; +/** + * A multi get shard response. + * + * @opensearch.internal + */ public class MultiTermVectorsShardResponse extends ActionResponse { final IntArrayList locations; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsAction.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsAction.java index acdeb3d18c880..e810621b1a064 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsAction.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsAction.java @@ -34,6 +34,12 @@ import org.opensearch.action.ActionType; +/** + * Transport action for returning the term vector (doc frequency, positions, offsets) for a + * document. + * + * @opensearch.internal + */ public class TermVectorsAction extends ActionType { public static final TermVectorsAction INSTANCE = new TermVectorsAction(); diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java index 0033e9299b76d..0b2cd3bb2509f 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java @@ -130,8 +130,9 @@ *

  • BytesRef: payload_freqency (if payloads)
  • * * + * + * @opensearch.internal */ - public final class TermVectorsFields extends Fields { private final ObjectLongHashMap fieldMap; @@ -203,6 +204,11 @@ public int size() { return fieldMap.size(); } + /** + * Internal term vector + * + * @opensearch.internal + */ private final class TermVector extends Terms { private final StreamInput perFieldTermVectorInput; @@ -419,6 +425,11 @@ public boolean hasPayloads() { } } + /** + * Internal postings enumerator for term vectors + * + * @opensearch.internal + */ private final class TermVectorPostingsEnum extends PostingsEnum { private boolean hasPositions; private boolean hasOffsets; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java index 2d2650e2b9389..0e0202777794b 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java @@ -45,6 +45,12 @@ import java.util.Map; import java.util.Set; +/** + * Filter the term vector (doc frequency, positions, offsets) for a + * document. + * + * @opensearch.internal + */ public class TermVectorsFilter { public static final int DEFAULT_MAX_QUERY_TERMS = 25; public static final int DEFAULT_MIN_TERM_FREQ = 0; @@ -170,6 +176,11 @@ public void setMaxWordLength(int maxWordLength) { this.maxWordLength = maxWordLength; } + /** + * Internal score term + * + * @opensearch.internal + */ public static final class ScoreTerm { public String field; public String word; @@ -289,6 +300,11 @@ private float computeScore(long docFreq, int freq, long numDocs) { return freq * similarity.idf(docFreq, numDocs); } + /** + * Internal queue of score terms + * + * @opensearch.internal + */ private static class ScoreTermsQueue extends org.apache.lucene.util.PriorityQueue { private final int limit; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java index 214d5f0d6d4fa..25f33934dbb80 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java @@ -73,6 +73,8 @@ *

    * Note, the {@link #index()}, and {@link #id(String)} are * required. + * + * @opensearch.internal */ public class TermVectorsRequest extends SingleShardRequest implements RealtimeRequest { private static final ParseField INDEX = new ParseField("_index"); @@ -113,6 +115,11 @@ public class TermVectorsRequest extends SingleShardRequest i private FilterSettings filterSettings; + /** + * Internal filter settings + * + * @opensearch.internal + */ public static final class FilterSettings { public Integer maxNumTerms; public Integer minTermFreq; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequestBuilder.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequestBuilder.java index 7294db072ad38..d9227a1afa199 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequestBuilder.java @@ -45,6 +45,8 @@ *

    * Note, the {@code index}, {@code type} and {@code id} are * required. + * + * @opensearch.internal */ public class TermVectorsRequestBuilder extends ActionRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java index 870609d526909..9f4cd005f23b4 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java @@ -58,8 +58,19 @@ import java.util.Iterator; import java.util.Set; +/** + * Response returning the term vector (doc frequency, positions, offsets) for a + * document. + * + * @opensearch.internal + */ public class TermVectorsResponse extends ActionResponse implements ToXContentObject { + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ private static class FieldStrings { // term statistics strings public static final String TTF = "ttf"; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsWriter.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsWriter.java index 2c1e543774da6..e7772cf300f5a 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsWriter.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsWriter.java @@ -49,6 +49,12 @@ import java.util.List; import java.util.Set; +/** + * Writer for the term vector (doc frequency, positions, offsets) for a + * document. + * + * @opensearch.internal + */ // package only - this is an internal class! final class TermVectorsWriter { final List fields = new ArrayList<>(); diff --git a/server/src/main/java/org/opensearch/action/termvectors/TransportMultiTermVectorsAction.java b/server/src/main/java/org/opensearch/action/termvectors/TransportMultiTermVectorsAction.java index 127b31f329d09..d90c3968bddbb 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TransportMultiTermVectorsAction.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TransportMultiTermVectorsAction.java @@ -51,6 +51,11 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +/** + * Performs the multi term get operation. + * + * @opensearch.internal + */ public class TransportMultiTermVectorsAction extends HandledTransportAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TransportShardMultiTermsVectorAction.java b/server/src/main/java/org/opensearch/action/termvectors/TransportShardMultiTermsVectorAction.java index 511b68965ebdf..b5928dc99571f 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TransportShardMultiTermsVectorAction.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TransportShardMultiTermsVectorAction.java @@ -50,6 +50,11 @@ import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; +/** + * Performs the multi term shard level get operation. + * + * @opensearch.internal + */ public class TransportShardMultiTermsVectorAction extends TransportSingleShardAction< MultiTermVectorsShardRequest, MultiTermVectorsShardResponse> { diff --git a/server/src/main/java/org/opensearch/action/termvectors/TransportTermVectorsAction.java b/server/src/main/java/org/opensearch/action/termvectors/TransportTermVectorsAction.java index 3cfd9cf7da7c5..11770cd10d982 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TransportTermVectorsAction.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TransportTermVectorsAction.java @@ -55,6 +55,8 @@ /** * Performs the get operation. + * + * @opensearch.internal */ public class TransportTermVectorsAction extends TransportSingleShardAction { diff --git a/server/src/main/java/org/opensearch/action/update/TransportUpdateAction.java b/server/src/main/java/org/opensearch/action/update/TransportUpdateAction.java index e554ebc0f8414..c0c28f39b1e03 100644 --- a/server/src/main/java/org/opensearch/action/update/TransportUpdateAction.java +++ b/server/src/main/java/org/opensearch/action/update/TransportUpdateAction.java @@ -81,6 +81,11 @@ import static org.opensearch.action.bulk.TransportSingleItemBulkWriteAction.toSingleItemBulkRequest; import static org.opensearch.action.bulk.TransportSingleItemBulkWriteAction.wrapBulkResponse; +/** + * Transport action for updating an index + * + * @opensearch.internal + */ public class TransportUpdateAction extends TransportInstanceSingleOperationAction { private final AutoCreateIndex autoCreateIndex; diff --git a/server/src/main/java/org/opensearch/action/update/UpdateAction.java b/server/src/main/java/org/opensearch/action/update/UpdateAction.java index c82cf96506de4..af520409f498c 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateAction.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateAction.java @@ -34,6 +34,11 @@ import org.opensearch.action.ActionType; +/** + * Action for updating an index + * + * @opensearch.internal + */ public class UpdateAction extends ActionType { public static final UpdateAction INSTANCE = new UpdateAction(); diff --git a/server/src/main/java/org/opensearch/action/update/UpdateHelper.java b/server/src/main/java/org/opensearch/action/update/UpdateHelper.java index 0da41a3028edf..09a0a6281b8fc 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateHelper.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateHelper.java @@ -67,6 +67,8 @@ /** * Helper for translating an update request to an index, delete request or update response. + * + * @opensearch.internal */ public class UpdateHelper { @@ -388,6 +390,11 @@ public static GetResult extractGetResult( ); } + /** + * Internal result + * + * @opensearch.internal + */ public static class Result { private final Writeable action; @@ -466,6 +473,8 @@ public String toString() { /** * Field names used to populate the script context + * + * @opensearch.internal */ public static class ContextFields { public static final String CTX = "ctx"; diff --git a/server/src/main/java/org/opensearch/action/update/UpdateRequest.java b/server/src/main/java/org/opensearch/action/update/UpdateRequest.java index 36be9f0160c9a..d434f134f4321 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateRequest.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateRequest.java @@ -72,6 +72,11 @@ import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_PRIMARY_TERM; import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO; +/** + * Transport request for updating an index + * + * @opensearch.internal + */ public class UpdateRequest extends InstanceShardOperationRequest implements DocWriteRequest, diff --git a/server/src/main/java/org/opensearch/action/update/UpdateRequestBuilder.java b/server/src/main/java/org/opensearch/action/update/UpdateRequestBuilder.java index 73e470bf8ba69..e797c9857460c 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateRequestBuilder.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateRequestBuilder.java @@ -46,6 +46,11 @@ import java.util.Map; +/** + * Transport request builder for updating an index + * + * @opensearch.internal + */ public class UpdateRequestBuilder extends InstanceShardOperationRequestBuilder implements WriteRequestBuilder { diff --git a/server/src/main/java/org/opensearch/action/update/UpdateResponse.java b/server/src/main/java/org/opensearch/action/update/UpdateResponse.java index 2c6efaf3c5f6b..8fca544f2d53b 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateResponse.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateResponse.java @@ -45,6 +45,11 @@ import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +/** + * Transport response for updating an index + * + * @opensearch.internal + */ public class UpdateResponse extends DocWriteResponse { private static final String GET = "get"; @@ -167,6 +172,8 @@ public static void parseXContentFields(XContentParser parser, Builder context) t * Builder class for {@link UpdateResponse}. This builder is usually used during xcontent parsing to * temporarily store the parsed values, then the {@link DocWriteResponse.Builder#build()} method is called to * instantiate the {@link UpdateResponse}. + * + * @opensearch.internal */ public static class Builder extends DocWriteResponse.Builder { diff --git a/server/src/main/java/org/opensearch/action/update/package-info.java b/server/src/main/java/org/opensearch/action/update/package-info.java new file mode 100644 index 0000000000000..a8c8720c9ac10 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/update/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Update Action transport handlers. */ +package org.opensearch.action.update; diff --git a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java index c0c0251538d01..8c4a550a9b5f5 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java +++ b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java @@ -82,6 +82,8 @@ /** * Internal startup code. + * + * @opensearch.internal */ final class Bootstrap { diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java index 230b1bd05e579..429612ba1b93d 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java @@ -36,6 +36,8 @@ /** * Encapsulates a bootstrap check. + * + * @opensearch.internal */ public interface BootstrapCheck { diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java index 6b75f2306431c..7953dee644ea4 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java @@ -71,6 +71,8 @@ * We enforce bootstrap checks once a node has the transport protocol bound to a non-loopback interface or if the system property {@code * opensearch.enforce.bootstrap.checks} is set to {@true}. In this case we assume the node is running in production and * all bootstrap checks must pass. + * + * @opensearch.internal */ final class BootstrapChecks { diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java index b07a544e8521e..1cfd8bf6dfc35 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java @@ -37,6 +37,8 @@ /** * Context that is passed to every bootstrap check to make decisions on. + * + * @opensearch.internal */ public class BootstrapContext { /** diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java index 8daa29aa3578b..77b66553cb46d 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java @@ -41,6 +41,8 @@ * these checked exceptions so that * {@link Bootstrap#init(boolean, Path, boolean, org.opensearch.env.Environment)} * does not have to declare all of these checked exceptions. + * + * @opensearch.internal */ class BootstrapException extends Exception { diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java index d45d8ddab9c2c..0aa965ce46096 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java @@ -39,6 +39,8 @@ /** * Exposes system startup information + * + * @opensearch.internal */ @SuppressForbidden(reason = "exposes read-only view of system properties") public final class BootstrapInfo { diff --git a/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java index 208030b5d6d12..911bc92c433f1 100644 --- a/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java @@ -35,6 +35,11 @@ import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Setting.Property; +/** + * Settings used for bootstrapping OpenSearch + * + * @opensearch.internal + */ public final class BootstrapSettings { private BootstrapSettings() {} diff --git a/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java b/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java index cbc1b6e761923..ae9b6ea7ce761 100644 --- a/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java +++ b/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java @@ -32,6 +32,11 @@ package org.opensearch.bootstrap; +/** + * Handler for ctrl events on the console + * + * @opensearch.internal + */ public interface ConsoleCtrlHandler { int CTRL_CLOSE_EVENT = 2; diff --git a/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java b/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java index b37aef5f9738d..18ff013b1e8cb 100644 --- a/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java +++ b/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java @@ -40,6 +40,11 @@ import java.nio.file.Path; import java.security.Permissions; +/** + * Utility for File Permissions during bootstrap + * + * @opensearch.internal + */ public class FilePermissionUtils { /** no instantiation */ diff --git a/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java b/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java index 7d3ce7728a9dc..aca2cb9656025 100644 --- a/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java @@ -45,6 +45,8 @@ /** * java mapping to some libc functions + * + * @opensearch.internal */ final class JNACLibrary { diff --git a/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java b/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java index a0cd656f5fc01..8e556df4b2f9b 100644 --- a/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java @@ -51,6 +51,8 @@ /** * Library for Windows/Kernel32 + * + * @opensearch.internal */ final class JNAKernel32Library { diff --git a/server/src/main/java/org/opensearch/bootstrap/JNANatives.java b/server/src/main/java/org/opensearch/bootstrap/JNANatives.java index 1e3c6c3af0386..033596033b0fd 100644 --- a/server/src/main/java/org/opensearch/bootstrap/JNANatives.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNANatives.java @@ -48,6 +48,8 @@ /** * This class performs the actual work with JNA and library bindings to call native methods. It should only be used after * we are sure that the JNA classes are available to the JVM + * + * @opensearch.internal */ class JNANatives { diff --git a/server/src/main/java/org/opensearch/bootstrap/Natives.java b/server/src/main/java/org/opensearch/bootstrap/Natives.java index 65025e41958ce..aa5e29fbb2591 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Natives.java +++ b/server/src/main/java/org/opensearch/bootstrap/Natives.java @@ -40,6 +40,8 @@ /** * The Natives class is a wrapper class that checks if the classes necessary for calling native methods are available on * startup. If they are not available, this class will avoid calling code that loads these classes. + * + * @opensearch.internal */ final class Natives { /** no instantiation */ diff --git a/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java index 7f96ea425d17e..ab52ae5a43a2a 100644 --- a/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java @@ -55,6 +55,8 @@ /** * This class starts opensearch. + * + * @opensearch.internal */ class OpenSearch extends EnvironmentAwareCommand { diff --git a/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java index d31f11f153ae8..14435db64274c 100644 --- a/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java @@ -48,7 +48,11 @@ import java.util.Map; import java.util.function.Predicate; -/** custom policy for union of static and dynamic permissions */ +/** + * custom policy for union of static and dynamic permissions + * + * @opensearch.internal + **/ final class OpenSearchPolicy extends Policy { /** template policy file, the one used in tests */ diff --git a/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java index 4834f4cb211fe..2b28260097ce1 100644 --- a/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java @@ -41,6 +41,11 @@ import java.security.AccessController; import java.security.PrivilegedAction; +/** + * UncaughtException Handler used during bootstrapping + * + * @opensearch.internal + */ class OpenSearchUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { private static final Logger logger = LogManager.getLogger(OpenSearchUncaughtExceptionHandler.class); diff --git a/server/src/main/java/org/opensearch/bootstrap/Security.java b/server/src/main/java/org/opensearch/bootstrap/Security.java index 59ca91a68e025..749c146de4f16 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Security.java +++ b/server/src/main/java/org/opensearch/bootstrap/Security.java @@ -116,6 +116,8 @@ * * See * Troubleshooting Security for information. + * + * @opensearch.internal */ final class Security { /** no instantiation */ diff --git a/server/src/main/java/org/opensearch/bootstrap/Spawner.java b/server/src/main/java/org/opensearch/bootstrap/Spawner.java index e2fae1f196412..e2df60af6c1d1 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Spawner.java +++ b/server/src/main/java/org/opensearch/bootstrap/Spawner.java @@ -51,6 +51,8 @@ /** * Spawns native module controller processes if present. Will only work prior to a system call filter being installed. + * + * @opensearch.internal */ final class Spawner implements Closeable { diff --git a/server/src/main/java/org/opensearch/bootstrap/StartupException.java b/server/src/main/java/org/opensearch/bootstrap/StartupException.java index 735e8cfd287af..9ad89ab518006 100644 --- a/server/src/main/java/org/opensearch/bootstrap/StartupException.java +++ b/server/src/main/java/org/opensearch/bootstrap/StartupException.java @@ -44,6 +44,8 @@ * "reasonably". This means limits on stacktrace frames and * cleanup for guice, and some guidance about consulting full * logs for the whole exception. + * + * @opensearch.internal */ // TODO: remove this when guice is removed, and exceptions are cleaned up // this is horrible, but its what we must do diff --git a/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java b/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java index 8e179de9c28df..f8baee06c4315 100644 --- a/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java +++ b/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java @@ -102,6 +102,8 @@ * https://reverse.put.as/wp-content/uploads/2011/06/The-Apple-Sandbox-BHDC2011-Paper.pdf * @see * https://docs.oracle.com/cd/E23824_01/html/821-1456/prbac-2.html + * + * @opensearch.internal */ // not an example of how to write code!!! final class SystemCallFilter { diff --git a/server/src/main/java/org/opensearch/bootstrap/package-info.java b/server/src/main/java/org/opensearch/bootstrap/package-info.java new file mode 100644 index 0000000000000..a1761d8d38315 --- /dev/null +++ b/server/src/main/java/org/opensearch/bootstrap/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * The bootstrap module implementing OpenSearch bootstrap operations. + */ +package org.opensearch.bootstrap; diff --git a/server/src/main/java/org/opensearch/cli/CommandLoggingConfigurator.java b/server/src/main/java/org/opensearch/cli/CommandLoggingConfigurator.java index 1705e9ebdd4b9..8918725472160 100644 --- a/server/src/main/java/org/opensearch/cli/CommandLoggingConfigurator.java +++ b/server/src/main/java/org/opensearch/cli/CommandLoggingConfigurator.java @@ -39,6 +39,8 @@ /** * Holder class for method to configure logging without OpenSearch configuration files for use in CLI tools that will not read such * files. + * + * @opensearch.internal */ public final class CommandLoggingConfigurator { diff --git a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java index e85af87213fd0..10c59ef673050 100644 --- a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java @@ -46,7 +46,11 @@ import java.util.Locale; import java.util.Map; -/** A cli command which requires an {@link org.opensearch.env.Environment} to use current paths and settings. */ +/** + * A cli command which requires an {@link org.opensearch.env.Environment} to use current paths and settings. + * + * @opensearch.internal + */ public abstract class EnvironmentAwareCommand extends Command { private final OptionSpec settingOption; diff --git a/server/src/main/java/org/opensearch/cli/KeyStoreAwareCommand.java b/server/src/main/java/org/opensearch/cli/KeyStoreAwareCommand.java index 404dacd504e8a..17067909315b2 100644 --- a/server/src/main/java/org/opensearch/cli/KeyStoreAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/KeyStoreAwareCommand.java @@ -44,6 +44,8 @@ /** * An {@link org.opensearch.cli.EnvironmentAwareCommand} that needs to access the opensearch keystore, possibly * decrypting it if it is password protected. + * + * @opensearch.internal */ public abstract class KeyStoreAwareCommand extends EnvironmentAwareCommand { public KeyStoreAwareCommand(String description) { diff --git a/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java b/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java index 7aee5e3fa1f76..07a6b7d523a33 100644 --- a/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java @@ -35,6 +35,8 @@ /** * A command that is aware of logging. This class should be preferred over the base {@link Command} class for any CLI tools that depend on * core OpenSearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be configured. + * + * @opensearch.internal */ public abstract class LoggingAwareCommand extends Command { diff --git a/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java b/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java index 2354a4978aec9..8453ed05a12d3 100644 --- a/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java +++ b/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java @@ -36,6 +36,8 @@ * A multi-command that is aware of logging. This class should be preferred over the base {@link MultiCommand} class for any CLI tools that * depend on core OpenSearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be * configured. + * + * @opensearch.internal */ public abstract class LoggingAwareMultiCommand extends MultiCommand { diff --git a/server/src/main/java/org/opensearch/cli/package-info.java b/server/src/main/java/org/opensearch/cli/package-info.java new file mode 100644 index 0000000000000..8e9f9f6360870 --- /dev/null +++ b/server/src/main/java/org/opensearch/cli/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * The command line interface module. + */ +package org.opensearch.cli; diff --git a/server/src/main/java/org/opensearch/client/AdminClient.java b/server/src/main/java/org/opensearch/client/AdminClient.java index 995466ba5746c..0c6c97b795983 100644 --- a/server/src/main/java/org/opensearch/client/AdminClient.java +++ b/server/src/main/java/org/opensearch/client/AdminClient.java @@ -35,8 +35,9 @@ /** * Administrative actions/operations against the cluster or the indices. * - * * @see org.opensearch.client.Client#admin() + * + * @opensearch.internal */ public interface AdminClient { diff --git a/server/src/main/java/org/opensearch/client/Client.java b/server/src/main/java/org/opensearch/client/Client.java index 0a6d3333c59c9..c2ffd1575e8f1 100644 --- a/server/src/main/java/org/opensearch/client/Client.java +++ b/server/src/main/java/org/opensearch/client/Client.java @@ -97,6 +97,8 @@ * A client can be retrieved from a started {@link org.opensearch.node.Node}. * * @see org.opensearch.node.Node#client() + * + * @opensearch.internal */ public interface Client extends OpenSearchClient, Releasable { diff --git a/server/src/main/java/org/opensearch/client/ClusterAdminClient.java b/server/src/main/java/org/opensearch/client/ClusterAdminClient.java index 1088b85ae271f..f4eaa979ff18c 100644 --- a/server/src/main/java/org/opensearch/client/ClusterAdminClient.java +++ b/server/src/main/java/org/opensearch/client/ClusterAdminClient.java @@ -139,6 +139,8 @@ * Administrative actions/operations against indices. * * @see AdminClient#cluster() + * + * @opensearch.internal */ public interface ClusterAdminClient extends OpenSearchClient { diff --git a/server/src/main/java/org/opensearch/client/FilterClient.java b/server/src/main/java/org/opensearch/client/FilterClient.java index 4d7bf2ed30b00..d121fdd77dfeb 100644 --- a/server/src/main/java/org/opensearch/client/FilterClient.java +++ b/server/src/main/java/org/opensearch/client/FilterClient.java @@ -43,6 +43,8 @@ * A {@link Client} that contains another {@link Client} which it * uses as its basic source, possibly transforming the requests / responses along the * way or providing additional functionality. + * + * @opensearch.internal */ public abstract class FilterClient extends AbstractClient { diff --git a/server/src/main/java/org/opensearch/client/IndicesAdminClient.java b/server/src/main/java/org/opensearch/client/IndicesAdminClient.java index 7f51b8af19e4b..c9cd0d0900b5a 100644 --- a/server/src/main/java/org/opensearch/client/IndicesAdminClient.java +++ b/server/src/main/java/org/opensearch/client/IndicesAdminClient.java @@ -36,8 +36,6 @@ import org.opensearch.action.ActionListener; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequestBuilder; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistRequestBuilder; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequestBuilder; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; @@ -60,9 +58,6 @@ import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequest; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse; -import org.opensearch.action.admin.indices.exists.types.TypesExistsRequest; -import org.opensearch.action.admin.indices.exists.types.TypesExistsRequestBuilder; -import org.opensearch.action.admin.indices.exists.types.TypesExistsResponse; import org.opensearch.action.admin.indices.flush.FlushRequest; import org.opensearch.action.admin.indices.flush.FlushRequestBuilder; import org.opensearch.action.admin.indices.flush.FlushResponse; @@ -137,6 +132,8 @@ * Administrative actions/operations against indices. * * @see AdminClient#indices() + * + * @opensearch.internal */ public interface IndicesAdminClient extends OpenSearchClient { @@ -163,34 +160,6 @@ public interface IndicesAdminClient extends OpenSearchClient { */ IndicesExistsRequestBuilder prepareExists(String... indices); - /** - * Types exists. - * - * @deprecated Types are deprecated and are in the process of being removed. - * @param request The types exists request - * @return The result future - */ - @Deprecated - ActionFuture typesExists(TypesExistsRequest request); - - /** - * Types exists. - * - * @deprecated Types are deprecated and are in the process of being removed. - * @param request The types exists - * @param listener A listener to be notified with a result - */ - @Deprecated - void typesExists(TypesExistsRequest request, ActionListener listener); - - /** - * Types exists. - * - * @deprecated Types are deprecated and are in the process of being removed. - */ - @Deprecated - TypesExistsRequestBuilder prepareTypesExists(String... index); - /** * Indices stats. */ @@ -595,26 +564,6 @@ public interface IndicesAdminClient extends OpenSearchClient { */ GetAliasesRequestBuilder prepareGetAliases(String... aliases); - /** - * Allows to check to existence of aliases from indices. - */ - AliasesExistRequestBuilder prepareAliasesExist(String... aliases); - - /** - * Check to existence of index aliases. - * - * @param request The result future - */ - ActionFuture aliasesExist(GetAliasesRequest request); - - /** - * Check the existence of specified index aliases. - * - * @param request The index aliases request - * @param listener A listener to be notified with a result - */ - void aliasesExist(GetAliasesRequest request, ActionListener listener); - /** * Get index metadata for particular indices. * diff --git a/server/src/main/java/org/opensearch/client/OpenSearchClient.java b/server/src/main/java/org/opensearch/client/OpenSearchClient.java index 9b092c98aa5f5..755aca1f573e0 100644 --- a/server/src/main/java/org/opensearch/client/OpenSearchClient.java +++ b/server/src/main/java/org/opensearch/client/OpenSearchClient.java @@ -39,6 +39,11 @@ import org.opensearch.action.ActionResponse; import org.opensearch.threadpool.ThreadPool; +/** + * Interface for an OpenSearch client implementation + * + * @opensearch.internal + */ public interface OpenSearchClient { /** diff --git a/server/src/main/java/org/opensearch/client/OriginSettingClient.java b/server/src/main/java/org/opensearch/client/OriginSettingClient.java index acb6352b06185..41fe9741cc4e7 100644 --- a/server/src/main/java/org/opensearch/client/OriginSettingClient.java +++ b/server/src/main/java/org/opensearch/client/OriginSettingClient.java @@ -46,6 +46,8 @@ * {@link ThreadContext#stashWithOrigin origin} set to a particular * value and calls its {@linkplain ActionListener} in its original * {@link ThreadContext}. + * + * @opensearch.internal */ public final class OriginSettingClient extends FilterClient { diff --git a/server/src/main/java/org/opensearch/client/ParentTaskAssigningClient.java b/server/src/main/java/org/opensearch/client/ParentTaskAssigningClient.java index 444f0ea778b05..58ea99fa96bc3 100644 --- a/server/src/main/java/org/opensearch/client/ParentTaskAssigningClient.java +++ b/server/src/main/java/org/opensearch/client/ParentTaskAssigningClient.java @@ -43,6 +43,8 @@ /** * A {@linkplain Client} that sets the parent task on all requests that it makes. Use this to conveniently implement actions that cause * many other actions. + * + * @opensearch.internal */ public class ParentTaskAssigningClient extends FilterClient { private final TaskId parentTask; diff --git a/server/src/main/java/org/opensearch/client/Requests.java b/server/src/main/java/org/opensearch/client/Requests.java index d89f55a37a9cf..b04de7830a780 100644 --- a/server/src/main/java/org/opensearch/client/Requests.java +++ b/server/src/main/java/org/opensearch/client/Requests.java @@ -79,6 +79,8 @@ /** * A handy one stop shop for creating requests (make sure to import static this class). + * + * @opensearch.internal */ public class Requests { diff --git a/server/src/main/java/org/opensearch/client/node/NodeClient.java b/server/src/main/java/org/opensearch/client/node/NodeClient.java index bda7cdca91015..56cb7c406744a 100644 --- a/server/src/main/java/org/opensearch/client/node/NodeClient.java +++ b/server/src/main/java/org/opensearch/client/node/NodeClient.java @@ -52,6 +52,8 @@ /** * Client that executes actions on the local node. + * + * @opensearch.internal */ public class NodeClient extends AbstractClient { diff --git a/server/src/main/java/org/opensearch/client/node/package-info.java b/server/src/main/java/org/opensearch/client/node/package-info.java new file mode 100644 index 0000000000000..0a3be1fad6bf0 --- /dev/null +++ b/server/src/main/java/org/opensearch/client/node/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * The node client module allowing to easily perform actions/operations at node level. + */ +package org.opensearch.client.node; diff --git a/server/src/main/java/org/opensearch/client/package-info.java b/server/src/main/java/org/opensearch/client/package-info.java index 24c744803a151..abfd9a9119971 100644 --- a/server/src/main/java/org/opensearch/client/package-info.java +++ b/server/src/main/java/org/opensearch/client/package-info.java @@ -25,12 +25,12 @@ * under the License. */ -/** - * The client module allowing to easily perform actions/operations. - */ /* * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ +/** + * The client module allowing to easily perform actions/operations. + */ package org.opensearch.client; diff --git a/server/src/main/java/org/opensearch/client/support/AbstractClient.java b/server/src/main/java/org/opensearch/client/support/AbstractClient.java index bcebd1a6e6ae3..d22cd6f32bc9f 100644 --- a/server/src/main/java/org/opensearch/client/support/AbstractClient.java +++ b/server/src/main/java/org/opensearch/client/support/AbstractClient.java @@ -154,9 +154,6 @@ import org.opensearch.action.admin.indices.alias.IndicesAliasesAction; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequestBuilder; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistAction; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistRequestBuilder; -import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesAction; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequestBuilder; @@ -192,10 +189,6 @@ import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequest; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse; -import org.opensearch.action.admin.indices.exists.types.TypesExistsAction; -import org.opensearch.action.admin.indices.exists.types.TypesExistsRequest; -import org.opensearch.action.admin.indices.exists.types.TypesExistsRequestBuilder; -import org.opensearch.action.admin.indices.exists.types.TypesExistsResponse; import org.opensearch.action.admin.indices.flush.FlushAction; import org.opensearch.action.admin.indices.flush.FlushRequest; import org.opensearch.action.admin.indices.flush.FlushRequestBuilder; @@ -379,6 +372,11 @@ import java.util.Map; +/** + * Base client used to create concrete client implementations + * + * @opensearch.internal + */ public abstract class AbstractClient implements Client { protected final Logger logger; @@ -1348,22 +1346,6 @@ public IndicesExistsRequestBuilder prepareExists(String... indices) { return new IndicesExistsRequestBuilder(this, IndicesExistsAction.INSTANCE, indices); } - @Deprecated - @Override - public ActionFuture typesExists(TypesExistsRequest request) { - return execute(TypesExistsAction.INSTANCE, request); - } - - @Override - public void typesExists(TypesExistsRequest request, ActionListener listener) { - execute(TypesExistsAction.INSTANCE, request, listener); - } - - @Override - public TypesExistsRequestBuilder prepareTypesExists(String... index) { - return new TypesExistsRequestBuilder(this, TypesExistsAction.INSTANCE, index); - } - @Override public ActionFuture aliases(final IndicesAliasesRequest request) { return execute(IndicesAliasesAction.INSTANCE, request); @@ -1399,21 +1381,6 @@ public ActionFuture clearCache(final ClearIndicesCach return execute(ClearIndicesCacheAction.INSTANCE, request); } - @Override - public void aliasesExist(GetAliasesRequest request, ActionListener listener) { - execute(AliasesExistAction.INSTANCE, request, listener); - } - - @Override - public ActionFuture aliasesExist(GetAliasesRequest request) { - return execute(AliasesExistAction.INSTANCE, request); - } - - @Override - public AliasesExistRequestBuilder prepareAliasesExist(String... aliases) { - return new AliasesExistRequestBuilder(this, AliasesExistAction.INSTANCE, aliases); - } - @Override public ActionFuture getIndex(GetIndexRequest request) { return execute(GetIndexAction.INSTANCE, request); diff --git a/server/src/main/java/org/opensearch/client/support/package-info.java b/server/src/main/java/org/opensearch/client/support/package-info.java new file mode 100644 index 0000000000000..637f7f03101aa --- /dev/null +++ b/server/src/main/java/org/opensearch/client/support/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * The Abstract client for implementing new client types. + */ +package org.opensearch.client.support; diff --git a/server/src/main/java/org/opensearch/client/transport/NoNodeAvailableException.java b/server/src/main/java/org/opensearch/client/transport/NoNodeAvailableException.java index a4ffe2102037e..e3424689c5152 100644 --- a/server/src/main/java/org/opensearch/client/transport/NoNodeAvailableException.java +++ b/server/src/main/java/org/opensearch/client/transport/NoNodeAvailableException.java @@ -40,6 +40,8 @@ /** * An exception indicating no node is available to perform the operation. + * + * @opensearch.internal */ public class NoNodeAvailableException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/client/transport/package-info.java b/server/src/main/java/org/opensearch/client/transport/package-info.java new file mode 100644 index 0000000000000..a775d93350b19 --- /dev/null +++ b/server/src/main/java/org/opensearch/client/transport/package-info.java @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * Transport Client support classes. + */ +package org.opensearch.client.transport; diff --git a/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java b/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java index 7b95545e58101..600f972fd9d63 100644 --- a/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java +++ b/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java @@ -41,6 +41,8 @@ /** * Abstract diffable object with simple diffs implementation that sends the entire object if object has changed or * nothing if object remained the same. + * + * @opensearch.internal */ public abstract class AbstractDiffable> implements Diffable { diff --git a/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java b/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java index 43ff74f30a249..8af061a0874c9 100644 --- a/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java +++ b/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java @@ -43,6 +43,8 @@ /** * Abstract diffable object with simple diffs implementation that sends the entire object if object has changed or * nothing is object remained the same. Comparing to AbstractDiffable, this class also works with NamedWriteables + * + * @opensearch.internal */ public abstract class AbstractNamedDiffable> implements Diffable, NamedWriteable { diff --git a/server/src/main/java/org/opensearch/cluster/AckedClusterStateTaskListener.java b/server/src/main/java/org/opensearch/cluster/AckedClusterStateTaskListener.java index 0f6531fb09be9..482087be1c8eb 100644 --- a/server/src/main/java/org/opensearch/cluster/AckedClusterStateTaskListener.java +++ b/server/src/main/java/org/opensearch/cluster/AckedClusterStateTaskListener.java @@ -35,6 +35,11 @@ import org.opensearch.common.Nullable; import org.opensearch.common.unit.TimeValue; +/** + * Listener when cluster state task is acknowledged + * + * @opensearch.internal + */ public interface AckedClusterStateTaskListener extends ClusterStateTaskListener { /** diff --git a/server/src/main/java/org/opensearch/cluster/AckedClusterStateUpdateTask.java b/server/src/main/java/org/opensearch/cluster/AckedClusterStateUpdateTask.java index 82ea05274d0d1..21c4460964067 100644 --- a/server/src/main/java/org/opensearch/cluster/AckedClusterStateUpdateTask.java +++ b/server/src/main/java/org/opensearch/cluster/AckedClusterStateUpdateTask.java @@ -41,6 +41,8 @@ /** * An extension interface to {@link ClusterStateUpdateTask} that allows to be notified when * all the nodes have acknowledged a cluster state update request + * + * @opensearch.internal */ public abstract class AckedClusterStateUpdateTask extends ClusterStateUpdateTask implements AckedClusterStateTaskListener { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterChangedEvent.java b/server/src/main/java/org/opensearch/cluster/ClusterChangedEvent.java index 387a27da46820..dd4f6c59fabaa 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterChangedEvent.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterChangedEvent.java @@ -53,6 +53,8 @@ /** * An event received by the local node, signaling that the cluster state has changed. + * + * @opensearch.internal */ public class ClusterChangedEvent { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterInfo.java b/server/src/main/java/org/opensearch/cluster/ClusterInfo.java index 19e026c570c74..8803af9a5419a 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterInfo.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterInfo.java @@ -55,6 +55,8 @@ * and a map of shard ids to shard sizes, see * InternalClusterInfoService.shardIdentifierFromRouting(String) * for the key used in the shardSizes map + * + * @opensearch.internal */ public class ClusterInfo implements ToXContentFragment, Writeable { private final ImmutableOpenMap leastAvailableSpaceUsage; diff --git a/server/src/main/java/org/opensearch/cluster/ClusterInfoService.java b/server/src/main/java/org/opensearch/cluster/ClusterInfoService.java index 03ef68fbd1c4d..50675d11003bb 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterInfoService.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterInfoService.java @@ -36,6 +36,8 @@ /** * Interface for a class used to gather information about a cluster periodically. + * + * @opensearch.internal */ @FunctionalInterface public interface ClusterInfoService { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterModule.java b/server/src/main/java/org/opensearch/cluster/ClusterModule.java index c85691b80d7c3..900dceb8564c9 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterModule.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterModule.java @@ -110,6 +110,8 @@ /** * Configures classes and services that affect the entire cluster. + * + * @opensearch.internal */ public class ClusterModule extends AbstractModule { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterName.java b/server/src/main/java/org/opensearch/cluster/ClusterName.java index 86b182c6f6c2d..77fc21b739f1a 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterName.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterName.java @@ -42,6 +42,11 @@ import java.util.Objects; import java.util.function.Predicate; +/** + * Cluster Name + * + * @opensearch.internal + */ public class ClusterName implements Writeable { public static final Setting CLUSTER_NAME_SETTING = new Setting<>("cluster.name", "opensearch", (s) -> { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterState.java b/server/src/main/java/org/opensearch/cluster/ClusterState.java index 3eaac99bad998..4010002561930 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterState.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterState.java @@ -97,6 +97,8 @@ * make sure that the correct diffs are applied. If uuids don’t match, the {@link ClusterStateDiff#apply} method * throws the {@link IncompatibleClusterStateVersionException}, which causes the publishing mechanism to send * a full version of the cluster state to the node on which this exception was thrown. + * + * @opensearch.internal */ public class ClusterState implements ToXContentFragment, Diffable { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateApplier.java b/server/src/main/java/org/opensearch/cluster/ClusterStateApplier.java index 6ba7cba0b463d..140e6426bb801 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateApplier.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateApplier.java @@ -37,6 +37,8 @@ /** * A component that is in charge of applying an incoming cluster state to the node internal data structures. * The single apply method is called before the cluster state becomes visible via {@link ClusterService#state()}. + * + * @opensearch.internal */ public interface ClusterStateApplier { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateListener.java b/server/src/main/java/org/opensearch/cluster/ClusterStateListener.java index bbd41508fd630..01a8e51a3d13e 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateListener.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateListener.java @@ -35,7 +35,7 @@ /** * A listener to be notified when a cluster state changes. * - * + * @opensearch.internal */ public interface ClusterStateListener { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java b/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java index 4f3372b4e9069..5e99ebe229c6a 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java @@ -50,6 +50,8 @@ * A utility class which simplifies interacting with the cluster state in cases where * one tries to take action based on the current state but may want to wait for a new state * and retry upon failure. + * + * @opensearch.internal */ public class ClusterStateObserver { diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java index ec038df7a9096..8d775b92a0431 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java @@ -37,6 +37,8 @@ /** * Cluster state update task configuration for timeout and priority + * + * @opensearch.internal */ public interface ClusterStateTaskConfig { /** diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java index 48d3dd7d03cb5..8d40f447abe98 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java @@ -37,6 +37,11 @@ import java.util.List; import java.util.Map; +/** + * Interface that updates the cluster state based on the task + * + * @opensearch.internal + */ public interface ClusterStateTaskExecutor { /** * Update the cluster state based on the current state and the given tasks. Return the *same instance* if no state diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskListener.java b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskListener.java index d5b9eebbc3b5d..91137a7efae92 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskListener.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskListener.java @@ -35,6 +35,11 @@ import java.util.List; +/** + * Interface to implement a cluster state change listener + * + * @opensearch.internal + */ public interface ClusterStateTaskListener { /** diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateUpdateTask.java b/server/src/main/java/org/opensearch/cluster/ClusterStateUpdateTask.java index 9393663b309fc..f9de49a1f7e58 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateUpdateTask.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateUpdateTask.java @@ -40,6 +40,8 @@ /** * A task that can update the cluster state. + * + * @opensearch.internal */ public abstract class ClusterStateUpdateTask implements diff --git a/server/src/main/java/org/opensearch/cluster/Diff.java b/server/src/main/java/org/opensearch/cluster/Diff.java index 165fb750f3f53..9af6afed0d13b 100644 --- a/server/src/main/java/org/opensearch/cluster/Diff.java +++ b/server/src/main/java/org/opensearch/cluster/Diff.java @@ -36,6 +36,8 @@ /** * Represents difference between states of cluster state parts + * + * @opensearch.internal */ public interface Diff extends Writeable { diff --git a/server/src/main/java/org/opensearch/cluster/Diffable.java b/server/src/main/java/org/opensearch/cluster/Diffable.java index 3dcac5459d27d..23c30527befa9 100644 --- a/server/src/main/java/org/opensearch/cluster/Diffable.java +++ b/server/src/main/java/org/opensearch/cluster/Diffable.java @@ -36,6 +36,8 @@ /** * Cluster state part, changes in which can be serialized + * + * @opensearch.internal */ public interface Diffable extends Writeable { diff --git a/server/src/main/java/org/opensearch/cluster/DiffableUtils.java b/server/src/main/java/org/opensearch/cluster/DiffableUtils.java index 76da490eca1f3..88a240938c468 100644 --- a/server/src/main/java/org/opensearch/cluster/DiffableUtils.java +++ b/server/src/main/java/org/opensearch/cluster/DiffableUtils.java @@ -53,6 +53,11 @@ import java.util.Map; import java.util.Set; +/** + * Utility class for a diffable + * + * @opensearch.internal + */ public final class DiffableUtils { private DiffableUtils() {} diff --git a/server/src/main/java/org/opensearch/cluster/DiskUsage.java b/server/src/main/java/org/opensearch/cluster/DiskUsage.java index e7f04ffb749b9..69bca6ae5b2c5 100644 --- a/server/src/main/java/org/opensearch/cluster/DiskUsage.java +++ b/server/src/main/java/org/opensearch/cluster/DiskUsage.java @@ -45,6 +45,8 @@ /** * Encapsulation class used to represent the amount of disk used on a node. + * + * @opensearch.internal */ public class DiskUsage implements ToXContentFragment, Writeable { final String nodeId; diff --git a/server/src/main/java/org/opensearch/cluster/EmptyClusterInfoService.java b/server/src/main/java/org/opensearch/cluster/EmptyClusterInfoService.java index cf2ce4c3f9ae0..27d1c706eb012 100644 --- a/server/src/main/java/org/opensearch/cluster/EmptyClusterInfoService.java +++ b/server/src/main/java/org/opensearch/cluster/EmptyClusterInfoService.java @@ -36,6 +36,8 @@ /** * {@link ClusterInfoService} that provides empty maps for disk usage and shard sizes + * + * @opensearch.internal */ public class EmptyClusterInfoService implements ClusterInfoService { public static final EmptyClusterInfoService INSTANCE = new EmptyClusterInfoService(); diff --git a/server/src/main/java/org/opensearch/cluster/IncompatibleClusterStateVersionException.java b/server/src/main/java/org/opensearch/cluster/IncompatibleClusterStateVersionException.java index 5ce71c651ae61..8dd988b0fba5d 100644 --- a/server/src/main/java/org/opensearch/cluster/IncompatibleClusterStateVersionException.java +++ b/server/src/main/java/org/opensearch/cluster/IncompatibleClusterStateVersionException.java @@ -39,6 +39,8 @@ /** * Thrown by {@link Diff#apply} method + * + * @opensearch.internal */ public class IncompatibleClusterStateVersionException extends OpenSearchException { public IncompatibleClusterStateVersionException(String msg) { diff --git a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java index 5b1c026e5259b..ac70e42149086 100644 --- a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java +++ b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java @@ -83,6 +83,8 @@ * * Every time the timer runs, gathers information about the disk usage and * shard sizes across the cluster. + * + * @opensearch.internal */ public class InternalClusterInfoService implements ClusterInfoService, ClusterStateListener { diff --git a/server/src/main/java/org/opensearch/cluster/LocalClusterUpdateTask.java b/server/src/main/java/org/opensearch/cluster/LocalClusterUpdateTask.java index ffcd63b3b57c1..dfa02b60ee9dc 100644 --- a/server/src/main/java/org/opensearch/cluster/LocalClusterUpdateTask.java +++ b/server/src/main/java/org/opensearch/cluster/LocalClusterUpdateTask.java @@ -39,6 +39,8 @@ /** * Used to apply state updates on nodes that are not necessarily cluster-manager + * + * @opensearch.internal */ public abstract class LocalClusterUpdateTask implements diff --git a/server/src/main/java/org/opensearch/cluster/LocalNodeMasterListener.java b/server/src/main/java/org/opensearch/cluster/LocalNodeMasterListener.java index d4456b379237c..612141807ab14 100644 --- a/server/src/main/java/org/opensearch/cluster/LocalNodeMasterListener.java +++ b/server/src/main/java/org/opensearch/cluster/LocalNodeMasterListener.java @@ -34,6 +34,8 @@ /** * Enables listening to cluster-manager changes events of the local node (when the local node becomes the cluster-manager, and when the local * node cease being a cluster-manager). + * + * @opensearch.internal */ public interface LocalNodeMasterListener extends ClusterStateListener { diff --git a/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java b/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java index 8eeaedd83cb26..7ff5161c443a1 100644 --- a/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java +++ b/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java @@ -36,6 +36,11 @@ import java.util.function.Predicate; +/** + * Utility class to build a predicate that accepts cluster state changes + * + * @opensearch.internal + */ public final class MasterNodeChangePredicate { private MasterNodeChangePredicate() { diff --git a/server/src/main/java/org/opensearch/cluster/MergableCustomMetadata.java b/server/src/main/java/org/opensearch/cluster/MergableCustomMetadata.java index 521fbe52848f8..b9898e79e3e6f 100644 --- a/server/src/main/java/org/opensearch/cluster/MergableCustomMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/MergableCustomMetadata.java @@ -40,6 +40,8 @@ * Custom metadata can be merged using {@link #merge(Metadata.Custom)}. * * @param type of custom meta data + * + * @opensearch.internal */ public interface MergableCustomMetadata { diff --git a/server/src/main/java/org/opensearch/cluster/NamedDiff.java b/server/src/main/java/org/opensearch/cluster/NamedDiff.java index 7ab73b965188c..2b8dfa14f9ea6 100644 --- a/server/src/main/java/org/opensearch/cluster/NamedDiff.java +++ b/server/src/main/java/org/opensearch/cluster/NamedDiff.java @@ -37,6 +37,8 @@ /** * Diff that also support NamedWriteable interface + * + * @opensearch.internal */ public interface NamedDiff> extends Diff, NamedWriteable { /** diff --git a/server/src/main/java/org/opensearch/cluster/NamedDiffable.java b/server/src/main/java/org/opensearch/cluster/NamedDiffable.java index 7073053d1d840..b47e180cf583e 100644 --- a/server/src/main/java/org/opensearch/cluster/NamedDiffable.java +++ b/server/src/main/java/org/opensearch/cluster/NamedDiffable.java @@ -36,5 +36,7 @@ /** * Diff that also support {@link VersionedNamedWriteable} interface + * + * @opensearch.internal */ public interface NamedDiffable extends Diffable, VersionedNamedWriteable {} diff --git a/server/src/main/java/org/opensearch/cluster/NamedDiffableValueSerializer.java b/server/src/main/java/org/opensearch/cluster/NamedDiffableValueSerializer.java index d7bd39de42884..ecf42e413459c 100644 --- a/server/src/main/java/org/opensearch/cluster/NamedDiffableValueSerializer.java +++ b/server/src/main/java/org/opensearch/cluster/NamedDiffableValueSerializer.java @@ -39,6 +39,8 @@ /** * Value Serializer for named diffables + * + * @opensearch.internal */ public class NamedDiffableValueSerializer> extends DiffableUtils.DiffableValueSerializer { diff --git a/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java b/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java index 696df6278dbb6..c642d3652c47a 100644 --- a/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java +++ b/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java @@ -80,6 +80,8 @@ *

    * This component does not block on disconnections at all, because a disconnection might need to wait for an ongoing (background) connection * attempt to complete first. + * + * @opensearch.internal */ public class NodeConnectionsService extends AbstractLifecycleComponent { private static final Logger logger = LogManager.getLogger(NodeConnectionsService.class); diff --git a/server/src/main/java/org/opensearch/cluster/NotMasterException.java b/server/src/main/java/org/opensearch/cluster/NotMasterException.java index c8ec32ed77eb9..a855f3b665ac3 100644 --- a/server/src/main/java/org/opensearch/cluster/NotMasterException.java +++ b/server/src/main/java/org/opensearch/cluster/NotMasterException.java @@ -40,6 +40,8 @@ * Thrown when a node join request or a cluster-manager ping reaches a node which is not * currently acting as a cluster-manager or when a cluster state update task is to be executed * on a node that is no longer cluster-manager. + * + * @opensearch.internal */ public class NotMasterException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java b/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java index bae464606c0f2..0f69acf12272a 100644 --- a/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java @@ -45,6 +45,11 @@ import java.util.Collections; import java.util.List; +/** + * Information passed during repository cleanup + * + * @opensearch.internal + */ public final class RepositoryCleanupInProgress extends AbstractNamedDiffable implements ClusterState.Custom { public static final RepositoryCleanupInProgress EMPTY = new RepositoryCleanupInProgress(Collections.emptyList()); diff --git a/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java b/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java index 205084261f2a9..45d9c8b373298 100644 --- a/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java @@ -54,6 +54,8 @@ /** * Meta data about restore processes that are currently executing + * + * @opensearch.internal */ public class RestoreInProgress extends AbstractNamedDiffable implements Custom, Iterable { diff --git a/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java b/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java index 67ba285f45130..bf2ab3f269357 100644 --- a/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java @@ -57,6 +57,8 @@ /** * A class that represents the snapshot deletions that are in progress in the cluster. + * + * @opensearch.internal */ public class SnapshotDeletionsInProgress extends AbstractNamedDiffable implements Custom { diff --git a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java index d0d5aea9d036b..033c0bafc971d 100644 --- a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java @@ -71,6 +71,8 @@ /** * Meta data about snapshots that are currently executing + * + * @opensearch.internal */ public class SnapshotsInProgress extends AbstractNamedDiffable implements Custom { diff --git a/server/src/main/java/org/opensearch/cluster/TimeoutClusterStateListener.java b/server/src/main/java/org/opensearch/cluster/TimeoutClusterStateListener.java index d7465fa00a50c..eb31fa2b7e69d 100644 --- a/server/src/main/java/org/opensearch/cluster/TimeoutClusterStateListener.java +++ b/server/src/main/java/org/opensearch/cluster/TimeoutClusterStateListener.java @@ -37,7 +37,7 @@ /** * An exception to cluster state listener that allows for timeouts and for post added notifications. * - * + * @opensearch.internal */ public interface TimeoutClusterStateListener extends ClusterStateListener { diff --git a/server/src/main/java/org/opensearch/cluster/ack/AckedRequest.java b/server/src/main/java/org/opensearch/cluster/ack/AckedRequest.java index 97d628e3231c9..a3f74cb45a880 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/AckedRequest.java +++ b/server/src/main/java/org/opensearch/cluster/ack/AckedRequest.java @@ -36,6 +36,8 @@ /** * Identifies a cluster state update request with acknowledgement support + * + * @opensearch.internal */ public interface AckedRequest { diff --git a/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateRequest.java index 0931086ab3ff0..dd5769d7c7f89 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateRequest.java @@ -37,6 +37,8 @@ /** * Base class to be used when needing to update the cluster state * Contains the basic fields that are always needed + * + * @opensearch.internal */ public abstract class ClusterStateUpdateRequest> implements AckedRequest { diff --git a/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateResponse.java b/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateResponse.java index 3a79e15380165..db26496c6f263 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateResponse.java +++ b/server/src/main/java/org/opensearch/cluster/ack/ClusterStateUpdateResponse.java @@ -34,6 +34,8 @@ /** * Base response returned after a cluster state update + * + * @opensearch.internal */ public class ClusterStateUpdateResponse { diff --git a/server/src/main/java/org/opensearch/cluster/ack/CreateIndexClusterStateUpdateResponse.java b/server/src/main/java/org/opensearch/cluster/ack/CreateIndexClusterStateUpdateResponse.java index 9c9beb1cd986e..52b04b9961ff8 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/CreateIndexClusterStateUpdateResponse.java +++ b/server/src/main/java/org/opensearch/cluster/ack/CreateIndexClusterStateUpdateResponse.java @@ -34,6 +34,8 @@ /** * A cluster state update response with specific fields for index creation. + * + * @opensearch.internal */ public class CreateIndexClusterStateUpdateResponse extends ClusterStateUpdateResponse { diff --git a/server/src/main/java/org/opensearch/cluster/ack/IndicesClusterStateUpdateRequest.java b/server/src/main/java/org/opensearch/cluster/ack/IndicesClusterStateUpdateRequest.java index 7410378760a3a..c235b132d8f71 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/IndicesClusterStateUpdateRequest.java +++ b/server/src/main/java/org/opensearch/cluster/ack/IndicesClusterStateUpdateRequest.java @@ -35,6 +35,8 @@ /** * Base cluster state update request that allows to execute update against multiple indices + * + * @opensearch.internal */ public abstract class IndicesClusterStateUpdateRequest> extends ClusterStateUpdateRequest { diff --git a/server/src/main/java/org/opensearch/cluster/ack/OpenIndexClusterStateUpdateResponse.java b/server/src/main/java/org/opensearch/cluster/ack/OpenIndexClusterStateUpdateResponse.java index 70915ea162a8a..faf9e3e9bebbc 100644 --- a/server/src/main/java/org/opensearch/cluster/ack/OpenIndexClusterStateUpdateResponse.java +++ b/server/src/main/java/org/opensearch/cluster/ack/OpenIndexClusterStateUpdateResponse.java @@ -33,6 +33,8 @@ /** * A cluster state update response with specific fields for index opening. + * + * @opensearch.internal */ public class OpenIndexClusterStateUpdateResponse extends ClusterStateUpdateResponse { diff --git a/server/src/main/java/org/opensearch/cluster/ack/package-info.java b/server/src/main/java/org/opensearch/cluster/ack/package-info.java new file mode 100644 index 0000000000000..e8206eeb37b26 --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/ack/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Acknowledgment transport handlers. */ +package org.opensearch.cluster.ack; diff --git a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java index cf1f2d3141ccd..eddf873d56ac7 100644 --- a/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/index/MappingUpdatedAction.java @@ -58,6 +58,8 @@ /** * Called by shards in the cluster when their mapping was dynamically updated and it needs to be updated * in the cluster state meta data (and broadcast to all members). + * + * @opensearch.internal */ public class MappingUpdatedAction { diff --git a/server/src/main/java/org/opensearch/cluster/action/index/NodeMappingRefreshAction.java b/server/src/main/java/org/opensearch/cluster/action/index/NodeMappingRefreshAction.java index b40665a1bcf1b..9cce2ff042dcd 100644 --- a/server/src/main/java/org/opensearch/cluster/action/index/NodeMappingRefreshAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/index/NodeMappingRefreshAction.java @@ -53,6 +53,11 @@ import java.io.IOException; +/** + * Transport action for refreshing the Node Mapping + * + * @opensearch.internal + */ public class NodeMappingRefreshAction { private static final Logger logger = LogManager.getLogger(NodeMappingRefreshAction.class); diff --git a/server/src/main/java/org/opensearch/cluster/action/index/package-info.java b/server/src/main/java/org/opensearch/cluster/action/index/package-info.java new file mode 100644 index 0000000000000..3594d858b2970 --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/action/index/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Index Action transport handlers. */ +package org.opensearch.cluster.action.index; diff --git a/server/src/main/java/org/opensearch/cluster/action/package-info.java b/server/src/main/java/org/opensearch/cluster/action/package-info.java new file mode 100644 index 0000000000000..acd8cf0f63592 --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/action/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Action transport handlers. */ +package org.opensearch.cluster.action; diff --git a/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java b/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java index fd6a5367146a4..47ad61913a947 100644 --- a/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java @@ -87,6 +87,11 @@ import java.util.function.Predicate; import java.util.function.Supplier; +/** + * Transport action for retrieving the shard state + * + * @opensearch.internal + */ public class ShardStateAction { private static final Logger logger = LogManager.getLogger(ShardStateAction.class); diff --git a/server/src/main/java/org/opensearch/cluster/action/shard/package-info.java b/server/src/main/java/org/opensearch/cluster/action/shard/package-info.java new file mode 100644 index 0000000000000..5666176386d46 --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/action/shard/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Shard State transport handlers. */ +package org.opensearch.cluster.action.shard; diff --git a/server/src/main/java/org/opensearch/cluster/block/ClusterBlock.java b/server/src/main/java/org/opensearch/cluster/block/ClusterBlock.java index 9da2bdeaabd8e..1314596f925d6 100644 --- a/server/src/main/java/org/opensearch/cluster/block/ClusterBlock.java +++ b/server/src/main/java/org/opensearch/cluster/block/ClusterBlock.java @@ -45,6 +45,11 @@ import java.util.Locale; import java.util.Objects; +/** + * Blocks the cluster for concurrency + * + * @opensearch.internal + */ public class ClusterBlock implements Writeable, ToXContentFragment { private final int id; diff --git a/server/src/main/java/org/opensearch/cluster/block/ClusterBlockException.java b/server/src/main/java/org/opensearch/cluster/block/ClusterBlockException.java index 8a6401b985b90..c507b76168e82 100644 --- a/server/src/main/java/org/opensearch/cluster/block/ClusterBlockException.java +++ b/server/src/main/java/org/opensearch/cluster/block/ClusterBlockException.java @@ -46,6 +46,11 @@ import static java.util.Collections.unmodifiableSet; +/** + * Internal exception on obtaining a cluster block + * + * @opensearch.internal + */ public class ClusterBlockException extends OpenSearchException { private final Set blocks; diff --git a/server/src/main/java/org/opensearch/cluster/block/ClusterBlockLevel.java b/server/src/main/java/org/opensearch/cluster/block/ClusterBlockLevel.java index fa8f7f19b752a..06181f809be22 100644 --- a/server/src/main/java/org/opensearch/cluster/block/ClusterBlockLevel.java +++ b/server/src/main/java/org/opensearch/cluster/block/ClusterBlockLevel.java @@ -34,6 +34,11 @@ import java.util.EnumSet; +/** + * What level to block the cluster + * + * @opensearch.internal + */ public enum ClusterBlockLevel { READ, WRITE, diff --git a/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java b/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java index a9bde418e962c..b889688bdd390 100644 --- a/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java +++ b/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java @@ -59,6 +59,8 @@ /** * Represents current cluster level blocks to block dirty operations done against the cluster. + * + * @opensearch.internal */ public class ClusterBlocks extends AbstractDiffable { public static final ClusterBlocks EMPTY_CLUSTER_BLOCK = new ClusterBlocks(emptySet(), ImmutableOpenMap.of()); diff --git a/server/src/main/java/org/opensearch/cluster/block/package-info.java b/server/src/main/java/org/opensearch/cluster/block/package-info.java new file mode 100644 index 0000000000000..a51b4623d34af --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/block/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Block level classes. */ +package org.opensearch.cluster.block; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ApplyCommitRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/ApplyCommitRequest.java index 2ace3e86b31de..3536a11f9e2e0 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ApplyCommitRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ApplyCommitRequest.java @@ -41,6 +41,8 @@ * A cluster-manager node sends this request to its peers to inform them that it could commit the * cluster state with the given term and version. Peers that have accepted the given cluster * state will then consider it as committed and proceed to apply the state locally. + * + * @opensearch.internal */ public class ApplyCommitRequest extends TermVersionRequest { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java index 979b36110b6a3..cdf673c00fe56 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java @@ -69,6 +69,11 @@ import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.LEGACY_DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING; +/** + * Service for bootstrapping the OpenSearch cluster + * + * @opensearch.internal + */ public class ClusterBootstrapService { public static final Setting> INITIAL_MASTER_NODES_SETTING = Setting.listSetting( diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java index 0f419aa7a0937..ee175b5f6fd24 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java @@ -59,6 +59,11 @@ import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_CLUSTER_MANAGER_NODES_SETTING; import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; +/** + * Helper for cluster failure events + * + * @opensearch.internal + */ public class ClusterFormationFailureHelper { private static final Logger logger = LogManager.getLogger(ClusterFormationFailureHelper.class); @@ -218,7 +223,7 @@ String getDescription() { assert clusterState.getLastCommittedConfiguration().isEmpty() == false; - if (clusterState.getLastCommittedConfiguration().equals(VotingConfiguration.MUST_JOIN_ELECTED_MASTER)) { + if (clusterState.getLastCommittedConfiguration().equals(VotingConfiguration.MUST_JOIN_ELECTED_CLUSTER_MANAGER)) { return String.format( Locale.ROOT, "cluster-manager not discovered yet and this node was detached from its previous cluster, have discovered %s; %s", diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java index ef35c6f8b3249..6e932afb34ab1 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java @@ -37,6 +37,11 @@ import org.opensearch.common.Nullable; import org.opensearch.common.unit.TimeValue; +/** + * Publishes the cluster state + * + * @opensearch.internal + */ public interface ClusterStatePublisher { /** * Publish all the changes to the cluster from the cluster-manager (can be called just by the cluster-manager). The publish diff --git a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java index c7671cb9e9b2b..3f24f59179641 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java @@ -52,6 +52,11 @@ import java.util.Set; import java.util.stream.Collectors; +/** + * Metadata for cluster coordination + * + * @opensearch.internal + */ public class CoordinationMetadata implements Writeable, ToXContentFragment { public static final CoordinationMetadata EMPTY_METADATA = builder().build(); @@ -350,8 +355,8 @@ public String toString() { public static class VotingConfiguration implements Writeable, ToXContentFragment { public static final VotingConfiguration EMPTY_CONFIG = new VotingConfiguration(Collections.emptySet()); - public static final VotingConfiguration MUST_JOIN_ELECTED_MASTER = new VotingConfiguration( - Collections.singleton("_must_join_elected_master_") + public static final VotingConfiguration MUST_JOIN_ELECTED_CLUSTER_MANAGER = new VotingConfiguration( + Collections.singleton("_must_join_elected_cluster_manager_") ); private final Set nodeIds; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java index 9713c841caaf7..eff55e6d88193 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java @@ -53,6 +53,8 @@ /** * The core class of the cluster state coordination algorithm, directly implementing the * formal model + * + * @opensearch.internal */ public class CoordinationState { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationStateRejectedException.java b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationStateRejectedException.java index 078424a079f02..ece8f3e6d7345 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationStateRejectedException.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationStateRejectedException.java @@ -43,6 +43,8 @@ * Occurrences of this exception don't always signal failures, but can often be just caused by the * asynchronous, distributed nature of the system. They will, for example, naturally happen during * leader election, if multiple nodes are trying to become leader at the same time. + * + * @opensearch.internal */ public class CoordinationStateRejectedException extends OpenSearchException { public CoordinationStateRejectedException(String msg, Object... args) { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java index ef578300cdbe2..52052b3c1adde 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java @@ -110,6 +110,11 @@ import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; +/** + * The main lifecycle resource coordinator + * + * @opensearch.internal + */ public class Coordinator extends AbstractLifecycleComponent implements Discovery { public static final long ZEN1_BWC_TERM = 0; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java index efa5a5ee600ab..d17ef31f1b818 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java @@ -41,6 +41,11 @@ import java.io.IOException; import java.nio.file.Path; +/** + * Command to detach a node from the cluster + * + * @opensearch.internal + */ public class DetachClusterCommand extends OpenSearchNodeCommand { static final String NODE_DETACHED_MSG = "Node was successfully detached from the cluster"; @@ -86,8 +91,8 @@ protected void processNodePaths(Terminal terminal, Path[] dataPaths, int nodeLoc // package-private for tests static Metadata updateMetadata(Metadata oldMetadata) { final CoordinationMetadata coordinationMetadata = CoordinationMetadata.builder() - .lastAcceptedConfiguration(CoordinationMetadata.VotingConfiguration.MUST_JOIN_ELECTED_MASTER) - .lastCommittedConfiguration(CoordinationMetadata.VotingConfiguration.MUST_JOIN_ELECTED_MASTER) + .lastAcceptedConfiguration(CoordinationMetadata.VotingConfiguration.MUST_JOIN_ELECTED_CLUSTER_MANAGER) + .lastCommittedConfiguration(CoordinationMetadata.VotingConfiguration.MUST_JOIN_ELECTED_CLUSTER_MANAGER) .term(0) .build(); return Metadata.builder(oldMetadata).coordinationMetadata(coordinationMetadata).clusterUUIDCommitted(false).build(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java b/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java index f0ec9681d76cc..dfaed3a598acc 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java @@ -56,6 +56,8 @@ * randomly at reasonably high frequency and backing off (linearly) until one of them succeeds. We also place an upper bound on the backoff * so that if elections are failing due to a network partition that lasts for a long time then when the partition heals there is an election * attempt reasonably quickly. + * + * @opensearch.internal */ public class ElectionSchedulerFactory { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ElectionStrategy.java b/server/src/main/java/org/opensearch/cluster/coordination/ElectionStrategy.java index f3f7fd0c1b072..c6ea4649faaf0 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ElectionStrategy.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ElectionStrategy.java @@ -38,6 +38,8 @@ /** * Allows plugging in a custom election strategy, restricting the notion of an election quorum. * Custom additional quorum restrictions can be defined by implementing the {@link #satisfiesAdditionalQuorumConstraints} method. + * + * @opensearch.internal */ public abstract class ElectionStrategy { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/FailedToCommitClusterStateException.java b/server/src/main/java/org/opensearch/cluster/coordination/FailedToCommitClusterStateException.java index 59cd94aecdd57..db431a1a018c8 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/FailedToCommitClusterStateException.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/FailedToCommitClusterStateException.java @@ -38,6 +38,8 @@ /** * Thrown when failing to publish a cluster state. See {@link ClusterStatePublisher} for more details. + * + * @opensearch.internal */ public class FailedToCommitClusterStateException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java b/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java index c5fcee712b683..24eac6ac06a8c 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java @@ -76,6 +76,8 @@ * follower has failed the leader will remove it from the cluster. We are fairly lenient, possibly allowing multiple checks to fail before * considering a follower to be faulty, to allow for a brief network partition or a long GC cycle to occur without triggering the removal of * a node and the consequent shard reallocation. + * + * @opensearch.internal */ public class FollowersChecker { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/InMemoryPersistedState.java b/server/src/main/java/org/opensearch/cluster/coordination/InMemoryPersistedState.java index d9c10f7fe0af9..67ef82ee7b2e9 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/InMemoryPersistedState.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/InMemoryPersistedState.java @@ -33,6 +33,11 @@ import org.opensearch.cluster.ClusterState; +/** + * Persist state in memory + * + * @opensearch.internal + */ public class InMemoryPersistedState implements CoordinationState.PersistedState { private long currentTerm; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Join.java b/server/src/main/java/org/opensearch/cluster/coordination/Join.java index 50225c70620c5..d039ccc8a1127 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Join.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Join.java @@ -46,6 +46,8 @@ * information about the current state of the node that provided the vote, so that * the receiver of the vote can determine if it has a more up-to-date state than the * source node. + * + * @opensearch.internal */ public class Join implements Writeable { private final DiscoveryNode sourceNode; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java index 693a997d318cd..54894c4e28196 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java @@ -84,6 +84,11 @@ import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; +/** + * Helper utility class for joining the cluster + * + * @opensearch.internal + */ public class JoinHelper { private static final Logger logger = LogManager.getLogger(JoinHelper.class); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinRequest.java index 84adf834d85e8..d5a5228f485f3 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinRequest.java @@ -41,6 +41,11 @@ import java.util.Objects; import java.util.Optional; +/** + * Request for a node to join the cluster + * + * @opensearch.internal + */ public class JoinRequest extends TransportRequest { /** diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java index f0edeeb9319c5..aaaa73e891073 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java @@ -62,6 +62,11 @@ import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; +/** + * Main executor for Nodes joining the OpenSearch cluster + * + * @opensearch.internal + */ public class JoinTaskExecutor implements ClusterStateTaskExecutor { private final AllocationService allocationService; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/LagDetector.java b/server/src/main/java/org/opensearch/cluster/coordination/LagDetector.java index 70a1c4f3ec220..3aef8d11bcca5 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/LagDetector.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/LagDetector.java @@ -56,6 +56,8 @@ * A publication can succeed and complete before all nodes have applied the published state and acknowledged it; however we need every node * eventually either to apply the published state (or a later state) or be removed from the cluster. This component achieves this by * removing any lagging nodes from the cluster after a timeout. + * + * @opensearch.internal */ public class LagDetector { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java b/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java index fcf54aff7f478..7cb306bfd89f6 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java @@ -75,6 +75,8 @@ * fairly lenient, possibly allowing multiple checks to fail before considering the leader to be faulty, to allow for the leader to * temporarily stand down on occasion, e.g. if it needs to move to a higher term. On deciding that the leader has failed a follower will * become a candidate and attempt to become a leader itself. + * + * @opensearch.internal */ public class LeaderChecker { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/NoMasterBlockService.java b/server/src/main/java/org/opensearch/cluster/coordination/NoMasterBlockService.java index f6420bb32b5f3..533a2337bd76e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/NoMasterBlockService.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/NoMasterBlockService.java @@ -41,11 +41,16 @@ import java.util.EnumSet; +/** + * Service to block the master node + * + * @opensearch.internal + */ public class NoMasterBlockService { public static final int NO_MASTER_BLOCK_ID = 2; public static final ClusterBlock NO_MASTER_BLOCK_WRITES = new ClusterBlock( NO_MASTER_BLOCK_ID, - "no master", + "no cluster-manager", true, false, false, @@ -54,7 +59,7 @@ public class NoMasterBlockService { ); public static final ClusterBlock NO_MASTER_BLOCK_ALL = new ClusterBlock( NO_MASTER_BLOCK_ID, - "no master", + "no cluster-manager", true, true, false, @@ -63,7 +68,7 @@ public class NoMasterBlockService { ); public static final ClusterBlock NO_MASTER_BLOCK_METADATA_WRITES = new ClusterBlock( NO_MASTER_BLOCK_ID, - "no master", + "no cluster-manager", true, false, false, diff --git a/server/src/main/java/org/opensearch/cluster/coordination/NodeHealthCheckFailureException.java b/server/src/main/java/org/opensearch/cluster/coordination/NodeHealthCheckFailureException.java index 273a220d1eadb..d0919aa9e8686 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/NodeHealthCheckFailureException.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/NodeHealthCheckFailureException.java @@ -40,6 +40,8 @@ /** * This exception is thrown if the File system is reported unhealthy by @{@link org.opensearch.monitor.fs.FsHealthService} * and this nodes needs to be removed from the cluster + * + * @opensearch.internal */ public class NodeHealthCheckFailureException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java index e8ab2f8d53d3f..3625366fa4de1 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java @@ -43,6 +43,11 @@ import java.util.List; +/** + * Update cluster state when node is removed from the cluster + * + * @opensearch.internal + */ public class NodeRemovalClusterStateTaskExecutor implements ClusterStateTaskExecutor, diff --git a/server/src/main/java/org/opensearch/cluster/coordination/NodeToolCli.java b/server/src/main/java/org/opensearch/cluster/coordination/NodeToolCli.java index 72a3b3969e2e2..3db2171b4cca0 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/NodeToolCli.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/NodeToolCli.java @@ -44,6 +44,12 @@ // Even if we avoid making a static reference to Logger class, there is no nice way to avoid declaring // UNSAFE_BOOTSTRAP, which depends on ClusterService, which in turn has static Logger. // TODO execute CommandLoggingConfigurator.configureLoggingWithoutConfig() in the constructor of commands, not in beforeMain + +/** + * Command Line Interface tool for Nodes + * + * @opensearch.internal + */ public class NodeToolCli extends MultiCommand { public NodeToolCli() { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java index bc7bd3abbca86..9110f1789521e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java @@ -70,6 +70,11 @@ import java.util.Map; import java.util.Objects; +/** + * Main set of node commands + * + * @opensearch.internal + */ public abstract class OpenSearchNodeCommand extends EnvironmentAwareCommand { private static final Logger logger = LogManager.getLogger(OpenSearchNodeCommand.class); protected static final String DELIMITER = "------------------------------------------------------------------------\n"; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PeersResponse.java b/server/src/main/java/org/opensearch/cluster/coordination/PeersResponse.java index e667052ca5fdd..8e2e6fde3a485 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PeersResponse.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PeersResponse.java @@ -42,6 +42,11 @@ import java.util.Objects; import java.util.Optional; +/** + * Response from peer nodes + * + * @opensearch.internal + */ public class PeersResponse extends TransportResponse { private final Optional clusterManagerNode; private final List knownPeers; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java b/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java index 92dd926b2fa0a..d6f767d3e6235 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java @@ -42,6 +42,8 @@ /** * Class encapsulating stats about the PendingClusterStatsQueue + * + * @opensearch.internal */ public class PendingClusterStateStats implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java index 1b934b5f000cd..c635dee173792 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java @@ -58,6 +58,11 @@ import static org.opensearch.common.util.concurrent.ConcurrentCollections.newConcurrentMap; import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; +/** + * Collects information prior to a promotion vote + * + * @opensearch.internal + */ public class PreVoteCollector { private static final Logger logger = LogManager.getLogger(PreVoteCollector.class); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteRequest.java index e99b2716a263f..c133a51239335 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteRequest.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Requests pre vote information collection + * + * @opensearch.internal + */ public class PreVoteRequest extends TransportRequest { private final DiscoveryNode sourceNode; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteResponse.java b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteResponse.java index 09259867ebf53..f18726c8af229 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteResponse.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteResponse.java @@ -39,6 +39,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Response for a PreVoteRequest + * + * @opensearch.internal + */ public class PreVoteResponse extends TransportResponse { private final long currentTerm; private final long lastAcceptedTerm; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Publication.java b/server/src/main/java/org/opensearch/cluster/coordination/Publication.java index 5529c3248345c..3580de423ac95 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Publication.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Publication.java @@ -52,6 +52,11 @@ import java.util.function.LongSupplier; import java.util.stream.Collectors; +/** + * Publication task + * + * @opensearch.internal + */ public abstract class Publication { protected final Logger logger = LogManager.getLogger(getClass()); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java b/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java index 9a1a392348660..7591a09b07740 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java @@ -72,6 +72,11 @@ import java.util.function.Consumer; import java.util.function.Function; +/** + * Transport handler for publication + * + * @opensearch.internal + */ public class PublicationTransportHandler { private static final Logger logger = LogManager.getLogger(PublicationTransportHandler.class); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublishClusterStateStats.java b/server/src/main/java/org/opensearch/cluster/coordination/PublishClusterStateStats.java index b4adad898271e..1adb43ca68ce4 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublishClusterStateStats.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublishClusterStateStats.java @@ -42,6 +42,8 @@ /** * Class encapsulating stats about the PublishClusterStateAction + * + * @opensearch.internal */ public class PublishClusterStateStats implements Writeable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublishRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/PublishRequest.java index 86ae9ce8bc081..e7c3e2d2c965b 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublishRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublishRequest.java @@ -38,6 +38,8 @@ /** * Request which is used by the cluster-manager node to publish cluster state changes. * Actual serialization of this request is done by {@link PublicationTransportHandler} + * + * @opensearch.internal */ public class PublishRequest { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublishResponse.java b/server/src/main/java/org/opensearch/cluster/coordination/PublishResponse.java index 9d219331c0d0e..5d809617019ac 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublishResponse.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublishResponse.java @@ -40,6 +40,8 @@ /** * Response to a {@link PublishRequest}, carrying the term and version of the request. * Typically wrapped in a {@link PublishWithJoinResponse}. + * + * @opensearch.internal */ public class PublishResponse implements Writeable { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublishWithJoinResponse.java b/server/src/main/java/org/opensearch/cluster/coordination/PublishWithJoinResponse.java index 430e539fd3255..f02f917e67800 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublishWithJoinResponse.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublishWithJoinResponse.java @@ -41,6 +41,8 @@ /** * Response to a {@link PublishRequest}. Encapsulates both a {@link PublishResponse} * and an optional {@link Join}. + * + * @opensearch.internal */ public class PublishWithJoinResponse extends TransportResponse { private final PublishResponse publishResponse; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java index 1c26dff45775f..931f8ff228d9c 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java @@ -47,6 +47,8 @@ /** * Computes the optimal configuration of voting nodes in the cluster. + * + * @opensearch.internal */ public class Reconfigurator { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/RemoveCustomsCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/RemoveCustomsCommand.java index 83f3298862776..5e7614d86cecd 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/RemoveCustomsCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/RemoveCustomsCommand.java @@ -48,6 +48,11 @@ import java.nio.file.Path; import java.util.List; +/** + * Removes custom metadata + * + * @opensearch.internal + */ public class RemoveCustomsCommand extends OpenSearchNodeCommand { static final String CUSTOMS_REMOVED_MSG = "Customs were successfully removed from the cluster state"; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/RemoveSettingsCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/RemoveSettingsCommand.java index 298dfde7858cd..da7adec6c4f11 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/RemoveSettingsCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/RemoveSettingsCommand.java @@ -48,6 +48,11 @@ import java.nio.file.Path; import java.util.List; +/** + * Removes custom settings + * + * @opensearch.internal + */ public class RemoveSettingsCommand extends OpenSearchNodeCommand { static final String SETTINGS_REMOVED_MSG = "Settings were successfully removed from the cluster state"; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/StartJoinRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/StartJoinRequest.java index efdbd37a9c0b6..09ebcd7fd074e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/StartJoinRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/StartJoinRequest.java @@ -41,6 +41,8 @@ /** * Represents the action of requesting a join vote (see {@link Join}) from a node. * The source node represents the node that is asking for join votes. + * + * @opensearch.internal */ public class StartJoinRequest extends TransportRequest { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/TermVersionRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/TermVersionRequest.java index cea8c43302a23..0b210ef21f45b 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/TermVersionRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/TermVersionRequest.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Get's the version of a term + * + * @opensearch.internal + */ abstract class TermVersionRequest extends TransportRequest implements Writeable { protected final DiscoveryNode sourceNode; protected final long term; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java index 6b31c39d71eb3..1f17844adf4fe 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java @@ -54,6 +54,11 @@ import java.util.Locale; import java.util.Objects; +/** + * Tool to run an unsafe bootstrap + * + * @opensearch.internal + */ public class UnsafeBootstrapMasterCommand extends OpenSearchNodeCommand { static final String CLUSTER_STATE_TERM_VERSION_MSG_FORMAT = "Current node cluster state (term, version) pair is (%s, %s)"; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ValidateJoinRequest.java b/server/src/main/java/org/opensearch/cluster/coordination/ValidateJoinRequest.java index afdd124bddef2..3f8c00da9a76c 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ValidateJoinRequest.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ValidateJoinRequest.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Transport request to validate node join + * + * @opensearch.internal + */ public class ValidateJoinRequest extends TransportRequest { private ClusterState state; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/package-info.java b/server/src/main/java/org/opensearch/cluster/coordination/package-info.java new file mode 100644 index 0000000000000..2f0514f25f6d6 --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/coordination/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Coordination foundation classes. */ +package org.opensearch.cluster.coordination; diff --git a/server/src/main/java/org/opensearch/cluster/health/ClusterHealthStatus.java b/server/src/main/java/org/opensearch/cluster/health/ClusterHealthStatus.java index 07a66a3731ff6..4daf0cb6adbb2 100644 --- a/server/src/main/java/org/opensearch/cluster/health/ClusterHealthStatus.java +++ b/server/src/main/java/org/opensearch/cluster/health/ClusterHealthStatus.java @@ -38,6 +38,11 @@ import java.io.IOException; +/** + * Cluster health status + * + * @opensearch.internal + */ public enum ClusterHealthStatus implements Writeable { GREEN((byte) 0), YELLOW((byte) 1), diff --git a/server/src/main/java/org/opensearch/cluster/health/ClusterIndexHealth.java b/server/src/main/java/org/opensearch/cluster/health/ClusterIndexHealth.java index ffe54e42355f8..b2234d23be91c 100644 --- a/server/src/main/java/org/opensearch/cluster/health/ClusterIndexHealth.java +++ b/server/src/main/java/org/opensearch/cluster/health/ClusterIndexHealth.java @@ -58,6 +58,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg; import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +/** + * Cluster Index Health Information + * + * @opensearch.internal + */ public final class ClusterIndexHealth implements Iterable, Writeable, ToXContentFragment { private static final String STATUS = "status"; private static final String NUMBER_OF_SHARDS = "number_of_shards"; diff --git a/server/src/main/java/org/opensearch/cluster/health/ClusterShardHealth.java b/server/src/main/java/org/opensearch/cluster/health/ClusterShardHealth.java index fc6c6eb4f9bdc..ba6035abbb42f 100644 --- a/server/src/main/java/org/opensearch/cluster/health/ClusterShardHealth.java +++ b/server/src/main/java/org/opensearch/cluster/health/ClusterShardHealth.java @@ -54,6 +54,11 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +/** + * Cluster shard health information + * + * @opensearch.internal + */ public final class ClusterShardHealth implements Writeable, ToXContentFragment { private static final String STATUS = "status"; private static final String ACTIVE_SHARDS = "active_shards"; diff --git a/server/src/main/java/org/opensearch/cluster/health/ClusterStateHealth.java b/server/src/main/java/org/opensearch/cluster/health/ClusterStateHealth.java index c6b214d31707e..4c8be0f2d73f0 100644 --- a/server/src/main/java/org/opensearch/cluster/health/ClusterStateHealth.java +++ b/server/src/main/java/org/opensearch/cluster/health/ClusterStateHealth.java @@ -49,6 +49,11 @@ import java.util.Map; import java.util.Objects; +/** + * Cluster state health information + * + * @opensearch.internal + */ public final class ClusterStateHealth implements Iterable, Writeable { private final int numberOfNodes; diff --git a/server/src/main/java/org/opensearch/cluster/health/package-info.java b/server/src/main/java/org/opensearch/cluster/health/package-info.java new file mode 100644 index 0000000000000..f022210548cfe --- /dev/null +++ b/server/src/main/java/org/opensearch/cluster/health/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** Cluster Health Foundation classes. */ +package org.opensearch.cluster.health; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java b/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java index eede77917a2fd..be69090e0c33c 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java @@ -38,6 +38,8 @@ /** * Individual operation to perform on the cluster state as part of an {@link IndicesAliasesRequest}. + * + * @opensearch.internal */ public abstract class AliasAction { private final String index; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java index e6deb22477bae..375317b32b293 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java @@ -58,6 +58,11 @@ import static java.util.Collections.emptySet; +/** + * Metadata for index aliases + * + * @opensearch.internal + */ public class AliasMetadata extends AbstractDiffable implements ToXContentFragment { private final String alias; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AliasValidator.java b/server/src/main/java/org/opensearch/cluster/metadata/AliasValidator.java index c024358c5d1d3..769342dceddc5 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AliasValidator.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AliasValidator.java @@ -55,6 +55,8 @@ /** * Validator for an alias, to be used before adding an alias to the index metadata * and make sure the alias is valid + * + * @opensearch.internal */ public class AliasValidator { /** diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AutoExpandReplicas.java b/server/src/main/java/org/opensearch/cluster/metadata/AutoExpandReplicas.java index a7538d0a5b4f8..108c05eb78b79 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AutoExpandReplicas.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AutoExpandReplicas.java @@ -52,6 +52,8 @@ * This class acts as a functional wrapper around the {@code index.auto_expand_replicas} setting. * This setting or rather it's value is expanded into a min and max value which requires special handling * based on the number of datanodes in the cluster. This class handles all the parsing and streamlines the access to these values. + * + * @opensearch.internal */ public final class AutoExpandReplicas { // the value we recognize in the "max" position to mean all the nodes diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java b/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java index 72f6f142ed290..afa0ec64b72b5 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java @@ -43,6 +43,8 @@ /** * Resolves cluster names from an expression. The expression must be the exact match of a cluster * name or must be a wildcard expression. + * + * @opensearch.internal */ public final class ClusterNameExpressionResolver { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplate.java b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplate.java index c3ba1a2f7a45b..dccd01eb7b95f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplate.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplate.java @@ -53,6 +53,8 @@ * component template is expected to be valid on its own. For example, if a component template * contains a field "foo", it's expected to contain all the necessary settings/mappings/etc for the * "foo" field. These component templates make up the individual pieces composing an index template. + * + * @opensearch.internal */ public class ComponentTemplate extends AbstractDiffable implements ToXContentObject { private static final ParseField TEMPLATE = new ParseField("template"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java index 0d2496b5812be..4850e212b832f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java @@ -54,6 +54,8 @@ /** * {@link ComponentTemplateMetadata} is a custom {@link Metadata} implementation for storing a map * of component templates and their names. + * + * @opensearch.internal */ public class ComponentTemplateMetadata implements Metadata.Custom { public static final String TYPE = "component_template"; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java index b9d71adc89c1c..5b16733e12fbb 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java @@ -64,6 +64,8 @@ * An index template is comprised of a set of index patterns, an optional template, and a list of * ids corresponding to component templates that should be composed in order when creating a new * index. + * + * @opensearch.internal */ public class ComposableIndexTemplate extends AbstractDiffable implements ToXContentObject { private static final ParseField INDEX_PATTERNS = new ParseField("index_patterns"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java index 46712a3b529b2..a0e228f5d3ea5 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java @@ -54,6 +54,8 @@ /** * The {@link ComposableIndexTemplateMetadata} class is a custom {@link Metadata.Custom} implementation that * stores a map of ids to {@link ComposableIndexTemplate} templates. + * + * @opensearch.internal */ public class ComposableIndexTemplateMetadata implements Metadata.Custom { public static final String TYPE = "index_template"; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java b/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java index eaf1b35ca2ce3..dffcb11619be4 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java @@ -51,6 +51,11 @@ import java.util.Map; import java.util.Objects; +/** + * Primary DataStream class + * + * @opensearch.internal + */ public final class DataStream extends AbstractDiffable implements ToXContentObject { public static final String BACKING_INDEX_PREFIX = ".ds-"; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java index d94b6f0c8cffc..6045f745e1584 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java @@ -53,6 +53,8 @@ /** * Custom {@link Metadata} implementation for storing a map of {@link DataStream}s and their names. + * + * @opensearch.internal */ public class DataStreamMetadata implements Metadata.Custom { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java b/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java index 2c35fbf4ae67e..542af9c54283a 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java @@ -49,6 +49,8 @@ /** * This is a {@code Map} that implements AbstractDiffable so it * can be used for cluster state purposes + * + * @opensearch.internal */ public class DiffableStringMap extends AbstractMap implements Diffable { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java index 653755664cbc0..77c585ca875aa 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java @@ -52,6 +52,8 @@ * An index abstraction is a reference to one or more concrete indices. * An index abstraction has a unique name and encapsulates all the {@link IndexMetadata} instances it is pointing to. * Also depending on type it may refer to a single or many concrete indices and may or may not have a write index. + * + * @opensearch.internal */ public interface IndexAbstraction { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstractionResolver.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstractionResolver.java index 4045ea938e373..a83c778a4b83a 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstractionResolver.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstractionResolver.java @@ -43,6 +43,11 @@ import java.util.List; import java.util.Set; +/** + * Utility class to resolve index abstractions + * + * @opensearch.internal + */ public class IndexAbstractionResolver { private final IndexNameExpressionResolver indexNameExpressionResolver; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java index c0b207158c9bc..de9d616d79b0b 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java @@ -67,6 +67,8 @@ * nodes and a node could be removed from the cluster for a period of time, the * tombstones remain in the cluster state for a fixed period of time, after which * they are purged. + * + * @opensearch.internal */ public final class IndexGraveyard implements Metadata.Custom { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java index 9139cbac2b0be..0b3b2116f6cee 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java @@ -96,6 +96,11 @@ import static org.opensearch.common.settings.Settings.readSettingsFromStream; import static org.opensearch.common.settings.Settings.writeSettingsToStream; +/** + * Index metadata information + * + * @opensearch.internal + */ public class IndexMetadata implements Diffable, ToXContentFragment { public static final ClusterBlock INDEX_READ_ONLY_BLOCK = new ClusterBlock( diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java index bd8535d18c9cb..4a6df1bc0a53c 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java @@ -76,6 +76,11 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; +/** + * Resolves index name from an expression + * + * @opensearch.internal + */ public class IndexNameExpressionResolver { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(IndexNameExpressionResolver.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java index 810365589ae1f..367a15560200f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java @@ -62,6 +62,11 @@ import java.util.Objects; import java.util.Set; +/** + * Metadata for Index Templates + * + * @opensearch.internal + */ public class IndexTemplateMetadata extends AbstractDiffable { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(IndexTemplateMetadata.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java b/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java index 8205886cf9df6..b14e970360dce 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java @@ -55,6 +55,8 @@ * When new version of metadata is written it's assigned some generation long value. * Global metadata generation could be obtained by calling {@link #getGlobalGeneration()}. * Index metadata generation could be obtained by calling {@link #getIndexGenerations()}. + * + * @opensearch.internal */ public class Manifest implements ToXContentFragment { // TODO revisit missing and unknown constants once Zen2 BWC is ready diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MappingMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/MappingMetadata.java index 620542f8f1bde..35ee222541771 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MappingMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MappingMetadata.java @@ -56,6 +56,8 @@ /** * Mapping configuration for a type. + * + * @opensearch.internal */ public class MappingMetadata extends AbstractDiffable { public static final MappingMetadata EMPTY_MAPPINGS = new MappingMetadata(MapperService.SINGLE_MAPPING_NAME, Collections.emptyMap()); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java index 6e9c30877f9c2..bec72b696acdd 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java @@ -99,6 +99,11 @@ import static org.opensearch.common.settings.Settings.readSettingsFromStream; import static org.opensearch.common.settings.Settings.writeSettingsToStream; +/** + * Metadata information + * + * @opensearch.internal + */ public class Metadata implements Iterable, Diffable, ToXContentFragment { private static final Logger logger = LogManager.getLogger(Metadata.class); @@ -421,38 +426,6 @@ private ImmutableOpenMap> findAliases(final String[] return mapBuilder.build(); } - /** - * Checks if at least one of the specified aliases exists in the specified concrete indices. Wildcards are supported in the - * alias names for partial matches. - * - * @param aliases The names of the index aliases to find - * @param concreteIndices The concrete indexes the index aliases must point to order to be returned. - * @return whether at least one of the specified aliases exists in one of the specified concrete indices. - */ - public boolean hasAliases(final String[] aliases, String[] concreteIndices) { - assert aliases != null; - assert concreteIndices != null; - if (concreteIndices.length == 0) { - return false; - } - - Iterable intersection = HppcMaps.intersection(ObjectHashSet.from(concreteIndices), indices.keys()); - for (String index : intersection) { - IndexMetadata indexMetadata = indices.get(index); - List filteredValues = new ArrayList<>(); - for (ObjectCursor cursor : indexMetadata.getAliases().values()) { - AliasMetadata value = cursor.value; - if (Regex.simpleMatch(aliases, value.alias())) { - filteredValues.add(value); - } - } - if (!filteredValues.isEmpty()) { - return true; - } - } - return false; - } - /** * Finds all mappings for concrete indices. Only fields that match the provided field * filter will be returned (default is a predicate that always returns true, which can be diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java index 13e470eed617d..66fe3c5ce61dd 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java @@ -62,6 +62,11 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicReference; +/** + * Creates a data stream of metadata + * + * @opensearch.internal + */ public class MetadataCreateDataStreamService { private static final Logger logger = LogManager.getLogger(MetadataCreateDataStreamService.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java index 7f2be879f3637..642b0f7b8d36f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java @@ -123,6 +123,8 @@ /** * Service responsible for submitting create index requests + * + * @opensearch.internal */ public class MetadataCreateIndexService { private static final Logger logger = LogManager.getLogger(MetadataCreateIndexService.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataDeleteIndexService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataDeleteIndexService.java index 4805cb215fc09..66f5edf3da129 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataDeleteIndexService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataDeleteIndexService.java @@ -62,6 +62,8 @@ /** * Deletes indices. + * + * @opensearch.internal */ public class MetadataDeleteIndexService { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexAliasesService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexAliasesService.java index a490bae65ca00..8d6939a57240c 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexAliasesService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexAliasesService.java @@ -64,6 +64,8 @@ /** * Service responsible for submitting add and remove aliases requests + * + * @opensearch.internal */ public class MetadataIndexAliasesService { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java index 25071a60bdfb5..d8715d07a31a3 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java @@ -112,6 +112,8 @@ /** * Service responsible for submitting open/close index requests as well as for adding index blocks + * + * @opensearch.internal */ public class MetadataIndexStateService { private static final Logger logger = LogManager.getLogger(MetadataIndexStateService.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java index 896679206aec5..c14170e358f4c 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java @@ -97,6 +97,8 @@ /** * Service responsible for submitting index templates updates + * + * @opensearch.internal */ public class MetadataIndexTemplateService { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java index eda4833a36c96..85ef4c36285d2 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java @@ -64,6 +64,8 @@ * to upgrade the existing index metadata to the latest version of the cluster. It typically * occurs during cluster upgrade, when dangling indices are imported into the cluster or indices * are restored from a repository. + * + * @opensearch.internal */ public class MetadataIndexUpgradeService { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataMappingService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataMappingService.java index 3795961d39143..7f67c45fc80e5 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataMappingService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataMappingService.java @@ -69,6 +69,8 @@ /** * Service responsible for submitting mapping changes + * + * @opensearch.internal */ public class MetadataMappingService { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataUpdateSettingsService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataUpdateSettingsService.java index 1b7aee48e3232..1390860271577 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataUpdateSettingsService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataUpdateSettingsService.java @@ -74,6 +74,8 @@ /** * Service responsible for submitting update index settings requests + * + * @opensearch.internal */ public class MetadataUpdateSettingsService { private static final Logger logger = LogManager.getLogger(MetadataUpdateSettingsService.class); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ProcessClusterEventTimeoutException.java b/server/src/main/java/org/opensearch/cluster/metadata/ProcessClusterEventTimeoutException.java index 079c4c680e42d..cda032aa4628f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ProcessClusterEventTimeoutException.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ProcessClusterEventTimeoutException.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Exception thrown when there is a timeout processing cluster events + * + * @opensearch.internal + */ public class ProcessClusterEventTimeoutException extends OpenSearchException { public ProcessClusterEventTimeoutException(TimeValue timeValue, String source) { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/RepositoriesMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/RepositoriesMetadata.java index 3076ede7ced14..2dc3015376a72 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/RepositoriesMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/RepositoriesMetadata.java @@ -55,6 +55,8 @@ /** * Contains metadata about registered snapshot repositories + * + * @opensearch.internal */ public class RepositoriesMetadata extends AbstractNamedDiffable implements Custom { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/RepositoryMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/RepositoryMetadata.java index d839e4bafade7..5cfdfe075c74f 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/RepositoryMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/RepositoryMetadata.java @@ -44,6 +44,8 @@ /** * Metadata about registered repository + * + * @opensearch.internal */ public class RepositoryMetadata implements Writeable { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java b/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java index f07b74575950c..85568d69639cb 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java @@ -48,6 +48,8 @@ /** * A service responsible for updating the metadata used by system indices. + * + * @opensearch.internal */ public class SystemIndexMetadataUpgradeService implements ClusterStateListener { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Template.java b/server/src/main/java/org/opensearch/cluster/metadata/Template.java index 0a070ced198c6..0b134cad7b8b2 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Template.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Template.java @@ -58,6 +58,8 @@ * A template consists of optional settings, mappings, or alias configuration for an index, however, * it is entirely independent from an index. It's a building block forming part of a regular index * template and a {@link ComponentTemplate}. + * + * @opensearch.internal */ public class Template extends AbstractDiffable