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

[Dubbo-4370] Add more data to serviceMetaData #4372

Merged
merged 1 commit into from Jun 26, 2019

Conversation

vio-lin
Copy link
Contributor

@vio-lin vio-lin commented Jun 21, 2019

fix issue #4370

What is the purpose of the change

add more information to serviceMetaData.

Brief changelog

  1. Init parameters field in MethodDefinition when build ServiceDefinition
  2. Add typeBuilderName to TypeDefinition to show which builder build this type.

Verifying this change

  1. user shoule get method parameter like this
MethodDefiniton method = serviceDefitnion.getMethods().get(0);
List<TypeDefinition> types = method.getParameters();
but now shold get typeDefinition from serviceDefinition
List<String> typeNames = Arrays.asList(methodDefinition.getParameterTypes());
  List<TypeDefinition> types =  serviceDefinition.getTypes().stream().filter(a
                 - >typeNames.contains(a.getType())).collect(Collectors.toList());
  1. When typeDefinition be built,we set typeBuilderName field in TypeDefition.class.

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-io
Copy link

Codecov Report

Merging #4372 into 2.7.3-release will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##             2.7.3-release    #4372      +/-   ##
===================================================
- Coverage            62.97%   62.92%   -0.05%     
- Complexity             505      506       +1     
===================================================
  Files                  769      769              
  Lines                32995    33003       +8     
  Branches              5215     5215              
===================================================
- Hits                 20777    20767      -10     
- Misses                9822     9834      +12     
- Partials              2396     2402       +6
Impacted Files Coverage Δ Complexity Δ
...ubbo/metadata/definition/model/TypeDefinition.java 34.88% <100%> (+4.88%) 0 <0> (ø) ⬇️
.../metadata/definition/ServiceDefinitionBuilder.java 83.33% <100%> (+1.51%) 0 <0> (ø) ⬇️
...bbo/metadata/definition/TypeDefinitionBuilder.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...ache/dubbo/remoting/p2p/support/AbstractGroup.java 45.45% <0%> (-11.37%) 0% <0%> (ø)
...apache/dubbo/common/config/ConfigurationUtils.java 64% <0%> (-8%) 0% <0%> (ø)
.../apache/dubbo/remoting/transport/AbstractPeer.java 67.39% <0%> (-6.53%) 0% <0%> (ø)
...ng/transport/dispatcher/all/AllChannelHandler.java 51.42% <0%> (-5.72%) 0% <0%> (ø)
.../org/apache/dubbo/remoting/ExecutionException.java 15.78% <0%> (-5.27%) 0% <0%> (ø)
...exchange/support/header/HeaderExchangeHandler.java 64.75% <0%> (-2.46%) 0% <0%> (ø)
...pache/dubbo/registry/support/AbstractRegistry.java 80.07% <0%> (-1.54%) 0% <0%> (ø)
... and 6 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 041a6ad...216ee79. Read the comment docs.

@chickenlj chickenlj self-requested a review June 25, 2019 04:19
@vio-lin vio-lin force-pushed the modifyServiceMetadatas branch 2 times, most recently from d76b5b9 to 5242580 Compare June 25, 2019 11:23
@vio-lin
Copy link
Contributor Author

vio-lin commented Jun 25, 2019

To reduce metaData size,remove typeDefinitionlist from methodDefinition.

Copy link
Contributor

@cvictory cvictory left a comment

Choose a reason for hiding this comment

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

LGTM

@cvictory cvictory merged commit e3c35f2 into apache:2.7.3-release Jun 26, 2019
@vio-lin vio-lin deleted the modifyServiceMetadatas branch September 28, 2021 03:32
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.

None yet

3 participants