Skip to content

Commit

Permalink
Added javadoc based on feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun kumar Giri <[email protected]>
  • Loading branch information
arjunkumargiri committed Jun 17, 2024
1 parent 02d0f35 commit 82bddc8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class DeleteDataObjectRequest {
* For data storage implementations other than OpenSearch, an index may be referred to as a table and the id may be referred to as a primary key.
* @param index the index location to delete the object
* @param id the document id
* @param tenantId the tenant id
*/
public DeleteDataObjectRequest(String index, String id, String tenantId) {
this.index = index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class GetDataObjectRequest {
* For data storage implementations other than OpenSearch, an index may be referred to as a table and the id may be referred to as a primary key.
* @param index the index location to get the object
* @param id the document id
* @param tenantId the tenant id
* @param fetchSourceContext the context to use when fetching _source
*/
public GetDataObjectRequest(String index, String id, String tenantId, FetchSourceContext fetchSourceContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class UpdateDataObjectRequest {
* For data storage implementations other than OpenSearch, an index may be referred to as a table and the data object may be referred to as an item.
* @param index the index location to update the object
* @param id the document id
* @param tenantId the tenant id
* @param dataObject the data object
*/
public UpdateDataObjectRequest(String index, String id, String tenantId, ToXContentObject dataObject) {
Expand Down Expand Up @@ -100,7 +101,7 @@ public Builder id(String id) {

/**
* Add a tenant ID to this builder
* @param id the tenant id
* @param tenantId the tenant id
* @return the updated builder
*/
public Builder tenantId(String tenantId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public SdkClientModule() {

/**
* Instantiate this module specifying the endpoint and region. Package private for testing.
* @param remoteMetadataType Type of remote metadata store
* @param remoteMetadataEndpoint The remote endpoint
* @param region The region
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.opensearch.OpenSearchException;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.common.util.concurrent.OpenSearchExecutors;
Expand Down Expand Up @@ -165,7 +164,7 @@ public void testPutDataObject_DDBException_ThrowsException() {
.toCompletableFuture();

CompletionException ce = assertThrows(CompletionException.class, () -> future.join());
assertEquals(OpenSearchException.class, ce.getCause().getClass());
assertEquals(RuntimeException.class, ce.getCause().getClass());
}

@Test
Expand Down Expand Up @@ -227,7 +226,7 @@ public void testGetDataObject_DDBException_ThrowsOSException() throws IOExceptio
.getDataObjectAsync(getRequest, testThreadPool.executor(GENERAL_THREAD_POOL))
.toCompletableFuture();
CompletionException ce = assertThrows(CompletionException.class, () -> future.join());
assertEquals(OpenSearchException.class, ce.getCause().getClass());
assertEquals(RuntimeException.class, ce.getCause().getClass());
}

@Test
Expand Down

0 comments on commit 82bddc8

Please sign in to comment.