Skip to content

Support worker server to run bat script#2023

Merged
davidzollo merged 26 commits intoapache:devfrom
liwenhe1993:dev-support-windows-bat-script
Mar 5, 2020
Merged

Support worker server to run bat script#2023
davidzollo merged 26 commits intoapache:devfrom
liwenhe1993:dev-support-windows-bat-script

Conversation

@liwenhe1993
Copy link
Copy Markdown
Member

Support worker server to run bat script

  1. Reimplement ProcessImpl.java, ProcessEnvironment.java and ProcessBuilder.java for Windows
  2. Modify shell task code for windows
  3. Add ASF License

#2015

1. Reimplement ProcessImpl.java, ProcessEnvironment.java and ProcessBuilder.java for Windows
2. Modify shell task code for windows
3. Add ASF License
@liwenhe1993 liwenhe1993 changed the title Support worker server to run bat script #2015 Support worker server to run bat script Feb 26, 2020
Copy link
Copy Markdown
Contributor

@khadgarmage khadgarmage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unit test?

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 27, 2020

Codecov Report

Merging #2023 into dev will increase coverage by 0.67%.
The diff coverage is 53.98%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #2023      +/-   ##
============================================
+ Coverage     32.06%   32.73%   +0.67%     
+ Complexity     1612     1599      -13     
============================================
  Files           316      316              
  Lines         16552    16100     -452     
  Branches       2114     2006     -108     
============================================
- Hits           5308     5271      -37     
+ Misses        10686    10273     -413     
+ Partials        558      556       -2
Impacted Files Coverage Δ Complexity Δ
.../server/worker/task/conditions/ConditionsTask.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...scheduler/api/controller/DataSourceController.java 2.19% <0%> (ø) 2 <0> (ø) ⬇️
...phinscheduler/server/worker/task/AbstractTask.java 11.59% <0%> (-0.06%) 2 <0> (-1)
...hinscheduler/common/utils/TaskParametersUtils.java 70% <0%> (-2.98%) 11 <0> (-11)
...r/common/task/conditions/ConditionsParameters.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...e/dolphinscheduler/common/model/DependentItem.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...lphinscheduler/server/worker/task/TaskManager.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...duler/server/worker/runner/TaskScheduleThread.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...heduler/server/master/runner/MasterExecThread.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...apache/dolphinscheduler/common/model/TaskNode.java 0% <0%> (ø) 0 <0> (ø) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1018f9d...847f383. Read the comment docs.

@liwenhe1993
Copy link
Copy Markdown
Member Author

This PR has a problem with npm can't build it.

@liwenhe1993 liwenhe1993 reopened this Feb 28, 2020
@samz406
Copy link
Copy Markdown
Contributor

samz406 commented Mar 2, 2020

sonarcloud scanned some issues, you can deal with

@liwenhe1993
Copy link
Copy Markdown
Member Author

For now, npm build failed, dont merge.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 3, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 1 Security Hotspot to review)
Code Smell A 97 Code Smells

19.6% 19.6% Coverage
1.3% 1.3% Duplication

Copy link
Copy Markdown
Contributor

@khadgarmage khadgarmage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 ut coverage is up

Copy link
Copy Markdown
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

greate job,big feature

+1

* @since 1.5
*/

public class ProcessBuilderForWin32 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dailidong what's the different between this class and the internal class? I would prefer remove all duplicated document, emphasize the difference and link to ProcessBuilder's build if there is nothing changed. Also at the beginning of the class document, it is possibly required that we mention it is copied from openjdk with modification, which will help reduce legal risk.


import java.util.*;

final class ProcessEnvironmentForWin32 extends HashMap<String,String> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


import static com.sun.jna.platform.win32.WinBase.STILL_ACTIVE;

public class ProcessImplForWin32 extends Process {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is there a stand-alone version for debugging on windows?(请问有没有单机版方便在windows上调测)

6 participants