voonhous commented on code in PR #13147:
URL: https://github.com/apache/hudi/pull/13147#discussion_r3401663509
##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/RequestHandler.java:
##########
@@ -171,6 +171,18 @@ private static String getMinInstantParam(Context ctx) {
return
ctx.queryParamAsClass(RemoteHoodieTableFileSystemView.MIN_INSTANT_PARAM,
String.class).getOrDefault("");
}
+ private static String getInstantParam(Context ctx) {
+ return
ctx.queryParamAsClass(RemoteHoodieTableFileSystemView.INSTANT_PARAM,
String.class).getOrDefault("");
+ }
+
+ private static String getInstantActionParam(Context ctx) {
+ return
ctx.queryParamAsClass(RemoteHoodieTableFileSystemView.INSTANT_ACTION_PARAM,
String.class).getOrDefault("");
+ }
+
+ private static String getInstantStateParam(Context ctx) {
+ return
ctx.queryParamAsClass(RemoteHoodieTableFileSystemView.INSTANT_STATE_PARAM,
String.class).getOrDefault("");
+ }
Review Comment:
Good catch. Made these mandatory: `getInstantParam`,
`getInstantActionParam`, and `getInstantStateParam` now `getOrThrow` a
`BadRequestResponse` (400) instead of defaulting to `""`, so a missing
identifier is rejected at the edge rather than reaching `getInstantDetails`
with an empty value. These getters feed only the `/v2` instant-details route,
so nothing else is affected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]