hutiefang76 opened a new pull request, #4360:
URL: https://github.com/apache/streampark/pull/4360

   ## What changes were proposed in this pull request
   
   Issue Number: close #4356
   
   When StreamPark falls back to Yarn after failing to get the task status from 
the Flink REST API, it currently reads Yarn `finalStatus`. For an application 
that is still in progress, Yarn usually reports `finalStatus=UNDEFINED` while 
the actual application state is in the `state` field, for example `RUNNING`.
   
   This change resolves the Yarn application state by:
   
   - using `finalStatus` when it maps to a known terminal result such as 
`SUCCEEDED`, `FAILED`, or `KILLED`
   - falling back to Yarn `state` when `finalStatus` is not a known StreamPark 
state, so running applications can be updated as `RUNNING` instead of being 
skipped
   
   ## Brief change log
   
   - Add `resolveYarnAppState` for Yarn state/finalStatus conversion in 
`FlinkAppHttpWatcher`
   - Use the resolver in both Yarn fallback paths
   - Add unit coverage for `finalStatus=UNDEFINED,state=RUNNING`, terminal 
`SUCCEEDED`, and missing app info
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - `git diff --check -- 
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/watcher/FlinkAppHttpWatcher.java
 
streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/watcher/FlinkAppHttpWatcherTest.java`
   - `JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -pl 
streampark-console/streampark-console-service -am 
-Dtest=FlinkAppHttpWatcherTest -Dsurefire.failIfNoSpecifiedTests=false test`
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): no


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