You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "wForget (via GitHub)" <gi...@apache.org> on 2024/05/24 09:12:01 UTC
[PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
wForget opened a new pull request, #6420:
URL: https://github.com/apache/kyuubi/pull/6420
# :mag: Description
## Issue References ๐
<!-- Append the issue number after #. If there is no issue for you to link create one or -->
<!-- If there are no issues to link, please provide details here. -->
This pull request fixes #
## Describe Your Solution ๐ง
NPE will occur when kyuubiClientTicketCache is not specified.
## Types of changes :bookmark:
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [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
---
# Checklist ๐
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
--
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
Re: [PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #6420: [KYUUBI #6396][FOLLOWUP] Avoid NPE
URL: https://github.com/apache/kyuubi/pull/6420
--
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
Re: [PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6420:
URL: https://github.com/apache/kyuubi/pull/6420#issuecomment-2129200096
## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/6420?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `0%` with `2 lines` in your changes are missing coverage. Please review.
> Project coverage is 58.31%. Comparing base [(`4cbecdc`)](https://app.codecov.io/gh/apache/kyuubi/commit/4cbecdc12f1f930f5375dddf02c3e545716b3400?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`e5d5f9d`)](https://app.codecov.io/gh/apache/kyuubi/pull/6420?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 5 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/kyuubi/pull/6420?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../org/apache/kyuubi/jdbc/hive/KyuubiConnection.java](https://app.codecov.io/gh/apache/kyuubi/pull/6420?src=pr&el=tree&filepath=kyuubi-hive-jdbc%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkyuubi%2Fjdbc%2Fhive%2FKyuubiConnection.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9LeXV1YmlDb25uZWN0aW9uLmphdmE=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6420?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../jdbc/hive/auth/KerberosAuthenticationManager.java](https://app.codecov.io/gh/apache/kyuubi/pull/6420?src=pr&el=tree&filepath=kyuubi-hive-jdbc%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkyuubi%2Fjdbc%2Fhive%2Fauth%2FKerberosAuthenticationManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9hdXRoL0tlcmJlcm9zQXV0aGVudGljYXRpb25NYW5hZ2VyLmphdmE=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/6420?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #6420 +/- ##
============================================
- Coverage 58.37% 58.31% -0.07%
Complexity 24 24
============================================
Files 656 656
Lines 40267 40268 +1
Branches 5498 5498
============================================
- Hits 23507 23482 -25
- Misses 14259 14279 +20
- Partials 2501 2507 +6
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/kyuubi/pull/6420?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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
Re: [PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #6420:
URL: https://github.com/apache/kyuubi/pull/6420#discussion_r1613158334
##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/auth/KerberosAuthenticationManager.java:
##########
@@ -29,10 +30,16 @@ public class KerberosAuthenticationManager {
new ConcurrentHashMap<>();
public static CachingKerberosAuthentication getTgtCacheAuthentication(String ticketCache) {
+ final String finalTicketCache;
+ if (StringUtils.isBlank(ticketCache)) {
+ finalTicketCache = System.getenv("KRB5CCNAME");
Review Comment:
Even if we do this, the value may still be null. cc @lsm1
--
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
Re: [PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #6420:
URL: https://github.com/apache/kyuubi/pull/6420#issuecomment-2132759282
Thanks, merged to master/1.9
--
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
Re: [PR] [KYUUBI #6396][FOLLOWUP] Avoid NPE [kyuubi]
Posted by "wForget (via GitHub)" <gi...@apache.org>.
wForget commented on code in PR #6420:
URL: https://github.com/apache/kyuubi/pull/6420#discussion_r1613172616
##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/auth/KerberosAuthenticationManager.java:
##########
@@ -29,10 +30,16 @@ public class KerberosAuthenticationManager {
new ConcurrentHashMap<>();
public static CachingKerberosAuthentication getTgtCacheAuthentication(String ticketCache) {
+ final String finalTicketCache;
+ if (StringUtils.isBlank(ticketCache)) {
+ finalTicketCache = System.getenv("KRB5CCNAME");
Review Comment:
Makes sense, how about giving a empty string by default?
--
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