Siddhi-agg commented on code in PR #4208:
URL: https://github.com/apache/gobblin/pull/4208#discussion_r4079010781


##########
gobblin-runtime/src/main/java/org/apache/gobblin/service/monitoring/JobStatusRetriever.java:
##########
@@ -86,6 +88,28 @@ public abstract Iterator<JobStatus> 
getJobStatusesForFlowExecution(String flowNa
   public abstract Iterator<JobStatus> getJobStatusesForFlowExecution(String 
flowName, String flowGroup,
       long flowExecutionId, String jobName, String jobGroup);
 
+  /**
+   * Read retained states without discarding backend metadata during 
conversion to {@link JobStatus}.
+   * Includes the flow-summary record, if present. Callers must validate the 
decoded identity before using
+   * execution handles: storage keys alone do not establish the identity of 
the serialized contents.
+   *
+   * <p>Unlike status-display APIs, read failures propagate rather than 
appearing as an empty result.</p>
+   */
+  public List<State> getJobStatusStatesForFlowExecution(String flowName, 
String flowGroup, long flowExecutionId)
+      throws IOException {
+    Objects.requireNonNull(flowName, "flowName");
+    Objects.requireNonNull(flowGroup, "flowGroup");
+    String separator = ServiceConfigKeys.STATE_STORE_KEY_SEPARATION_CHARACTER;
+    String storeName = flowGroup + separator + flowName;
+    String tablePrefix = flowExecutionId + separator;
+    StateStore<State> stateStore = getStateStore();

Review Comment:
   Fixed in 9c72ce8f3. The default raw-state reader now throws an explicit 
IOException naming the unsupported retriever when getStateStore() returns null. 
Added a regression using the real LocalFsJobStatusRetriever; the existing KILL 
read-failure path propagates the failure without invoking the backend.



-- 
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]

Reply via email to