Skip to content

In the case of multiple network cards, a valid host is returned#2924

Merged
davidzollo merged 51 commits intoapache:devfrom
CalvinKirs:net
Jul 2, 2020
Merged

In the case of multiple network cards, a valid host is returned#2924
davidzollo merged 51 commits intoapache:devfrom
CalvinKirs:net

Conversation

@CalvinKirs
Copy link
Copy Markdown
Member

@CalvinKirs CalvinKirs commented Jun 7, 2020

Tips

Brief change log

In the case of multiple network cards, a valid host is returned

Verify this pull request

This pull request is already covered by existing tests, such as (please describe tests).

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 7, 2020

Codecov Report

Merging #2924 into dev will increase coverage by 0.07%.
The diff coverage is 48.35%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #2924      +/-   ##
============================================
+ Coverage     33.39%   33.47%   +0.07%     
- Complexity     2373     2390      +17     
============================================
  Files           441      442       +1     
  Lines         20518    20595      +77     
  Branches       2505     2522      +17     
============================================
+ Hits           6853     6895      +42     
- Misses        13018    13040      +22     
- Partials        647      660      +13     
Impacted Files Coverage Δ Complexity Δ
.../apache/dolphinscheduler/common/utils/OSUtils.java 47.56% <ø> (+0.53%) 23.00 <0.00> (-1.00) ⬆️
...heduler/server/master/registry/MasterRegistry.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...server/master/runner/ConditionsTaskExecThread.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...r/server/master/runner/MasterSchedulerService.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../server/worker/processor/TaskExecuteProcessor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...heduler/server/worker/registry/WorkerRegistry.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...che/dolphinscheduler/server/zk/ZKMasterClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...apache/dolphinscheduler/common/utils/NetUtils.java 53.08% <53.08%> (ø) 18.00 <18.00> (?)
.../server/master/runner/DependentTaskExecThread.java 70.32% <100.00%> (ø) 15.00 <0.00> (ø)

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 2d0fe8a...6321b5b. Read the comment docs.

public static synchronized InetAddress getLocalAddress() {

if (null != LOCAL_ADDRESS) {
return LOCAL_ADDRESS;
Copy link
Copy Markdown
Member

@gabry-lab gabry-lab Jun 13, 2020

Choose a reason for hiding this comment

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

what's purpose of this variable LOCAL_ADDRESS ? never assigned a value

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

what's purpose of this variable LOCAL_ADDRESS ? never assigned a value

Sorry, this is my oversight, I have completed the change, please review it

@davidzollo davidzollo requested a review from gabry-lab June 29, 2020 06:15
@CalvinKirs CalvinKirs changed the title In the case of multiple network cards, a valid host is returned [WIP]In the case of multiple network cards, a valid host is returned Jun 29, 2020
@CalvinKirs CalvinKirs changed the title [WIP]In the case of multiple network cards, a valid host is returned In the case of multiple network cards, a valid host is returned Jun 29, 2020
@davidzollo
Copy link
Copy Markdown
Contributor

@gabrywu , could you review this PR ?

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.

+1

@davidzollo
Copy link
Copy Markdown
Contributor

good job

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jul 2, 2020

Kudos, SonarCloud Quality Gate passed!

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

60.0% 60.0% Coverage
0.0% 0.0% Duplication

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants