-
Notifications
You must be signed in to change notification settings - Fork 14.7k
MINOR: Improve some requests/responses toString method #20759
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
Conversation
| // It is not safe to print all config values | ||
| @Override | ||
| public String toString() { | ||
| JsonNode json = AlterConfigsRequestDataJsonConverter.write(data, version()).deepCopy(); |
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.
I left a comment in the email discussion thread
|
@lianetm would you mind including this patch in the 4.1.1? |
eacd2c8 to
26ffff4
Compare
2. also improve the builder.toString()
| return new AlterConfigsRequest.Builder(configs, false).build(version); | ||
| AlterConfigsRequest alterConfigsRequest = new AlterConfigsRequest.Builder(configs, false).build(version); | ||
| assertEquals( | ||
| "AlterConfigsRequestData(resources=[" + |
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.
The failed test is related to this, as the order of elements is not deterministic due to the HashMap
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.
I push a fix for this test
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.
Thanks @chia7712 ! LGTM! Let's wait for the CI build result.
Improve some requests/responses toString method to log only the required info, including the request.Builder toString methods. 1. AlterConfigsRequest 2. AlterUserScramCredentialsRequest 3. ExpireDelegationTokenRequest 4. IncrementalAlterConfigsRequest 5. RenewDelegationTokenRequest 6. SaslAuthenticateRequest 7. createDelegationTokenResponse 8. describeDelegationTokenResponse 9. SaslAuthenticateResponse Reviewers: Chia-Ping Tsai <[email protected]>, Manikumar Reddy <[email protected]>
|
I have pushed this patch to trunk and 4.1, but conflicts occurred in 4.0 and 3.9. will file a separate patch for those branches |
|
I’ll help Chia-Ping resolve the conflicts 😃 |
Improve some requests/responses toString method to log only the required info, including the request.Builder toString methods. 1. AlterConfigsRequest 2. AlterUserScramCredentialsRequest 3. ExpireDelegationTokenRequest 4. IncrementalAlterConfigsRequest 5. RenewDelegationTokenRequest 6. SaslAuthenticateRequest 7. createDelegationTokenResponse 8. describeDelegationTokenResponse 9. SaslAuthenticateResponse Reviewers: Chia-Ping Tsai <[email protected]>, Manikumar Reddy <[email protected]>
Improve some requests/responses toString method to log only the required info, including the request.Builder toString methods. 1. AlterConfigsRequest 2. AlterUserScramCredentialsRequest 3. ExpireDelegationTokenRequest 4. IncrementalAlterConfigsRequest 5. RenewDelegationTokenRequest 6. SaslAuthenticateRequest 7. createDelegationTokenResponse 8. describeDelegationTokenResponse 9. SaslAuthenticateResponse Reviewers: Chia-Ping Tsai <[email protected]>, Manikumar Reddy <[email protected]>
Improve some requests/responses toString method to log only the
required
info, including the request.Builder toString methods.
Reviewers: Chia-Ping Tsai [email protected], Manikumar Reddy
[email protected]