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/07/26 01:26:33 UTC

[GitHub] [incubator-kyuubi] turboFei opened a new pull request, #3139: Override toString method for rest dto classes

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

   <!--
   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] turboFei commented on a diff in pull request #3139: Override toString method for rest dto classes

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


##########
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/Batch.java:
##########
@@ -170,4 +170,44 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(getId());
   }
+
+  @Override
+  public String toString() {
+    return "Batch{"
+        + "id='"
+        + id
+        + '\''
+        + ", user='"
+        + user
+        + '\''
+        + ", batchType='"
+        + batchType
+        + '\''
+        + ", name='"
+        + name
+        + '\''
+        + ", appId='"
+        + appId
+        + '\''
+        + ", appUrl='"
+        + appUrl
+        + '\''
+        + ", appState='"
+        + appState
+        + '\''
+        + ", appDiagnostic='"
+        + appDiagnostic
+        + '\''
+        + ", kyuubiInstance='"
+        + kyuubiInstance
+        + '\''
+        + ", state='"
+        + state
+        + '\''
+        + ", createTime="
+        + createTime
+        + ", endTime="
+        + endTime
+        + '}';

Review Comment:
   <img width="1467" alt="image" src="https://user-images.githubusercontent.com/6757692/180915779-84fab3c6-d845-4e28-879b-503b257eb33e.png">
   



-- 
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 #3139: Override toString method for rest dto classes

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139?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 [#3139](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (036a0cb) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/0e910197946968901c0e488abd2bd742121c3b67?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0e91019) will **decrease** coverage by `0.07%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3139      +/-   ##
   ============================================
   - Coverage     51.32%   51.25%   -0.08%     
     Complexity        6        6              
   ============================================
     Files           458      458              
     Lines         25388    25413      +25     
     Branches       3536     3536              
   ============================================
   - Hits          13031    13025       -6     
   - Misses        11117    11141      +24     
   - Partials       1240     1247       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ava/org/apache/kyuubi/client/api/v1/dto/Batch.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vQmF0Y2guamF2YQ==) | `89.47% <0.00%> (-1.60%)` | :arrow_down: |
   | [.../apache/kyuubi/client/api/v1/dto/BatchRequest.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vQmF0Y2hSZXF1ZXN0LmphdmE=) | `68.62% <0.00%> (-1.38%)` | :arrow_down: |
   | [...e/kyuubi/client/api/v1/dto/CloseBatchResponse.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vQ2xvc2VCYXRjaFJlc3BvbnNlLmphdmE=) | `68.42% <0.00%> (-3.81%)` | :arrow_down: |
   | [...rg/apache/kyuubi/client/api/v1/dto/ColumnDesc.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vQ29sdW1uRGVzYy5qYXZh) | `69.23% <0.00%> (-1.83%)` | :arrow_down: |
   | [...he/kyuubi/client/api/v1/dto/ExecPoolStatistic.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vRXhlY1Bvb2xTdGF0aXN0aWMuamF2YQ==) | `61.11% <0.00%> (-3.60%)` | :arrow_down: |
   | [...ava/org/apache/kyuubi/client/api/v1/dto/Field.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vRmllbGQuamF2YQ==) | `61.11% <0.00%> (-3.60%)` | :arrow_down: |
   | [...e/kyuubi/client/api/v1/dto/GetBatchesResponse.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vR2V0QmF0Y2hlc1Jlc3BvbnNlLmphdmE=) | `60.00% <0.00%> (-2.50%)` | :arrow_down: |
   | [...he/kyuubi/client/api/v1/dto/GetColumnsRequest.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vR2V0Q29sdW1uc1JlcXVlc3QuamF2YQ==) | `67.85% <0.00%> (-2.52%)` | :arrow_down: |
   | [...bi/client/api/v1/dto/GetCrossReferenceRequest.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vR2V0Q3Jvc3NSZWZlcmVuY2VSZXF1ZXN0LmphdmE=) | `61.36% <0.00%> (-1.43%)` | :arrow_down: |
   | [.../kyuubi/client/api/v1/dto/GetFunctionsRequest.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L2FwaS92MS9kdG8vR2V0RnVuY3Rpb25zUmVxdWVzdC5qYXZh) | `65.21% <0.00%> (-2.97%)` | :arrow_down: |
   | ... and [21 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/3139/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?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] ulysses-you commented on a diff in pull request #3139: Override toString method for rest dto classes

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #3139:
URL: https://github.com/apache/incubator-kyuubi/pull/3139#discussion_r929473536


##########
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/Batch.java:
##########
@@ -170,4 +170,44 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(getId());
   }
+
+  @Override
+  public String toString() {
+    return "Batch{"
+        + "id='"
+        + id
+        + '\''
+        + ", user='"
+        + user
+        + '\''
+        + ", batchType='"
+        + batchType
+        + '\''
+        + ", name='"
+        + name
+        + '\''
+        + ", appId='"
+        + appId
+        + '\''
+        + ", appUrl='"
+        + appUrl
+        + '\''
+        + ", appState='"
+        + appState
+        + '\''
+        + ", appDiagnostic='"
+        + appDiagnostic
+        + '\''
+        + ", kyuubiInstance='"
+        + kyuubiInstance
+        + '\''
+        + ", state='"
+        + state
+        + '\''
+        + ", createTime="
+        + createTime
+        + ", endTime="
+        + endTime
+        + '}';

Review Comment:
   magic style..



-- 
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 #3139: Override toString method for rest dto classes

Posted by GitBox <gi...@apache.org>.
turboFei closed pull request #3139: Override toString method for rest dto classes
URL: https://github.com/apache/incubator-kyuubi/pull/3139


-- 
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] ulysses-you commented on a diff in pull request #3139: Override toString method for rest dto classes

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #3139:
URL: https://github.com/apache/incubator-kyuubi/pull/3139#discussion_r929455874


##########
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/Batch.java:
##########
@@ -170,4 +170,44 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(getId());
   }
+
+  @Override
+  public String toString() {
+    return "Batch{"
+        + "id='"
+        + id
+        + '\''
+        + ", user='"
+        + user
+        + '\''
+        + ", batchType='"
+        + batchType
+        + '\''
+        + ", name='"
+        + name
+        + '\''
+        + ", appId='"
+        + appId
+        + '\''
+        + ", appUrl='"
+        + appUrl
+        + '\''
+        + ", appState='"
+        + appState
+        + '\''
+        + ", appDiagnostic='"
+        + appDiagnostic
+        + '\''
+        + ", kyuubiInstance='"
+        + kyuubiInstance
+        + '\''
+        + ", state='"
+        + state
+        + '\''
+        + ", createTime="
+        + createTime
+        + ", endTime="
+        + endTime
+        + '}';

Review Comment:
   is it generated by idea ? why looks so complex..



-- 
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 #3139: Override toString method for rest dto classes

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

   thanks @ulysses-you @pan3793 , merged 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] turboFei commented on a diff in pull request #3139: Override toString method for rest dto classes

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


##########
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/Batch.java:
##########
@@ -170,4 +170,44 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(getId());
   }
+
+  @Override
+  public String toString() {
+    return "Batch{"
+        + "id='"
+        + id
+        + '\''
+        + ", user='"
+        + user
+        + '\''
+        + ", batchType='"
+        + batchType
+        + '\''
+        + ", name='"
+        + name
+        + '\''
+        + ", appId='"
+        + appId
+        + '\''
+        + ", appUrl='"
+        + appUrl
+        + '\''
+        + ", appState='"
+        + appState
+        + '\''
+        + ", appDiagnostic='"
+        + appDiagnostic
+        + '\''
+        + ", kyuubiInstance='"
+        + kyuubiInstance
+        + '\''
+        + ", state='"
+        + state
+        + '\''
+        + ", createTime="
+        + createTime
+        + ", endTime="
+        + endTime
+        + '}';

Review Comment:
   yes, all the toString methods are generated by IDEA.
   
   And then execute `dev/reformat` to format the code style.



-- 
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 a diff in pull request #3139: Override toString method for rest dto classes

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


##########
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/Batch.java:
##########
@@ -170,4 +170,44 @@ public boolean equals(Object o) {
   public int hashCode() {
     return Objects.hash(getId());
   }
+
+  @Override
+  public String toString() {
+    return "Batch{"
+        + "id='"
+        + id
+        + '\''
+        + ", user='"
+        + user
+        + '\''
+        + ", batchType='"
+        + batchType
+        + '\''
+        + ", name='"
+        + name
+        + '\''
+        + ", appId='"
+        + appId
+        + '\''
+        + ", appUrl='"
+        + appUrl
+        + '\''
+        + ", appState='"
+        + appState
+        + '\''
+        + ", appDiagnostic='"
+        + appDiagnostic
+        + '\''
+        + ", kyuubiInstance='"
+        + kyuubiInstance
+        + '\''
+        + ", state='"
+        + state
+        + '\''
+        + ", createTime="
+        + createTime
+        + ", endTime="
+        + endTime
+        + '}';

Review Comment:
   @pan3793  suggested to use ReflectionToStringBuilder, let me have a try.



-- 
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