-
Notifications
You must be signed in to change notification settings - Fork 62
Add Validations for the BulkAPI Params #1557
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
base: mvp_demo
Are you sure you want to change the base?
Conversation
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
Signed-off-by: Saad Khan <[email protected]>
bharathappali
left a comment
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.
@khansaad Thanks for the PR, I have requested some changes for adding copyrights and java doc, apart from that everything LGTM
| @@ -0,0 +1,95 @@ | |||
| package com.autotune.common.bulk; | |||
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.
@khansaad Thanks for raising the validations PR. Please kindly add the Copyrights header, as it's a new file.
| import java.time.OffsetDateTime; | ||
| import java.time.format.DateTimeParseException; | ||
|
|
||
| public class BulkServiceValidation { |
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.
Adding a Javadoc could be a bit helpful for the devs to understand about this class.
|
|
||
| private static final Logger LOGGER = LoggerFactory.getLogger(BulkServiceValidation.class); | ||
|
|
||
| public static ValidationOutputData validate(BulkInput payload, String jobID) throws Exception { |
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.
Java doc for this and other methods would be helpful as well.
| return errorMessage; | ||
| } | ||
|
|
||
| public static String validateTimeRange(BulkInput.TimeRange timeRange) { |
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.
Having a java doc would be helpful
| } | ||
|
|
||
|
|
||
| public static String validateDatasourceConnection(String datasourceName) { |
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.
Having a java doc would be helpful
| return validationOutputData; | ||
| } | ||
|
|
||
| private static ValidationOutputData buildErrorOutput(String errorMsg, String jobID) { |
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.
Having a java doc would be helpful
Signed-off-by: Saad Khan <[email protected]>
Thanks for pointing that out. Added now. |
bharathappali
left a comment
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.
LGTM
Description
This PR adds validations for the Bulk API params.
Fixes # (issue)
Type of change
How has this been tested?
Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.
Test Configuration
Checklist 🎯
Additional information
Include any additional information such as links, test results, screenshots here