Skip to content

Commit

Permalink
New javadoc and improvement of existing javadoc (opensearch-project#1…
Browse files Browse the repository at this point in the history
…0064)

* Fixing javadoc error
fixing javadoc error and warning
javadoc for org.opensearch.core.indices.breaker
javadoc for org.opensearch.core.index.shard.ShardId
javadoc for org.opensearch.core.index.Index
fixing a mishap in formatting rule
fixing javadoc of org.opensearch.cli.Terminal

Signed-off-by: Laurent Laborde <[email protected]>

* removing unsupported @ImplNote

Signed-off-by: Laurent Laborde <[email protected]>

* Update libs/common/src/main/java/org/opensearch/common/collect/Iterators.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update libs/compress/src/main/java/org/opensearch/compress/ZstdCompressor.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Apply suggestions from code review

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Apply suggestions from code review

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Apply suggestions from code review

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Apply suggestions from code review

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update CollectionUtils.java

Signed-off-by: Laurent Laborde <[email protected]>

* fixing javadoc warnings

Signed-off-by: Laurent Laborde <[email protected]>

* remove useless p tag

Signed-off-by: Laurent Laborde <[email protected]>

* removing a p tag

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* proper capitalization

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* improvements of existing javadocs

Signed-off-by: Laurent Laborde <[email protected]>

* javadoc improvement

Signed-off-by: Laurent Laborde <[email protected]>

* javadoc improvement

Signed-off-by: Laurent Laborde <[email protected]>

* Fix formatting error after merge conflict resolution in a javadoc

Signed-off-by: Laurent Laborde <[email protected]>

* "code" tag ignore carriage return & "p", switching to a "pre" tag

Signed-off-by: Laurent Laborde <[email protected]>

* fixing an overzealous precommit check error.

Signed-off-by: Laurent Laborde <[email protected]>

* Update distribution/tools/launchers/src/main/java/org/opensearch/tools/launchers/SystemJvmOptions.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceSortBuilderIT.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/main/java/org/opensearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/main/java/org/opensearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/main/java/org/opensearch/action/admin/indices/replication/SegmentReplicationStatsRequest.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/main/java/org/opensearch/cluster/RestoreInProgress.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update test/framework/src/main/java/org/opensearch/test/AbstractDiffableWireSerializationTestCase.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* Update test/framework/src/main/java/org/opensearch/test/AbstractDiffableSerializationTestCase.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* further improvement of javadoc after review & suggestions

Signed-off-by: Laurent Laborde <[email protected]>

* fixing unreferenced @link in javadoc (precommit error)

Signed-off-by: Laurent Laborde <[email protected]>

* removing p tag from internal comment

Signed-off-by: Laurent Laborde <[email protected]>

* reverting javadoc tag in licence header

Signed-off-by: Laurent Laborde <[email protected]>

* Update server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractPercentilesAggregationBuilder.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Laurent Laborde <[email protected]>

* conflict resolution

Signed-off-by: Laurent Laborde <[email protected]>

---------

Signed-off-by: Laurent Laborde <[email protected]>
Co-authored-by: Andriy Redko <[email protected]>
  • Loading branch information
ker2x and reta authored Oct 11, 2023
1 parent 00ccfc4 commit c0852f8
Show file tree
Hide file tree
Showing 563 changed files with 1,304 additions and 1,319 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@

/**
* A standalone process that will reap external services after a build dies.
*
* <h2>Input</h2>
* Since how to reap a given service is platform and service dependent, this tool
* operates on system commands to execute. It takes a single argument, a directory
* that will contain files with reaping commands. Each line in each file will be
* executed with {@link Runtime#exec(String)}.
*
* <p>
* The main method will wait indefinitely on the parent process (Gradle) by
* reading from stdin. When Gradle shuts down, whether normally or abruptly, the
* pipe will be broken and read will return.
*
* <p>
* The reaper will then iterate over the files in the configured directory,
* and execute the given commands. If any commands fail, a failure message is
* written to stderr. Otherwise, the input file will be deleted. If no inputs
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@

/**
* A container for opensearch supported version information used in BWC testing.
*
* <p>
* Parse the Java source file containing the versions declarations and use the known rules to figure out which are all
* the version the current one is wire and index compatible with.
* On top of this, figure out which of these are unreleased and provide the branch they can be built from.
*
* <p>
* Note that in this context, currentVersion is the unreleased version this build operates on.
* At any point in time there will surely be four such unreleased versions being worked on,
* thus currentVersion will be one of these.
*
* <p>
* Considering:
* <dl>
* <dt>M, M &gt; 0</dt>
Expand All @@ -84,7 +84,7 @@
* Each build is only concerned with versions before it, as those are the ones that need to be tested
* for backwards compatibility. We never look forward, and don't add forward facing version number to branches of previous
* version.
*
* <p>
* Each branch has a current version, and expected compatible versions are parsed from the server code's Version` class.
* We can reliably figure out which the unreleased versions are due to the convention of always adding the next unreleased
* version number to server in all branches when a version is released.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/**
* Writes data passed to this stream as log messages.
*
* <p>
* The stream will be flushed whenever a newline is detected.
* Allows setting an optional prefix before each line of output.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/**
* Represent rules for tests enforced by the @{link {@link TestingConventionsTasks}}
*
* <p>
* Rules are identified by name, tests must have this name as a suffix and implement one of the base classes
* and be part of all the specified tasks.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

/**
* A custom archive task that assembles a tar archive that preserves symbolic links.
*
* <p>
* This task is necessary because the built-in task {@link org.gradle.api.tasks.bundling.Tar} does not preserve symbolic links.
*/
public class SymbolicLinkPreservingTar extends Tar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
* <strong>Rest YAML tests :</strong> <br>
* When the {@link RestResourcesPlugin} has been applied the {@link CopyRestTestsTask} will copy the Rest YAML tests if explicitly
* configured with `includeCore` through the `restResources.restTests` extension.
*
* <p>
* Additionally you can specify which sourceSetName resources should be copied to. The default is the yamlRestTest source set.
* @see CopyRestApiTask
* @see CopyRestTestsTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

/**
* An helper to manage a vagrant box.
*
* <p>
* This is created alongside a {@link VagrantExtension} for a project to manage starting and
* stopping a single vagrant box.
*/
Expand Down Expand Up @@ -185,7 +185,7 @@ public void setArgs(String... args) {

/**
* A function to translate output from the vagrant command execution to the progress line.
*
* <p>
* The function takes the current line of output from vagrant, and returns a new
* progress line, or {@code null} if there is no update.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/**
* A shell script to run within a vagrant VM.
*
* <p>
* The script is run as root within the VM.
*/
public abstract class VagrantShellTask extends DefaultTask {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void tearDown() {
* This test is used to verify that adding the 'opensearch.pluginzip' to the project
* adds some other transitive plugins and tasks under the hood. This is basically
* a behavioral test of the {@link Publish#apply(Project)} method.
*
* <p>
* This is equivalent of having a build.gradle script with just the following section:
* <pre>
* plugins {
Expand Down Expand Up @@ -202,7 +202,7 @@ public void useDefaultValues() throws IOException, URISyntaxException, XmlPullPa
GradleRunner runner = prepareGradleRunnerFromTemplate("useDefaultValues.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
/* Check if build and ZIP_PUBLISH_TASK tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

Expand Down Expand Up @@ -277,7 +277,7 @@ public void allProjectsGroup() throws IOException, URISyntaxException, XmlPullPa
GradleRunner runner = prepareGradleRunnerFromTemplate("allProjectsGroup.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
/* Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

Expand Down Expand Up @@ -312,7 +312,7 @@ public void groupPriorityLevel() throws IOException, URISyntaxException, XmlPull
GradleRunner runner = prepareGradleRunnerFromTemplate("groupPriorityLevel.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
/* Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

Expand Down Expand Up @@ -348,7 +348,7 @@ public void missingPOMEntity() throws IOException, URISyntaxException, XmlPullPa
GradleRunner runner = prepareGradleRunnerFromTemplate("missingPOMEntity.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
/* Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

Expand Down Expand Up @@ -395,7 +395,7 @@ public void customizedGroupValue() throws IOException, URISyntaxException, XmlPu
GradleRunner runner = prepareGradleRunnerFromTemplate("customizedGroupValue.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
/* Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/**
* Filter out threads controlled by gradle that may be created during unit tests.
*
* <p>
* Currently this includes pooled threads for Exec as well as file system event watcher threads.
*/
public class GradleThreadsFilter implements ThreadFilter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/**
* Backwards compatible test* method provider (public, non-static).
*
* <p>
* copy of org.apache.lucene.util.LuceneJUnit3MethodProvider to avoid a dependency between build and test fw.
*/
public final class JUnit3MethodProvider implements TestMethodProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

/**
* Stores measurement samples.
*
* <p>
* This class is NOT threadsafe.
*/
public final class SampleRecorder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public ClusterHealthResponse health(ClusterHealthRequest healthRequest, RequestO

/**
* Asynchronously get cluster health using the Cluster Health API.
*
* If timeout occurred, {@link ClusterHealthResponse} will have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT
*
* @param healthRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @param listener the listener to be notified upon request completion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ static void addSearchRequestParams(Params params, SearchRequest searchRequest) {
params.withIndicesOptions(searchRequest.indicesOptions());
}
params.withSearchType(searchRequest.searchType().name().toLowerCase(Locale.ROOT));
/**
* Merging search responses as part of CCS flow to reduce roundtrips is not supported for point in time -
* refer to org.opensearch.action.search.SearchResponseMerger
/*
Merging search responses as part of CCS flow to reduce roundtrips is not supported for point in time -
refer to org.opensearch.action.search.SearchResponseMerger
*/
if (searchRequest.pointInTimeBuilder() != null) {
params.putParam("ccs_minimize_roundtrips", "false");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

/**
* A base request for any requests that supply timeouts.
*
* <p>
* Please note, any requests that use a ackTimeout should set timeout as they
* represent the same backing field on the server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public MediaType mappingsMediaType() {

/**
* Adds mapping that will be added when the index gets created.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*
* @param source The mapping source
Expand All @@ -168,7 +168,7 @@ public CreateIndexRequest mapping(String source, MediaType mediaType) {

/**
* Adds mapping that will be added when the index gets created.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*
* @param source The mapping source
Expand All @@ -179,7 +179,7 @@ public CreateIndexRequest mapping(XContentBuilder source) {

/**
* Adds mapping that will be added when the index gets created.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*
* @param source The mapping source
Expand All @@ -196,7 +196,7 @@ public CreateIndexRequest mapping(Map<String, ?> source) {

/**
* Adds mapping that will be added when the index gets created.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*
* @param source The mapping source
Expand Down Expand Up @@ -282,7 +282,7 @@ public CreateIndexRequest aliases(Collection<Alias> aliases) {

/**
* Sets the settings and mappings as a single source.
*
* <p>
* Note that the mapping definition should *not* be nested under a type name.
*/
public CreateIndexRequest source(String source, MediaType mediaType) {
Expand All @@ -291,7 +291,7 @@ public CreateIndexRequest source(String source, MediaType mediaType) {

/**
* Sets the settings and mappings as a single source.
*
* <p>
* Note that the mapping definition should *not* be nested under a type name.
*/
public CreateIndexRequest source(XContentBuilder source) {
Expand All @@ -300,7 +300,7 @@ public CreateIndexRequest source(XContentBuilder source) {

/**
* Sets the settings and mappings as a single source.
*
* <p>
* Note that the mapping definition should *not* be nested under a type name.
*/
public CreateIndexRequest source(BytesReference source, MediaType mediaType) {
Expand All @@ -311,7 +311,7 @@ public CreateIndexRequest source(BytesReference source, MediaType mediaType) {

/**
* Sets the settings and mappings as a single source.
*
* <p>
* Note that the mapping definition should *not* be nested under a type name.
*/
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public MediaType mediaType() {

/**
* The mapping source definition.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*/
public PutMappingRequest source(Map<String, ?> mappingSource) {
Expand All @@ -120,7 +120,7 @@ public PutMappingRequest source(Map<String, ?> mappingSource) {

/**
* The mapping source definition.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*/
public PutMappingRequest source(String mappingSource, MediaType mediaType) {
Expand All @@ -131,7 +131,7 @@ public PutMappingRequest source(String mappingSource, MediaType mediaType) {

/**
* The mapping source definition.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*/
public PutMappingRequest source(XContentBuilder builder) {
Expand All @@ -142,7 +142,7 @@ public PutMappingRequest source(XContentBuilder builder) {

/**
* The mapping source definition.
*
* <p>
* Note that the definition should *not* be nested under a type name.
*/
public PutMappingRequest source(BytesReference source, MediaType mediaType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

/**
* Client side counterpart of server side version.
*
* {@link org.opensearch.action.admin.cluster.node.tasks.list.TaskGroup}
*/
public class TaskGroup {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

/**
* Base class for HLRC request parsing tests.
*
* <p>
* This case class facilitates generating client side request test instances and
* verifies that they are correctly parsed into server side request instances.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

/**
* Base class for HLRC response parsing tests.
*
* <p>
* This case class facilitates generating server side response test instances and
* verifies that they are correctly parsed into HLRC response instances.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private static MultiGetRequest indexDocs(BulkProcessor processor, int numDocs) {
/**
* Internal helper class to correlate backoff states with bulk responses. This is needed to check whether we maxed out the number
* of retries but still got rejected (which is perfectly fine and can also happen from time to time under heavy load).
*
* <p>
* This implementation relies on an implementation detail in Retry, namely that the bulk listener is notified on the same thread
* as the last call to the backoff policy's iterator. The advantage is that this is non-invasive to the rest of the production code.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@
* You need to wrap your code between two tags like:
* // tag::example
* // end::example
*
* <p>
* Where example is your tag name.
*
* <p>
* Then in the documentation, you can extract what is between tag and end tags with
* ["source","java",subs="attributes,callouts,macros"]
* --------------------------------------------------
* include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[example]
* --------------------------------------------------
*
* <p>
* The column width of the code block is 84. If the code contains a line longer
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
Expand Down
Loading

0 comments on commit c0852f8

Please sign in to comment.