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

Master sync #7

Merged
merged 268 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
e572f15
merge from base
Sep 4, 2018
678b3fd
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
Sep 4, 2018
fd36193
add metadata master flow
Sep 4, 2018
d3d6025
modify apache license
Sep 7, 2018
927a7e5
Fix router problems:
chickenlj Sep 7, 2018
c0be5e5
Add demo change for tagrouter
chickenlj Sep 7, 2018
6f70f03
Remove duplicate ut classes
chickenlj Sep 7, 2018
98021af
Merge branch 'dev-metadata' into dev-metadata
cvictory Sep 7, 2018
0242852
Remove duplicate ut classes
chickenlj Sep 7, 2018
75853a8
Merge branch 'master' into dev-metadata
chickenlj Sep 7, 2018
1aa9138
new pull
Sep 7, 2018
653f5e4
new pull
Sep 7, 2018
cd13f62
new pull
Sep 7, 2018
bab12d2
new pull
Sep 7, 2018
d93515a
fix review issue: english comments and class format
Sep 7, 2018
a5695af
Fix problem when rule need to run at runtime.
chickenlj Sep 7, 2018
ca057cb
Refactor dynamic config,
chickenlj Sep 9, 2018
507f5bf
Update config connecting status when ZK connection changes.
chickenlj Sep 9, 2018
4ef7f28
Fix small bugs and add comments
chickenlj Sep 9, 2018
5ab51cf
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
Sep 10, 2018
7edb71c
Fix compilation problem
chickenlj Sep 10, 2018
5fcfbce
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
Sep 10, 2018
e37319d
Support enabled property.
chickenlj Sep 11, 2018
49f1caa
Fix compilation problem
chickenlj Sep 11, 2018
0cb75df
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Sep 11, 2018
514fd4e
Support static tag group in TagRouter
chickenlj Sep 11, 2018
3747cc3
Remove useless config item in xsd
chickenlj Sep 11, 2018
612e3ac
Improve the route logic.
chickenlj Sep 11, 2018
714951a
Change for demo and test logic
chickenlj Sep 11, 2018
1af7240
modify data store
cvictory Sep 13, 2018
f532ffd
add redis service store support
cvictory Sep 14, 2018
98daa43
add test
cvictory Sep 14, 2018
d695b5e
add test on serviceStore and serviceStoreFactory
cvictory Sep 14, 2018
577eb77
Merge pull request #2468, Simplify registry data and add a new servic…
cvictory Sep 14, 2018
f8a9315
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Sep 17, 2018
fe8380f
add classinfo collect
cvictory Sep 18, 2018
9f6f0f5
add serviceStoreService test and modify the code
cvictory Sep 19, 2018
6f86a8e
add tests
cvictory Sep 20, 2018
0dac06e
add unit test
cvictory Sep 28, 2018
336ffd1
add unit test
cvictory Sep 29, 2018
00513f8
zk and redis unit test and fix some bug
cvictory Oct 9, 2018
5e3415f
fix review issue
cvictory Oct 9, 2018
d3469fd
delete class
cvictory Oct 9, 2018
462337f
remove author
cvictory Oct 11, 2018
1dc5d35
remove author
cvictory Oct 11, 2018
59dd98a
Merge pull request #2626, simplify registry data and add a new servic…
cvictory Oct 15, 2018
a69bc0a
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Oct 16, 2018
695d9f8
move getKey from RedisServiceStore to AbstractServiceStore; modify d…
cvictory Oct 16, 2018
91fddde
Improvements for dynamic config and router:
chickenlj Oct 17, 2018
44fb07f
Demo and ut changes
chickenlj Oct 17, 2018
ab2b736
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Oct 17, 2018
10b2af4
modify dubbo configuration key
cvictory Oct 17, 2018
aef5bb7
Adjust test class, remove version
chickenlj Oct 17, 2018
bfa1795
Demo, remove version
chickenlj Oct 17, 2018
515f709
Extract pom dependency version in config-dynamic.
chickenlj Oct 17, 2018
123c66d
Clear dependency of commons-lang in RegistryProtocol
chickenlj Oct 17, 2018
97836c2
Refactor the dynamic-config module to governance module
chickenlj Oct 17, 2018
e8da094
Refactor the dynamic-config module to governance module
chickenlj Oct 17, 2018
97a5825
Add test scope pom dependency
chickenlj Oct 17, 2018
9bd9563
Add test scope pom dependency
chickenlj Oct 17, 2018
ffdb46b
Rename SPI config file of governance module
chickenlj Oct 17, 2018
daf24b3
Remove provided scope restrict of commons-configuration dependency
chickenlj Oct 17, 2018
876b9d6
merge from dev-metadata
cvictory Oct 19, 2018
1646e6c
Enhancements for router chain:
chickenlj Oct 19, 2018
5194066
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Oct 22, 2018
a97bf43
renew the module name, package name, class name
cvictory Oct 22, 2018
37c22c7
Merge pull request #2672, simplify registry url: rename servicestore …
cvictory Oct 23, 2018
604439a
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Oct 23, 2018
0a29783
refactor AbstractMetadataReport
cvictory Oct 23, 2018
1e6800b
seperate retry from AbstractMetadataReport
cvictory Oct 23, 2018
de32524
Change the default root directory of zookeeper config center from '/d…
chickenlj Oct 24, 2018
413ed71
test registry group
chickenlj Oct 24, 2018
2f9dcf1
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Oct 24, 2018
ca649e3
rename the serviceStore to metadataReport; default MetadataReportFact…
cvictory Oct 24, 2018
8839c9b
Ignore invalid configurators
chickenlj Oct 24, 2018
ac13330
Rename MetadataReportFactory SPI config files
chickenlj Oct 24, 2018
f1ea451
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Oct 24, 2018
4c51b0d
fix comments
chickenlj Oct 24, 2018
8416db1
refactor the interface and import jaket source
cvictory Oct 25, 2018
2a8986a
refactor the interface and import jaket source
cvictory Oct 26, 2018
e125951
Add dynamic configuration support
chickenlj Oct 30, 2018
9af1f1a
Merge branch 'master' into dev-metadata-config-mergemaster
chickenlj Oct 30, 2018
596721d
Fix compiler error after merge master branch
chickenlj Oct 30, 2018
79812af
Enhancements for dynamic config
chickenlj Oct 30, 2018
93b1cf0
Move UT in config-api to bootstrap temporarily, to solve the unreason…
chickenlj Oct 30, 2018
e6e6689
Changes on demo, for test purpose.
chickenlj Oct 30, 2018
801eb73
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Oct 31, 2018
26f01c9
modify servicestore and refactory abstractMetadataReport
cvictory Oct 31, 2018
10bca19
add simple registry switch and metadata retry switch
cvictory Oct 31, 2018
a4db979
add simple registry switch and metadata retry switch
cvictory Oct 31, 2018
6f90215
fix compiler issue
cvictory Nov 1, 2018
033b58e
remove the group of registry from demo-provider
cvictory Nov 1, 2018
d423f55
Add xml schema and spring bean support for ConfigCenterConfig
chickenlj Nov 1, 2018
d20a6aa
Change ZooKeeper's data structure as a config center
chickenlj Nov 1, 2018
a45bfd4
Move UT in config-api to bootstrap temporarily, to solve the unreason…
chickenlj Nov 1, 2018
80f9091
Changes for demo
chickenlj Nov 1, 2018
91f1ce8
Merge pull request #2721, Refactor , add switch to simplify registry …
cvictory Nov 1, 2018
8600ae4
remove dependent and import
cvictory Nov 1, 2018
65450f5
Merge url part from cvictory and fix configuration override problems
chickenlj Nov 1, 2018
b727c87
Merge url part from cvictory and fix configuration override problems
chickenlj Nov 1, 2018
a41930e
merge dev-metadata
cvictory Nov 1, 2018
61bdd46
make demo work
cvictory Nov 2, 2018
201d1f3
Add app level configuration file; Unified group and namespace in diff…
chickenlj Nov 5, 2018
90a9134
merge dev-metadata from upstream and refactor zk store
cvictory Nov 5, 2018
4b68368
Demo changes.
chickenlj Nov 5, 2018
6b4bae0
merge dev-metadata and add unit test
cvictory Nov 5, 2018
4097405
Add spring annotation support for ConfigCenter.
chickenlj Nov 6, 2018
220c9da
cherry-pick 4d0a36c435ca59bfcf909c0e76fa2ab024fb7408 from master
code4wt Oct 30, 2018
9d37574
remove origin metadata code , add new metadata test, add generic test…
cvictory Nov 6, 2018
c064b0a
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Nov 6, 2018
8f498c9
if no metadata config address, config the log level to warn
cvictory Nov 6, 2018
072b51e
Merge pull request #2744, metadata unit test and generic test, refact…
cvictory Nov 6, 2018
bc9cf99
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Nov 6, 2018
22599b9
Make ReferenceBean depend on ConfigCenterBean, so that ConfigCenterBe…
chickenlj Nov 7, 2018
d85550a
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 7, 2018
546b135
override url in directory
chickenlj Nov 7, 2018
c5bc3bc
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Nov 7, 2018
708cdb5
Remove default group in DynamicConfiguration API
chickenlj Nov 8, 2018
ebb7dd7
Fix problem when parsing override rule
chickenlj Nov 8, 2018
d8db928
fix :dubbo.properties cannot work on MetadataReportConfig
cvictory Nov 8, 2018
efacb58
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
cvictory Nov 8, 2018
42fac3e
Fix subscribe and parse problems with override protocol.
chickenlj Nov 9, 2018
3d79fe0
Add enabled=true check for override url.
chickenlj Nov 9, 2018
e2f664f
record init status.
chickenlj Nov 12, 2018
60b1342
support accepting external configuration from application.
chickenlj Nov 13, 2018
b787ab7
Move refresh action of configs from Spring bean to a Config API.
chickenlj Nov 13, 2018
b7e8b1e
Merge branch 'dev-metadata-spring-environment' into dev-metadata
chickenlj Nov 13, 2018
bdfc500
Fix NPE in TagRouter
chickenlj Nov 13, 2018
042ab09
support standard spring PropertySource
chickenlj Nov 13, 2018
29ef73f
refactor the simplified, add some unit test, fix issue.
cvictory Nov 14, 2018
21b4334
Merge branch 'dev-metadata' of github.com:apache/incubator-dubbo into…
cvictory Nov 14, 2018
e3916ef
add cluster-style address support for configcenter
chickenlj Nov 15, 2018
d11b876
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 15, 2018
dbca54c
Merge branch 'master' into dev-metadata
chickenlj Nov 15, 2018
0d0c955
solve dubbo-bootstrap conficts after merged master
chickenlj Nov 15, 2018
5f0d8c8
change how DynamicConfiguration instance is fetched.
chickenlj Nov 15, 2018
46a0580
fix ut
chickenlj Nov 15, 2018
dc23a34
Add pom dependency
chickenlj Nov 15, 2018
a3f9a54
change log level to info
chickenlj Nov 15, 2018
453e323
ignore parameter(exclude=true).
chickenlj Nov 15, 2018
e430443
modify the variable name and support springbean configuration
cvictory Nov 15, 2018
1a8e8b1
Merge branch 'dev-metadata' of github.com:apache/incubator-dubbo into…
cvictory Nov 15, 2018
2e9e85a
avoid repeat init of dynamicconfiguration
chickenlj Nov 15, 2018
92e8825
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 15, 2018
3de0ec0
Restore the previous behaviour
chickenlj Nov 15, 2018
6999c6a
refactor override rule
chickenlj Nov 16, 2018
0a4cce7
rename module name from governance to configcenter
chickenlj Nov 17, 2018
a3215cb
refactor governance to configcenter
chickenlj Nov 17, 2018
c880720
if the registry type is zookeeper, use the address as default configc…
chickenlj Nov 19, 2018
0aebefe
modify consumer metadatareport: param type from string to map
cvictory Nov 20, 2018
1ab215e
add dubbo specification version into registry for ops
cvictory Nov 20, 2018
51146f7
Split the Environment into two parts: Environment in Common and Confi…
chickenlj Nov 20, 2018
912498a
empty rule protection: "" should not be treated as delete.
chickenlj Nov 20, 2018
701cf26
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 20, 2018
3845d78
add apiVersion to override url
chickenlj Nov 20, 2018
ecc34c2
Fix reExport, check url to registry changed before do register.
chickenlj Nov 20, 2018
740b5aa
remove unnecessary volatile restrict
chickenlj Nov 21, 2018
9f02b97
Fix configurator bug
chickenlj Nov 21, 2018
6140bc2
Fix concurrent problem of zookeeper configcenter, wait to start until…
chickenlj Nov 21, 2018
6a1b9ee
Merge pull request #2810, code review and refactor for dubbo-configce…
beiwei30 Nov 21, 2018
607af9d
Merge pull request #2817, code review for dubbo-configcente.
beiwei30 Nov 22, 2018
65e1640
support ops; modify properties with split -, fix issue
cvictory Nov 22, 2018
7adf111
Merge pull request #2818, code review for AbstractConfig.
beiwei30 Nov 22, 2018
1bebd2d
Fix problems in Configuration: remove cache usage in startupComposite…
chickenlj Nov 22, 2018
1e28f7a
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 22, 2018
2d7b8c1
Add extra type match check when override config value.
chickenlj Nov 22, 2018
773d7f4
Fix small bugs find in UT
chickenlj Nov 22, 2018
3dfa8d2
Code review around Environment, AbstractConfig, and AbstractPrefixCon…
beiwei30 Nov 23, 2018
da978fd
does not use parameter key in config metadata
chickenlj Nov 23, 2018
720784c
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 23, 2018
8f40549
add missing return statement.
chickenlj Nov 23, 2018
8d8aed2
Merge pull request #2823, Code review for ConfigurationUtils and Envi…
beiwei30 Nov 23, 2018
3206dba
store DynamicConfiguration reference in Environment
chickenlj Nov 23, 2018
b9ce4a4
Add UT for Configuration
chickenlj Nov 24, 2018
6f61822
try different zookeeper implementations
chickenlj Nov 27, 2018
bc3086e
add unit tests
chickenlj Nov 27, 2018
d4156cc
upgrade curator version
chickenlj Nov 27, 2018
d9e0b64
save one zookeeper implementation as default
chickenlj Nov 27, 2018
0fb3657
temporarily close checkstyle on importing orders
chickenlj Nov 28, 2018
d39343e
adjust zookeeper dependency
chickenlj Nov 28, 2018
23f0e52
fix NPE when no listeners registered for key
chickenlj Nov 29, 2018
4700f2c
create separate RouterChain for StaticDirectory
chickenlj Nov 29, 2018
a1b9e0a
fix ut
chickenlj Nov 29, 2018
8465e9a
add Apache license
chickenlj Nov 29, 2018
719b5a3
reformat code
chickenlj Nov 29, 2018
7101b6b
reformat code
chickenlj Nov 29, 2018
abb62c8
add dependency into dubbo.jar
cvictory Nov 29, 2018
14d1f97
optimize dynamic configuration api
chickenlj Nov 29, 2018
83a27e8
rename
chickenlj Nov 29, 2018
8f9a76e
Merge branch 'dev-metadata' of https://github.com/apache/incubator-du…
chickenlj Nov 29, 2018
38a8fad
add fixme comment
chickenlj Nov 29, 2018
00b15a4
refactor config-center implementation
chickenlj Dec 3, 2018
cc943d3
fix unit test
cvictory Dec 3, 2018
52a325d
Merge pull request #2872, refactor config-center implementation.
chickenlj Dec 3, 2018
c2b34c8
unit test
cvictory Dec 3, 2018
7473662
app level override rule should only generate one url
chickenlj Dec 3, 2018
25080d3
add `dubbo.` prefix for tag router key
chickenlj Dec 3, 2018
92c721b
Merge remote-tracking branch 'origin/dev-metadata' into dev-metadata
chickenlj Dec 3, 2018
6081c9e
add log for rule notification.
chickenlj Dec 3, 2018
dfdd424
remove useless file
chickenlj Dec 3, 2018
2b01e0c
Merge branch 'dev-metadata' of github.com:apache/incubator-dubbo into…
cvictory Dec 4, 2018
b01e251
fix problem when creating router chain for StaticDirectory (consume m…
chickenlj Dec 4, 2018
5a9406c
modify metadata store from sync to async
cvictory Dec 5, 2018
d40beeb
add licence
cvictory Dec 5, 2018
85eb412
remove chinese comments
cvictory Dec 5, 2018
e0bd630
fix unit test
cvictory Dec 5, 2018
0d3c0da
fix unit test and add licence
cvictory Dec 6, 2018
48e482e
[DOCS]:[fix comment statement and reformat code] (#2844)
Ivan97 Dec 7, 2018
d4d827e
remove Provider and ConsumerMetataIdentifier
cvictory Dec 10, 2018
368a59e
Release resource after use in ConfigParserTest (#2905)
biyuhao Dec 10, 2018
c94ac7a
Optimize ConfigCenter api and implementation
chickenlj Dec 17, 2018
6007fd3
Optimize service governance:
chickenlj Dec 17, 2018
0a2aab8
support using multi registries/protocols in config center.
chickenlj Dec 17, 2018
e425767
fix problem of governance: configurator & router
chickenlj Dec 17, 2018
e86b89c
resolve conflicts
chickenlj Dec 17, 2018
f92f00f
use asyncInterfaceClass
chickenlj Dec 17, 2018
c8c5b3d
make sure compatible Router works fine
chickenlj Dec 17, 2018
67c8718
Refactor, put overrides related to Config Center inside Configuration…
chickenlj Dec 18, 2018
c0b277c
generate a empty list for invokerUrls in refreshInvoker if it's null
chickenlj Dec 18, 2018
5b1b14d
set reg status to true after reExport
chickenlj Dec 18, 2018
859efef
Added UT for dubbo-rpc-api module (#3010)
khanimteyaz Dec 19, 2018
455943f
add fault tolerant code to avoid NPE
chickenlj Dec 19, 2018
47213f4
fix wrong invokers reference to StaticDirectory under multi-group
chickenlj Dec 19, 2018
5d690d9
add comment
chickenlj Dec 19, 2018
1a06874
Removing null validation because a null check is not needed before us…
sergioescala Dec 20, 2018
275635e
unify the config key format, sth like:
chickenlj Dec 20, 2018
5c2293d
fix UT compile error
chickenlj Dec 20, 2018
fdc9202
update demo
chickenlj Dec 20, 2018
d962113
fix NPE
chickenlj Dec 20, 2018
fae5fa8
update dependencies in readme (#3028)
beiwei30 Dec 20, 2018
3e6ae66
Fixing typos (#3030)
sergioescala Dec 21, 2018
69e7204
[DUBBO-3023]: problem in ActiveLimitFilter (#3035)
beiwei30 Dec 21, 2018
678cdb4
[DUBBO-2988] Unrecognized the other provider (#3013)
beiwei30 Dec 21, 2018
4bd2ed4
unify config format.
chickenlj Dec 22, 2018
5184416
fix busy loop caused by singledThreadExecutor
chickenlj Dec 22, 2018
b132451
Merge branch 'dev-metadata'
chickenlj Dec 23, 2018
ac31d4f
fix compile error.
chickenlj Dec 23, 2018
cedba72
fix UT
chickenlj Dec 23, 2018
a35f942
'continue' statement is unnecessary as the last statement in a loop (…
sergioescala Dec 24, 2018
411abe9
make condition router enabled by default.
chickenlj Dec 24, 2018
96dffe3
set all router rule enabled by default
chickenlj Dec 24, 2018
9897aa3
remove appConfigs cache to support one service/reference registered m…
chickenlj Dec 24, 2018
c20164e
fix wrong reference
chickenlj Dec 24, 2018
b88bf3a
Merge branch 'master' of https://github.com/apache/incubator-dubbo
chickenlj Dec 24, 2018
2e73d45
Ignore ut temporarily
chickenlj Dec 24, 2018
669705c
Fix FailbackClusterInvoker one risk of memory leak #2425 (#2822)
wangweiufofly Dec 25, 2018
2a763b9
Fix UT
chickenlj Dec 25, 2018
ddf0cba
merge UT into one file
chickenlj Dec 25, 2018
e3f5773
readability enhancement and assert check for proxy object (#3048)
khanimteyaz Dec 25, 2018
7d3c6bc
Optimization code (#3054)
wangweiufofly Dec 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,33 @@ There's a [README](https://github.com/dubbo/dubbo-samples/blob/master/dubbo-samp
### Maven dependency

```xml
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.5</version>
</dependency>
<properties>
<dubbo.version>2.6.5</dubbo.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-dependencies-bom</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
</dependencies>
```

### Define service interfaces
Expand Down
10 changes: 5 additions & 5 deletions codestyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<module name="OuterTypeFilename"/>
<module name="UnusedImports"/>

<module name="CustomImportOrder">
<property name="specialImportsRegExp" value="org.apache.dubbo.*"/>
<property name="sortImportsInGroupAlphabetically" value="false"/>
<property name="customImportOrderRules" value="SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/>
</module>
<!--<module name="CustomImportOrder">-->
<!--<property name="specialImportsRegExp" value="org.apache.dubbo.*"/>-->
<!--<property name="sortImportsInGroupAlphabetically" value="false"/>-->
<!--<property name="customImportOrderRules" value="SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/>-->
<!--</module>-->
</module>
</module>
57 changes: 57 additions & 0 deletions dubbo-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,27 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-zookeeper</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-apollo</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-compatible</artifactId>
Expand All @@ -338,6 +359,28 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- metadata -->
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-zookeeper</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-redis</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<!-- Transitive dependencies -->
<dependency>
Expand Down Expand Up @@ -432,6 +475,15 @@
<include>org.apache.dubbo:dubbo-serialization-kryo</include>
<include>org.apache.dubbo:dubbo-serialization-jdk</include>
<include>org.apache.dubbo:dubbo-serialization-protostuff</include>
<include>org.apache.dubbo:dubbo-configcenter-api</include>
<include>org.apache.dubbo:dubbo-configcenter-definition</include>
<include>org.apache.dubbo:dubbo-configcenter-apollo</include>
<include>org.apache.dubbo:dubbo-configcenter-zookeeper</include>
<include>org.apache.dubbo:dubbo-metadata-report-api</include>
<include>org.apache.dubbo:dubbo-metadata-definition</include>
<include>org.apache.dubbo:dubbo-metadata-report-redis</include>
<include>org.apache.dubbo:dubbo-metadata-report-zookeeper</include>
<include>com.google.code.gson:gson</include>
</includes>
</artifactSet>
<transformers>
Expand Down Expand Up @@ -549,6 +601,11 @@
<resource>META-INF/dubbo/internal/org.apache.dubbo.qos.command.BaseCommand
</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.configcenter.DynamicConfiguration
</resource>
</transformer>
</transformers>
</configuration>
</execution>
Expand Down
35 changes: 35 additions & 0 deletions dubbo-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,41 @@
<artifactId>dubbo-compatible</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-report-redis</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-apollo</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metadata-definition</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
20 changes: 20 additions & 0 deletions dubbo-cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,25 @@
<artifactId>dubbo-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-configcenter-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.cluster;

import org.apache.dubbo.common.URL;

/**
*
*/
public abstract class AbstractAppRouterFactory implements RouterFactory {
private Router router;

@Override
public Router getRouter(URL url) {
if (router != null) {
return router;
}
synchronized (this) {
if (router == null) {
router = createRouter(url);
}
}
return router;
}

protected abstract Router createRouter(URL url);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.cluster;

import org.apache.dubbo.common.URL;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
* If you want to provide a Router implementation based on design of v2.7.0, please extend from this abstract class.
* For 2.6.x style Router, please implement and use RouterFactory directly.
*/
public abstract class AbstractRouterFactory implements RouterFactory {
private ConcurrentMap<String, Router> routerMap = new ConcurrentHashMap<>();

@Override
public Router getRouter(URL url) {
routerMap.computeIfAbsent(url.getServiceKey(), k -> createRouter(url));
return routerMap.get(url.getServiceKey());
}

protected abstract Router createRouter(URL url);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
*/
package org.apache.dubbo.rpc.cluster;

import org.apache.dubbo.common.Constants;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.utils.CollectionUtils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
* Configurator. (SPI, Prototype, ThreadSafe)
Expand All @@ -40,4 +50,42 @@ public interface Configurator extends Comparable<Configurator> {
*/
URL configure(URL url);


/**
* Convert override urls to map for use when re-refer.
* Send all rules every time, the urls will be reassembled and calculated
*
* @param urls Contract:
* </br>1.override://0.0.0.0/...( or override://ip:port...?anyhost=true)&para1=value1... means global rules (all of the providers take effect)
* </br>2.override://ip:port...?anyhost=false Special rules (only for a certain provider)
* </br>3.override:// rule is not supported... ,needs to be calculated by registry itself.
* </br>4.override://0.0.0.0/ without parameters means clearing the override
* @return
*/
static Optional<List<Configurator>> toConfigurators(List<URL> urls) {
if (CollectionUtils.isEmpty(urls)) {
return Optional.empty();
}

ConfiguratorFactory configuratorFactory = ExtensionLoader.getExtensionLoader(ConfiguratorFactory.class)
.getAdaptiveExtension();

List<Configurator> configurators = new ArrayList<Configurator>(urls.size());
for (URL url : urls) {
if (Constants.EMPTY_PROTOCOL.equals(url.getProtocol())) {
configurators.clear();
break;
}
Map<String, String> override = new HashMap<String, String>(url.getParameters());
//The anyhost parameter of override may be added automatically, it can't change the judgement of changing url
override.remove(Constants.ANYHOST_KEY);
if (override.size() == 0) {
configurators.clear();
continue;
}
configurators.add(configuratorFactory.getConfigurator(url));
}
Collections.sort(configurators);
return Optional.of(configurators);
}
}
Loading