Skip to content

Commit

Permalink
Fixed javadoc errors (#5379)
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
kkondaka authored Jan 31, 2025
1 parent 5b16480 commit 03f5539
Show file tree
Hide file tree
Showing 48 changed files with 125 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
public @interface AlsoRequired {
/**
* Array of Required annotations, each representing a required property with its allowed values.
* @return returns array of required values
*/
Required[] values();

Expand All @@ -25,11 +26,13 @@
@interface Required {
/**
* Name of the required property.
* @return returns name
*/
String name();

/**
* Allowed values for the required property. The default value of {} means any non-null value is allowed.
* @return returns array of allowed values
*/
String[] allowedValues() default {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
public @interface ConditionalRequired {
/**
* Array of if-then-else requirements.
* @return returns array of if and else values
*/
IfThenElse[] value();

Expand All @@ -22,14 +23,17 @@
@interface IfThenElse {
/**
* Array of property schemas involved in if condition.
* @return returns of if schema properties
*/
SchemaProperty[] ifFulfilled();
/**
* Array of property schemas involved in then expectation.
* @return returns of then schema properties
*/
SchemaProperty[] thenExpect();
/**
* Array of property schemas involved in else expectation.
* @return returns of else schema properties
*/
SchemaProperty[] elseExpect() default {};
}
Expand All @@ -40,10 +44,12 @@
@interface SchemaProperty {
/**
* Name of the property.
* @return returns schema field
*/
String field();
/**
* Value of the property. Empty string means any non-null value is allowed.
* @return returns schema value
*/
String value() default "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

/**
* A description of the example value.
* @return returns description
*
* @since 2.11
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface Processor<InputRecord extends Record<?>, OutputRecord extends R
* @since 2.11
* Indicates if the processor holds the events or not
* Holding events indicates that the events are not ready to be released.
* @return returns if events are held by the processor or not
*/
default boolean holdsEvents() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ public Object invokeMethod(String methodName, Class<?> parameterType, Object arg
* Replaces template node in the jsonPath with the node from
* original json.
*
* @param root
* @param jsonPath
* @param newNode
* @param root json root node
* @param jsonPath json path
* @param newNode new node to be repalces with
*/
public void replaceNode(JsonNode root, String jsonPath, JsonNode newNode) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default AggregateActionResponse handleEvent(final Event event, final AggregateAc

/**
* indicates if the action holds the events or not
*
* @return returns if events are held by the processor or not
*/
default boolean holdsEvents() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public Builder withStsHeaderOverrides(final Map<String, String> stsHeaderOverrid
/**
* Configures whether to use default credentials.
*
* @param useDefaultCredentialsProvider
* @param useDefaultCredentialsProvider boolean indicating if default credentials provider should be used or not
* @return The {@link Builder} for continuing to build
*/
public Builder withUseDefaultCredentialsProvider(final boolean useDefaultCredentialsProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ void flushBuffer() throws Exception {
/**
* Add event record to buffer
*
* @param acknowledgementSet acknowledgement set
* @param data A map to hold event data, note that it may be empty.
* @param keys A map to hold the keys (partition key and sort key)
* @param eventCreationTimeMillis Creation timestamp of the event
* @param eventVersionNumber Event version number
* @param eventName Event name
* @param userIdentity UserIdentity for TTL based deletes
* @throws Exception Exception if failed to write to buffer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void put(final String shardId, final String parentShardId) {
* Get child shard ids by parent shard id from cache.
* If none is found, return null.
*
* @param parentShardId
* @param parentShardId parent shard id
* @return a list of Child Shard IDs
*/
public List<String> get(String parentShardId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public interface DlqProvider {
* Allows implementors to provide a {@link DlqWriter}. This may be optional, in which case it is not used.
* @param pluginMetricsScope the {@link org.opensearch.dataprepper.metrics.PluginMetrics} component scope.
* This is used to place the DLQ metrics under the correct parent plugin.
* @return returns dlq writer
* @since 2.2
*/
default Optional<DlqWriter> getDlqWriter(final String pluginMetricsScope) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public interface DlqWriter {
* @param dlqObjects the list of objects to be written to the DLQ
* @param pipelineName the pipeline the DLQ object is associated with.
* @param pluginId the id of the plugin the DLQ object is associated with.
* @throws IOException
* @throws IOException io exception
*
* @since 2.2
*/
void write(final List<DlqObject> dlqObjects, final String pipelineName, final String pluginId) throws IOException;

/**
* Closes any open connections to the DLQ
* @throws IOException
* @throws IOException io exception
*
* @since 2.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class GeoIPProcessorService {
* GeoIPProcessorService constructor for initialization of required attributes
*
* @param geoIpServiceConfig geoIpServiceConfig
* @param geoIPDatabaseManager geoIPDatabaseManager
* @param readLock readLock
*/
public GeoIPProcessorService(final GeoIpServiceConfig geoIpServiceConfig,
final GeoIPDatabaseManager geoIPDatabaseManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public interface GeoIPDatabaseReader extends AutoCloseable {
* Gets the geo data from the {@link com.maxmind.geoip2.DatabaseReader}
*
* @param inetAddress InetAddress
* @param fields fields
* @param geoIPDatabases geo ip databases
* @return Map of geo field and value pairs from IP address
*
* @since 2.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
public interface GeoIpConfigSupplier {
/**
* Returns the {@link GeoIPProcessorService}
* @return returns the {@link GeoIPProcessorService}
*
* @since 2.7
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public DatabaseReaderBuilder() {
* @param databasePath databasePath
* @param cacheSize cacheSize
* @return DatabaseReader
* @throws IOException io exception
*/
public DatabaseReader buildReader(final Path databasePath, final int cacheSize) throws IOException {
return new DatabaseReader.Builder(databasePath.toFile())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public class HttpDBDownloadService implements DBSource {

/**
* HttpDBDownloadService constructor for initialisation of attributes
* @param destinationDirectory destinationDirectory
* @param destinationDirectory destination directory
* @param geoIPFileManager geo ip file manager
* @param maxMindDatabaseConfig max min database config
*/
public HttpDBDownloadService(final String destinationDirectory,
final GeoIPFileManager geoIPFileManager,
Expand Down Expand Up @@ -85,6 +87,7 @@ private File decompressAndgetTarFile(final String tarFolderPath, final String do
/**
* Build Request And DownloadFile
* @param url url
* @param downloadTarFilepath download tar file path
*/
public void buildRequestAndDownloadFile(final String url, final String downloadTarFilepath) {
downloadDBFileFromMaxmind(url, downloadTarFilepath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class LocalDBDownloadService implements DBSource {
/**
* LocalDBDownloadService constructor for initialisation of attributes
* @param destinationDirectory destinationDirectory
* @param maxMindDatabaseConfig maxMindDatabaseConfig
*/
public LocalDBDownloadService(final String destinationDirectory, final MaxMindDatabaseConfig maxMindDatabaseConfig) {
this.destinationDirectory = destinationDirectory;
Expand All @@ -30,6 +31,7 @@ public LocalDBDownloadService(final String destinationDirectory, final MaxMindDa

/**
* Initialisation of Download from local file path
* @throws Exception exception
*/
@Override
public void initiateDownload() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public class S3DBService implements DBSource {
/**
* S3DBService constructor for initialisation of attributes
*
* @param awsAuthenticationOptionsConfig awsAuthenticationOptionsConfig
* @param destinationDirectory destinationDirectory
* @param maxMindDatabaseConfig maxMindDatabaseConfig
*/
public S3DBService(final AwsAuthenticationOptionsConfig awsAuthenticationOptionsConfig,
final String destinationDirectory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ public class GeoIPProcessor extends AbstractProcessor<Record<Event>, Record<Even

/**
* GeoIPProcessor constructor for initialization of required attributes
* @param pluginMetrics pluginMetrics
* @param geoIPProcessorConfig geoIPProcessorConfig
* @param geoIpConfigSupplier geoIpConfigSupplier
* @param pluginMetrics plugin metrics
* @param geoIPProcessorConfig geoIP processor config
* @param geoIpConfigSupplier geoIp config supplier
* @param expressionEvaluator expression evaluator
*/
@DataPrepperPluginConstructor
public GeoIPProcessor(final PluginMetrics pluginMetrics,
Expand Down Expand Up @@ -257,4 +258,4 @@ public boolean isReadyForShutdown() {
public void shutdown() {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

/**
* Codec parses the content of HTTP request into custom Java type.
* <p>
*/
public interface Codec<T> {
/**
* parse the request into custom type
*
* @param httpData The content of the original HTTP request
* @return The target data type
* @return T The target data type
* @throws IOException A failure while parsing data.
*/
T parse(HttpData httpData) throws IOException;

Expand All @@ -33,9 +33,7 @@ public interface Codec<T> {

/*
* Serializes the HttpData and split into multiple bodies based on splitLength.
* <p>
* The serialized bodies are passed to the serializedBodyConsumer.
* <p>
* This API will split into multiple bodies based on splitLength. Note that if a single
* item is larger than this, it will be output and exceed that length.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/**
* JsonCodec parses the json array format HTTP data into List&lt;{@link String}&gt;.
* TODO: replace output List&lt;String&gt; with List&lt;InternalModel&gt; type
* <p>
*/
public class JsonCodec implements Codec<List<String>> {
private static final ObjectMapper mapper = new ObjectMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public InMemorySourceCoordinationStore(final PluginSetting pluginSetting) {

/**
* For Testing
* @param inMemoryPartitionAccessor inMemoryPartitionAccessor
*/
public InMemorySourceCoordinationStore(final InMemoryPartitionAccessor inMemoryPartitionAccessor) {
this.inMemoryPartitionAccessor = inMemoryPartitionAccessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public static KafkaPluginThreadFactory defaultExecutorThreadFactory(final String
* Creates an instance specifically for use with {@link Executors}.
*
* @param kafkaPluginType The name of the plugin type. e.g. sink, source, buffer
* @param kafkaTopic kafka topic name
* @return An instance of the {@link KafkaPluginThreadFactory}.
*/
public static KafkaPluginThreadFactory defaultExecutorThreadFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ private String getAttributeValue(final Map<String, Object> data, final String at
* @param eventCreateTimeEpochMillis Creation timestamp of the event in epoch millis
* @param eventVersionNumber Event version number to handle conflicts
* @param eventName Event name
* @param primaryKeyBsonType primaryKeyBsonType
* @return Jackson document event
*/
public Event convert(final String record,
Expand Down Expand Up @@ -98,6 +99,7 @@ public Event convert(final String record,
* @param record record that will be converted to Event.
* @param eventCreationTimeMillis Creation timestamp of the event
* @param eventVersionNumber Event version number to handle conflicts
* @param primaryKeyBsonType primaryKeyBsonType
* @return Jackson document event
*/
public Event convert(final String record,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/**
* Accumulates Bulk Requests.
*
* @param <O>
* @param <R>
* @param <O> OperationType
* @param <R> RequestType
*/
public interface AccumulatingBulkRequest<O, R> {
long estimateSizeInBytesWithDocument(O documentOrOperation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface SerializedJson extends SizedDocument {
* @param jsonString The serialized JSON string which forms this JSON data.
* @param docId Optional documment ID string
* @param routingField Optional routing field string
* @param pipelineField pipeline Field
* @return A new {@link SerializedJson}.
*/
static SerializedJson fromStringAndOptionals(String jsonString, String docId, String routingField, String pipelineField) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private String getISMEnabled(final GetClusterSettingsResponse response) {
/**
* Setups anything required for the index.
*
* @throws IOException
* @throws IOException io exception
*/
@Override
public void setupIndex() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ public interface IndexTemplateAPIWrapper<T> {
* Create or update the index template
*
* @param indexTemplate The {@link IndexTemplate} to create or update.
* @throws IOException io exception
*/
void putTemplate(IndexTemplate indexTemplate) throws IOException;

/**
* Retrieve the existing index template
*
* @param name The index template name to retrieve by.
* @throws IOException io exception
* @return an {@code Optional} containing the template if found, otherwise an empty {@code Optional}.
*/
Optional<T> getTemplate(String name) throws IOException;
}
Loading

0 comments on commit 03f5539

Please sign in to comment.