-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMORO-2862] fix bug: A null pointer error occurs when using S3 as Storage when using the kyuubi terminal. #2863
Conversation
…ng S3 as Storage when using the kyuubi terminal.
…ng S3 as Storage when using the kyuubi terminal.
…ng S3 as Storage when using the kyuubi terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@upczsh Thanks for reporting this bug and trying to fix it.
I left some comments, PTAL.
@@ -124,8 +125,11 @@ public TerminalSession create(TableMetaStore metaStore, Configurations configura | |||
Properties properties = new Properties(); | |||
|
|||
if (!metaStore.isKerberosAuthMethod()) { | |||
properties.put(JdbcConnectionParams.AUTH_USER, metaStore.getHadoopUsername()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about checking if the value is null before putting it into properties and configuration?
I think it will be simpler if we fix it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your suggestion, I have made the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use one condition to fix this, WDYT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use one condition to fix this, WDYT
Okay, I've merged it into one.thinks.
…ng S3 as Storage when using the kyuubi terminal.
…ng S3 as Storage when using the kyuubi terminal.
…ng S3 as Storage when using the kyuubi terminal.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2863 +/- ##
============================================
- Coverage 35.95% 32.76% -3.20%
- Complexity 383 3820 +3437
============================================
Files 45 558 +513
Lines 4700 46295 +41595
Branches 513 6175 +5662
============================================
+ Hits 1690 15169 +13479
- Misses 2842 29931 +27089
- Partials 168 1195 +1027
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Why are the changes needed?
Close #2862.
Brief change log
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
Before repair:
after repair:
Documentation