This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new c6177ab20 [KYUUBI #5922] Enhance YARN app state judgment
c6177ab20 is described below

commit c6177ab2079381844cd02cd568533ddb584a34ae
Author: Cheng Pan <[email protected]>
AuthorDate: Tue Dec 26 14:55:06 2023 +0800

    [KYUUBI #5922] Enhance YARN app state judgment
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    This pull request aims to enhance the YARN app state judgment.
    
    The combination of FINISHED and FAILED is valid, but Kyuubi now print ERROR 
logs
    
    <img width="745" alt="image" 
src="https://github.com/apache/kyuubi/assets/26535726/6bb43f09-9c69-418f-85c7-15e2716226f8";>
    
    ```
    [ERROR] YarnApplicationOperation#94 - Unknown YARN state FINISHED for app 
application_1700805876733_11637 with final status FAILED.
    ```
    
    ## Describe Your Solution ๐Ÿ”ง
    
    The fix just suppresses the ERROR logs, does not change the behavior, 
because the previous implementation treats all invalid combinations as FAILED 
too.
    
    ## Types of changes :bookmark:
    
    - [x] Bugfix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    #### Behavior Without This Pull Request :coffin:
    
    #### Behavior With This Pull Request :tada:
    
    #### Related Unit Tests
    
    ---
    
    # Checklists
    ## ๐Ÿ“ Author Self Checklist
    
    - [x] My code follows the [style 
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
 of this project
    - [x] I have performed a self-review
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my feature 
works
    - [ ] New and existing unit tests pass locally with my changes
    - [x] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    ## ๐Ÿ“ Committer Pre-Merge Checklist
    
    - [x] Pull request title is okay.
    - [x] No license issues.
    - [x] Milestone correctly set?
    - [ ] Test coverage is ok
    - [x] Assignees are selected.
    - [x] Minimum number of approvals
    - [x] No changes are requested
    
    **Be nice. Be informative.**
    
    Closes #5922 from pan3793/yarn-state.
    
    Closes #5922
    
    2ba30ce02 [Cheng Pan] Enhance YARN app state judgement
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala
 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala
index 1f672ad70..18d0006a5 100644
--- 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala
+++ 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala
@@ -184,7 +184,8 @@ object YarnApplicationOperation extends Logging {
         ApplicationState.RUNNING
       case (YarnApplicationState.FINISHED, FinalApplicationStatus.SUCCEEDED) =>
         ApplicationState.FINISHED
-      case (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED) =>
+      case (YarnApplicationState.FINISHED, FinalApplicationStatus.FAILED) |
+          (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED) =>
         ApplicationState.FAILED
       case (YarnApplicationState.KILLED, FinalApplicationStatus.KILLED) =>
         ApplicationState.KILLED

Reply via email to