-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK DDB client update and search interface implementation #2590
SDK DDB client update and search interface implementation #2590
Conversation
22e93a4
to
e2cc4e4
Compare
e2cc4e4
to
ace7684
Compare
ace7684
to
28a51cf
Compare
28a51cf
to
29669c0
Compare
Signed-off-by: Arjun kumar Giri <[email protected]>
Signed-off-by: Arjun kumar Giri <[email protected]>
6bc3621
to
d63d00d
Compare
dynamoDbClient.putItem(putItemRequest); | ||
return new PutDataObjectResponse.Builder().id(id).created(true).build(); | ||
} catch (IOException e) { | ||
throw new OpenSearchStatusException("Failed to parse data object " + request.id(), RestStatus.BAD_REQUEST); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if parsing data object is fine, but indexing failed for some other reason may be DDB was not reachable, or throttled or some other reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DDB would through runtime exception which will not be wrapped.
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); | ||
|
||
@VisibleForTesting | ||
public static Map<String, AttributeValue> convertJsonObjectToItem(JsonNode jsonNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convertJsonObjectToDDbAttributeMap
? as this method is only taking care of Dynamodb? Same goes for the other method name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the class too? JsonTransformer
sounds too generic in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update method name, however would like to keep the name generic to support other json transformation functions in future
Signed-off-by: Arjun kumar Giri <[email protected]>
34fca30
into
opensearch-project:feature/multi_tenancy
Description
SDK DDB client update and search interface implementation.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.