Skip to content

Commit

Permalink
Fix JavaDoc and Checkstyle errors
Browse files Browse the repository at this point in the history
Signed-off-by: Amanda Xiang <[email protected]>
  • Loading branch information
Amanda Xiang committed Jan 2, 2025
1 parent 0fa8341 commit e90bf5b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public interface NeptuneStreamEventListener {

/**
*
* @param exception
* @param streamPosition current commitNum and OpNum in the stream.
* @param exception any encountered exception during stream processing
* @param streamPosition current commitNum and OpNum in the stream
* @return boolean if the execution should continue after that exception is encountered.
*/
boolean onNeptuneStreamException(final Exception exception, final StreamPosition streamPosition);

/**
*
* @param streamPosition
* @param streamPosition current commitNum and OpNum in the stream
* @return boolean if stream processing should be stopped
*/
boolean shouldStopNeptuneStream(final StreamPosition streamPosition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

/**
* Validates if the record from Neptune Streams is a valid record.
* (1) If {@link NeptuneSourceConfig#isEnableNonStringIndexing()} is true, then all datatypes are valid and mapped to
* OS datatypes as defined in https://docs.aws.amazon.com/neptune/latest/userguide/full-text-search-non-string-indexing-mapping.html.
* (1) If enableNonStringIndexing in {@link NeptuneSourceConfig} is true, then all datatypes are valid and mapped to
* OS datatypes as defined in <a href="https://docs.aws.amazon.com/neptune/latest/userguide/full-text-search-non-string-indexing-mapping.html">Mapping of SPARQL and Gremlin datatypes to OpenSearch</a>
* (2) Otherwise, only String datatypes are supported and any non-string record is dropped.
*/
public class NeptuneStreamRecordValidator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private void setProgressState(final StreamCheckpoint progress) {
* Note that this should be called on a regular basis even there are no changes to resume token
* As the checkpoint will also extend the timeout for the lease
*
* @param checkpointProgress checkpoint progress object, including info e.g. stream position, record count
*/
public void checkpoint(final StreamCheckpoint checkpointProgress) {
LOG.debug("Checkpoint stream partition with record number {}", checkpointProgress.getRecordCount());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.opensearch.dataprepper.plugins.source.neptune.stream.model.StreamCheckpoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.services.s3.endpoints.internal.Value;

import java.time.Duration;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.DistributionSummary;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
Expand All @@ -14,13 +13,9 @@
import org.opensearch.dataprepper.plugins.source.neptune.converter.StreamRecordConverter;
import org.opensearch.dataprepper.plugins.source.neptune.coordination.partition.StreamPartition;
import org.opensearch.dataprepper.plugins.source.neptune.coordination.state.StreamProgressState;
import org.opensearch.dataprepper.plugins.source.neptune.model.S3PartitionStatus;

import java.util.List;
import java.util.Optional;
import java.util.Random;

import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.when;
import static org.opensearch.dataprepper.plugins.source.neptune.stream.StreamWorker.BYTES_PROCESSED;
import static org.opensearch.dataprepper.plugins.source.neptune.stream.StreamWorker.BYTES_RECEIVED;
Expand Down

0 comments on commit e90bf5b

Please sign in to comment.