Skip to content
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

Add a new Router class for making requests targeted at specified ip … #7756

Merged
merged 1 commit into from
May 19, 2021

Conversation

goodjava
Copy link
Contributor

@goodjava goodjava commented May 13, 2021

Add a new Router class for making requests targeted at specified ip and port
有时候调用需要指定ip和port,而且每次可能发生变化,比如测试调用线上指定服务器的provider
这种方式好处是比url里设定更动态一点.每次调用我都可以指定新的,并且provider不用打任何tag
vvv

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2021

Codecov Report

Merging #7756 (e851c97) into master (e419a2f) will increase coverage by 0.30%.
The diff coverage is 68.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7756      +/-   ##
============================================
+ Coverage     59.17%   59.47%   +0.30%     
- Complexity      529      557      +28     
============================================
  Files          1080     1086       +6     
  Lines         43650    43780     +130     
  Branches       6372     6385      +13     
============================================
+ Hits          25829    26039     +210     
+ Misses        14961    14874      -87     
- Partials       2860     2867       +7     
Impacted Files Coverage Δ Complexity Δ
...luster/router/address/AddressInvokersSelector.java 45.45% <45.45%> (ø) 0.00 <0.00> (?)
...ache/dubbo/rpc/cluster/router/address/Address.java 100.00% <100.00%> (ø) 0.00 <0.00> (?)
...c/cluster/router/address/AddressRouterFactory.java 100.00% <100.00%> (ø) 0.00 <0.00> (?)
...bo/rpc/cluster/support/FailbackClusterInvoker.java 52.45% <0.00%> (-18.04%) 0.00% <0.00%> (ø%)
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) 0.00% <0.00%> (ø%)
...ng/transport/dispatcher/all/AllChannelHandler.java 82.75% <0.00%> (-6.90%) 0.00% <0.00%> (ø%)
...ain/java/org/apache/dubbo/config/MethodConfig.java 95.65% <0.00%> (-3.09%) 0.00% <0.00%> (ø%)
...fig/configcenter/TreePathDynamicConfiguration.java 77.14% <0.00%> (-2.86%) 0.00% <0.00%> (ø%)
...bo/registry/client/FileSystemServiceDiscovery.java 67.44% <0.00%> (-2.33%) 0.00% <0.00%> (ø%)
...figcenter/file/FileSystemDynamicConfiguration.java 31.42% <0.00%> (-0.96%) 0.00% <0.00%> (ø%)
... and 42 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 e419a2f...e851c97. Read the comment docs.

@goodjava goodjava changed the title Add a new Invoker class for making requests targeted at specified ip … Add a new Router class for making requests targeted at specified ip … May 14, 2021
/**
* AddressRouterFactory
*/
@Activate
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can add some conditions to Activate annotation, so it can be enabled optionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get

@goodjava goodjava force-pushed the ip_port_2 branch 3 times, most recently from be6278a to 78092fe Compare May 17, 2021 07:32
/**
* AddressRouterFactory
*/
@Activate(value = {"router:address"})
Copy link
Member

Choose a reason for hiding this comment

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

can this be simplified to @Activate(value = AddressRouterFactory.NAME)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get

@AlbumenJ
Copy link
Member

LGTM.
I will merge this PR later.
In the future, we can move this implement to dubbo-spi-extension.

@AlbumenJ AlbumenJ merged commit 2c8ecb8 into apache:master May 19, 2021
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.

3 participants