You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/03/17 03:04:26 UTC

[GitHub] [dolphinscheduler] zwZjut opened a new pull request #8946: #7946: add java sdk

zwZjut opened a new pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946


   <!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.-->
   
   
   ## Purpose of the pull request
   
   https://github.com/apache/dolphinscheduler/issues/7946
   
   
   ## Brief change log
   
   <!--*(for example:)*
     - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   This pull request is code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   <!--*(example:)*
     - *Added dolphinscheduler-dao tests for end-to-end.*
     - *Added CronUtilsTest to verify the change.*
     - *Manually verified the change by testing locally.* -->
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] zwZjut commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
zwZjut commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1070255141


   The PR logic of Java SDK:It is divided into three layers. 
   (1)encapsulate a client for okhttp; 
   (2)encapsulate the call parameters; 
   (3)encapsulate a dolphin client as dsclient, and each dolphin's OpenAPI corresponds to a request and response; 
   All newly added interfaces should be implemented in the way that they have been implemented, combined with the open API document of dolphin, and just follow the example. At present, more than 50 of the main interfaces we use have been implemented, and others can be added as needed. Use token  of dolphin to make HTTP call.
   
   use dsclient to create project example:
   
    DSClient dsClient = DSClientHelper.getClient("xxx","xxxx");
    CreateProjectRequest request = new CreateProjectRequest();
    request.body.projectName = "xxxx";
    request.body.description = "xxxx";
    CreateProjectResponse response = dsClient.createProject(request);
   
   add a http call example:
   (1)add XXXRequest.java  
   (2)add XXXResponse.java
   (3)add two method in DSClinet.java  
       public XXXResponse XXX(XXXRequest request) throws Exception {
           return this.XXXWithOptions(request, new RuntimeOptions());
       }
   public XXXResponse XXXWithOptions(XXXRequest request, RuntimeOptions runtime) throws Exception {
           Params params = new Params().setAction("XXX")
                   .setPathname("/dolphinscheduler/XXX")
           return TeaModel.toModel(this.doRequest(request, params, runtime), XXXResponse.class);
       }
   RuntimeOptions used to set http run time params, default is good enough
   
   
   
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] zwZjut edited a comment on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
zwZjut edited a comment on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1070255141


   The PR logic of Java SDK:It is divided into three layers. 
   (1)encapsulate a client for okhttp; 
   (2)encapsulate the call parameters; 
   (3)encapsulate a dolphin client as dsclient, and each dolphin's OpenAPI corresponds to a request and response; 
   All newly added interfaces should be implemented in the way that they have been implemented, combined with the open API document of dolphin, and just follow the example. At present, more than 50 of the main interfaces we use have been implemented, and others can be added as needed. Use token  of dolphin to make HTTP call.
   
   use dsclient to create project example:
   
    DSClient dsClient = DSClientHelper.getClient("xxx","xxxx"); //  (1) token; (2) endpoint
    CreateProjectRequest request = new CreateProjectRequest();
    request.body.projectName = "xxxx";
    request.body.description = "xxxx";
    CreateProjectResponse response = dsClient.createProject(request);
   
   add a http call example:
   (1)add XXXRequest.java  
   (2)add XXXResponse.java
   (3)add two method in DSClinet.java  
       public XXXResponse XXX(XXXRequest request) throws Exception {
           return this.XXXWithOptions(request, new RuntimeOptions());
       }
   public XXXResponse XXXWithOptions(XXXRequest request, RuntimeOptions runtime) throws Exception {
           Params params = new Params().setAction("XXX")
                   .setPathname("/dolphinscheduler/XXX")
           return TeaModel.toModel(this.doRequest(request, params, runtime), XXXResponse.class);
       }
   RuntimeOptions used to set http run time params, default is good enough
   
   
   
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1071997151


   # [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > :exclamation: No coverage uploaded for pull request base (`2.0.6-prepare@e2b962e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 54db739 differs from pull request most recent head ee0b876. Consider uploading reports for the commit ee0b876 to get more accurate results
   
   ```diff
   @@               Coverage Diff                @@
   ##             2.0.6-prepare    #8946   +/-   ##
   ================================================
     Coverage                 ?   21.04%           
     Complexity               ?     1591           
   ================================================
     Files                    ?      536           
     Lines                    ?    22525           
     Branches                 ?     2673           
   ================================================
     Hits                     ?     4740           
     Misses                   ?    17300           
     Partials                 ?      485           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?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/dolphinscheduler/pull/8946?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 [e2b962e...ee0b876](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] zwZjut commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
zwZjut commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1078592147


   > Please commit to the dev branch.
   
   The dev branch has changed too much. At present, I am not optimistic about the overall packaging and construction method of dev branch, which is not conducive to users' simple use. The interface implemented has been tested of branch 2.0.x and there is no plan to join dev at present


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1071997151


   # [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > :exclamation: No coverage uploaded for pull request base (`2.0.6-prepare@e2b962e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 54db739 differs from pull request most recent head ee0b876. Consider uploading reports for the commit ee0b876 to get more accurate results
   
   ```diff
   @@               Coverage Diff                @@
   ##             2.0.6-prepare    #8946   +/-   ##
   ================================================
     Coverage                 ?   21.04%           
     Complexity               ?     1591           
   ================================================
     Files                    ?      536           
     Lines                    ?    22525           
     Branches                 ?     2673           
   ================================================
     Hits                     ?     4740           
     Misses                   ?    17300           
     Partials                 ?      485           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?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/dolphinscheduler/pull/8946?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 [e2b962e...ee0b876](https://codecov.io/gh/apache/dolphinscheduler/pull/8946?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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] zwZjut edited a comment on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
zwZjut edited a comment on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1070255141


   The PR logic of Java SDK:It is divided into three layers. 
   (1)encapsulate a client for okhttp; 
   (2)encapsulate the call parameters; 
   (3)encapsulate a dolphin client as dsclient, and each dolphin's OpenAPI corresponds to a request and response; 
   All newly added interfaces should be implemented in the way that they have been implemented, combined with the open API document of dolphin, and just follow the example. At present, more than 50 of the main interfaces have been implemented, and others can be added as needed. Use token  of dolphin to make HTTP call.
   
   use dsclient to create project example:
   
    DSClient dsClient = DSClientHelper.getClient("xxx","xxxx"); //  (1) token; (2) endpoint
    CreateProjectRequest request = new CreateProjectRequest();
    request.body.projectName = "xxxx";
    request.body.description = "xxxx";
    CreateProjectResponse response = dsClient.createProject(request);
   
   add a http call example:
   (1)add XXXRequest.java  
   (2)add XXXResponse.java
   (3)add two method in DSClinet.java  
       public XXXResponse XXX(XXXRequest request) throws Exception {
           return this.XXXWithOptions(request, new RuntimeOptions());
       }
   public XXXResponse XXXWithOptions(XXXRequest request, RuntimeOptions runtime) throws Exception {
           Params params = new Params().setAction("XXX")
                   .setPathname("/dolphinscheduler/XXX")
           return TeaModel.toModel(this.doRequest(request, params, runtime), XXXResponse.class);
       }
   RuntimeOptions used to set http run time params, default is good enough
   
   
   
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1072002529


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG) [51 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT) [10 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL) [1347 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL)
   
   [![15.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '15.1%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_coverage&view=list) [15.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_coverage&view=list)  
   [![5.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '5.4%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_duplicated_lines_density&view=list) [5.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #8946: [Feature-7946] add java sdk

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #8946:
URL: https://github.com/apache/dolphinscheduler/pull/8946#issuecomment-1072002529


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG) [51 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT) [10 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL) [1347 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=8946&resolved=false&types=CODE_SMELL)
   
   [![15.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '15.1%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_coverage&view=list) [15.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_coverage&view=list)  
   [![5.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '5.4%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_duplicated_lines_density&view=list) [5.4% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=8946&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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