You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/04/28 17:31:00 UTC

[GitHub] [incubator-kyuubi] turboFei opened a new pull request, #2510: Fix NPE when getting ApplicationInfo

turboFei opened a new pull request, #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#discussion_r861436628


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KyuubiApplicationManager.scala:
##########
@@ -78,7 +78,9 @@ class KyuubiApplicationManager extends AbstractService("KyuubiApplicationManager
   def getApplicationInfo(
       clusterManager: Option[String],
       tag: String): Option[Map[String, String]] = {
-    operations.find(_.isSupported(clusterManager)).map(_.getApplicationInfoByTag(tag))
+    operations.find(_.isSupported(clusterManager)).flatMap { m =>

Review Comment:
   Nit:
   ```scala
     val option = operations.find(_.isSupported(clusterManager))
       option match {
         case Some(op) => Option(op.getApplicationInfoByTag(tag))
         case None => None
       }
   ```



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112838585

   I see..


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112796471

   I don't understand,can you add a test


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] turboFei closed pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
turboFei closed pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag
URL: https://github.com/apache/incubator-kyuubi/pull/2510


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#discussion_r861436628


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KyuubiApplicationManager.scala:
##########
@@ -78,7 +78,9 @@ class KyuubiApplicationManager extends AbstractService("KyuubiApplicationManager
   def getApplicationInfo(
       clusterManager: Option[String],
       tag: String): Option[Map[String, String]] = {
-    operations.find(_.isSupported(clusterManager)).map(_.getApplicationInfoByTag(tag))
+    operations.find(_.isSupported(clusterManager)).flatMap { m =>

Review Comment:
   Nit:
   ```scala
     val operation = operations.find(_.isSupported(clusterManager))
       operation match {
         case Some(op) => Option(op.getApplicationInfoByTag(tag))
         case None => None
       }
   ```



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] turboFei commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
turboFei commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112875626

   thanks, merging to master


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112817376

   the state can be null, how about the status?


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112826030

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2510](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f0e5f11) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/beb132f96fe055f0349e4db1315aaba3d385acae?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (beb132f) will **increase** coverage by `0.04%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2510      +/-   ##
   ============================================
   + Coverage     63.56%   63.60%   +0.04%     
     Complexity       69       69              
   ============================================
     Files           371      371              
     Lines         17710    17711       +1     
     Branches       2358     2358              
   ============================================
   + Hits          11257    11265       +8     
   + Misses         5408     5401       -7     
     Partials       1045     1045              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...pache/kyuubi/engine/KyuubiApplicationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvS3l1dWJpQXBwbGljYXRpb25NYW5hZ2VyLnNjYWxh) | `84.44% <100.00%> (+0.35%)` | :arrow_up: |
   | [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `83.12% <0.00%> (+0.62%)` | :arrow_up: |
   | [...g/apache/kyuubi/operation/BatchJobSubmission.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vQmF0Y2hKb2JTdWJtaXNzaW9uLnNjYWxh) | `80.28% <0.00%> (+8.45%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [beb132f...f0e5f11](https://codecov.io/gh/apache/incubator-kyuubi/pull/2510?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] turboFei commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
turboFei commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112799255

   I will try to add UT, I met NPE issue yesterday.
   
   <img width="1061" alt="image" src="https://user-images.githubusercontent.com/6757692/165871836-ad1e4290-34ee-4941-9463-6cc4384f502e.png">
   <img width="1329" alt="image" src="https://user-images.githubusercontent.com/6757692/165871885-3b216dda-ab4f-4663-966d-15c0be5f110f.png">
   
   Here the state might be null, because Some(null) is nonEmpty.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] turboFei commented on pull request #2510: Fix NPE when invoking YarnApplicationOperation::getApplicationInfoByTag

Posted by GitBox <gi...@apache.org>.
turboFei commented on PR #2510:
URL: https://github.com/apache/incubator-kyuubi/pull/2510#issuecomment-1112832437

   <img width="730" alt="image" src="https://user-images.githubusercontent.com/6757692/165878835-c1cc92f5-5fa8-464b-826b-cb7dc68cd062.png">
   
   If the applicationStatus is Some(null).
   
   Then NPE thrown.
   
   ```
         val state = applicationStatus.get(ApplicationOperation.APP_STATE_KEY)
   ```


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org