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

Update #15

Merged
merged 36 commits into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8aac289
Create Contributing.md
chickenlj Oct 20, 2017
88d64d5
Delete dubbo1 rpc protocol copatipable logic
chickenlj Oct 20, 2017
4b5818f
Merge pull request #765 from hollyshi:patch-1
cuteason Oct 21, 2017
8c1cf58
Merge pull request #748 from mysqto:master
mysqto Oct 21, 2017
4bc1097
Merge pull request #755 from Elin-Zhou:master
Elin-Zhou Oct 22, 2017
02bdd04
Fix config error of heartbeat UT in dubbo-test-examples
chickenlj Oct 22, 2017
9ef40ca
Merge branch 'master' of https://github.com/alibaba/dubbo
chickenlj Oct 22, 2017
62fae04
Merge pull request #749 from Just-CJ:master
Just-CJ Oct 23, 2017
dee60b2
Open UT on travis
chickenlj Oct 23, 2017
4e4dc4d
Merge pull request #107 from sonicwu:master
sonicwu Oct 23, 2017
e4d8014
Fix all unit test case
chickenlj Oct 23, 2017
5cf778a
pull request#83: RMI协议无法传递RpcContext.attachments
beiwei30 Oct 24, 2017
6d37561
fix issue mentioned in pull request#710:
beiwei30 Oct 24, 2017
c4a6211
Fix unix test unstable in different env
chickenlj Oct 24, 2017
6adde7b
Fix unit test PortTelnetHandlerTest
chickenlj Oct 25, 2017
6a77179
Update OverrideServiceImpl.java
Technoboy- Oct 10, 2017
933caca
Close unit test ThriftProtocolTest
chickenlj Oct 25, 2017
aabcbc3
Merge pull request from #775 from hollyshi:patch-2
cuteason Oct 26, 2017
d13e09a
Upgrade webx version to fix dubbo-admin incompatible problem when run…
chickenlj Oct 26, 2017
9495a7d
Upgrade webx version to fix dubbo-admin incompatible problem when run…
chickenlj Oct 26, 2017
d323724
fix(BeanValidation): close #787
Authorlove Oct 27, 2017
209aecf
Merge pull request #776 from chickenlj:json_to_fastjson
chickenlj Oct 28, 2017
be965bf
Merge pull request #762 from chickenlj:bugfix#685_registrycache
chickenlj Oct 28, 2017
9581e0f
Merge pull request #777 from chickenlj:bugfix#672_MonitorFactory_block
chickenlj Oct 28, 2017
ee2aaf3
Ignore unit test CuratorZookeeperClientTest(no zk server)
chickenlj Oct 29, 2017
50d4ddd
Merge pull request #779 from chickenlj:xml_config
chickenlj Oct 29, 2017
1420cb4
增加MethodValidated注解的测试用例 及对MethodValidated使用场景和用法的说明注释 (#784)
zhangyinyue Oct 30, 2017
74ff1b6
Merge pull request #790 from chickenlj:bugfix_zookeeper_block
chickenlj Oct 31, 2017
1e76aee
Merge pull request #778 from chickenlj:specify_registry_ip&port
chickenlj Oct 31, 2017
cae7c4c
Fixed #796 javassist 'frozen class' error in Jvalidator cause of inco…
chickenlj Nov 2, 2017
0d2781e
fix(AbortPolicyWithReport):修复 window 平台下,文件名包含冒号导致创创 jstack 文件失败的问题
qinliujie Nov 2, 2017
48fdbb0
fix(AbstractProxyInvoker):fix NPE problem(#788)
cuteason Nov 2, 2017
93704ad
Merge pull request #805 from mercyblitz:2.5.7
mercyblitz Nov 3, 2017
ef92a29
update version to 2.5.7
chickenlj Nov 3, 2017
5cc6d8b
Support ip&port config per protocol separately
chickenlj Nov 4, 2017
e2d63ad
Complete comment
chickenlj Nov 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ jdk:
- oraclejdk8
- openjdk7

script: mvn -DskipTests=true clean package
script: mvn clean package
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

## Contributing to dubbo
Dubbo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
### Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.
### Code Conventions
Our code style is almost in line with the standard java conventions(Popular IDE's default setting satisfy this), only changed the following two restricts:
1. Classes under 'com.alibaba.*' and 'com.taobao.*' package are grouped separately, and put on top of all other 'imports'.
2. If there are more than 120 characters in current line, start a new line.

We provide a template file [dubbo_codestyle_for_idea.xml](https://github.com/alibaba/dubbo/tree/master/codestyle/dubbo_codestyle_for_idea.xml) for IntelliJ idea, you can import it to you IDE. If you use Eclipse you can config manually by referencing the same file.

* Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and a @date tag identifying birth, and preferably at least a paragraph on what the class is for.

* Add the ASF license header comment to all new .java files (copy from existing files in the project)

* Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).

* Add some Javadocs and, if you change the namespace, some XSD doc elements.

* A few unit tests should be added for a new feature or an important bugfix.

* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).

* When writing a commit message please follow these conventions, if you are fixing an existing issue please add Fixes #XXX at the end of the commit message (where XXX is the issue number).
6 changes: 5 additions & 1 deletion dubbo-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-parent</artifactId>
<version>2.5.6</version>
<version>2.5.7</version>
</parent>
<artifactId>dubbo-admin</artifactId>
<packaging>war</packaging>
Expand Down Expand Up @@ -170,6 +170,10 @@
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void enableOverride(Long id) {
return;
}

URL newOverride = oldOverride.addParameter("enabled", "enabled");
URL newOverride = oldOverride.addParameter("enabled", true);
registryService.unregister(oldOverride);
registryService.register(newOverride);

Expand Down
2 changes: 1 addition & 1 deletion dubbo-cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-parent</artifactId>
<version>2.5.6</version>
<version>2.5.7</version>
</parent>
<artifactId>dubbo-cluster</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public static URL mergeUrl(URL remoteUrl, Map<String, String> localMap) {

map.remove(Constants.ALIVE_KEY);
map.remove(Constants.DEFAULT_KEY_PREFIX + Constants.ALIVE_KEY);

map.remove(Constants.TRANSPORTER_KEY);
map.remove(Constants.DEFAULT_KEY_PREFIX + Constants.TRANSPORTER_KEY);
}

if (localMap != null && localMap.size() > 0) {
Expand All @@ -81,7 +84,10 @@ public static URL mergeUrl(URL remoteUrl, Map<String, String> localMap) {
map.put(Constants.METHODS_KEY, methods);
}
// 保留provider的启动timestamp
map.put(Constants.REMOTE_TIMESTAMP_KEY, remoteMap.get(Constants.TIMESTAMP_KEY));
String remoteTimestamp = remoteMap.get(Constants.TIMESTAMP_KEY);
if (remoteTimestamp != null && remoteTimestamp.length() > 0) {
map.put(Constants.REMOTE_TIMESTAMP_KEY, remoteMap.get(Constants.TIMESTAMP_KEY));
}
// 合并filter和listener
String remoteFilter = remoteMap.get(Constants.REFERENCE_FILTER_KEY);
String localFilter = localMap.get(Constants.REFERENCE_FILTER_KEY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.alibaba.dubbo.rpc.cluster.configurator.absent;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;

import junit.framework.Assert;
import org.junit.Test;
Expand All @@ -31,33 +32,35 @@ public class AbsentConfiguratorTest {
public void testOverride_Application() {
AbsentConfigurator configurator = new AbsentConfigurator(URL.valueOf("override://foo@0.0.0.0/com.foo.BarService?timeout=200"));

URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo"));
URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&side=consumer"));
Assert.assertNull(url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));
}

@Test
public void testOverride_Host() {
AbsentConfigurator configurator = new AbsentConfigurator(URL.valueOf("override://10.20.153.10/com.foo.BarService?timeout=200"));
AbsentConfigurator configurator = new AbsentConfigurator(URL.valueOf("override://" + NetUtils.getLocalHost() + "/com.foo.BarService?timeout=200"));

URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo"));
URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar"));
AbsentConfigurator configurator1 = new AbsentConfigurator(URL.valueOf("override://10.20.153.10/com.foo.BarService?timeout=200"));

url = configurator1.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=bar&side=consumer"));
Assert.assertNull(url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000"));
url = configurator1.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=bar&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
package com.alibaba.dubbo.rpc.cluster.configurator.override;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.rpc.cluster.configurator.absent.AbsentConfigurator;

import junit.framework.Assert;
import org.junit.Test;
Expand All @@ -31,33 +33,35 @@ public class OverrideConfiguratorTest {
public void testOverride_Application() {
OverrideConfigurator configurator = new OverrideConfigurator(URL.valueOf("override://foo@0.0.0.0/com.foo.BarService?timeout=200"));

URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo"));
URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&side=consumer"));
Assert.assertNull(url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));
}

@Test
public void testOverride_Host() {
OverrideConfigurator configurator = new OverrideConfigurator(URL.valueOf("override://10.20.153.10/com.foo.BarService?timeout=200"));
OverrideConfigurator configurator = new OverrideConfigurator(URL.valueOf("override://" + NetUtils.getLocalHost() + "/com.foo.BarService?timeout=200"));

URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo"));
URL url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000"));
url = configurator.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=foo&timeout=1000&side=consumer"));
Assert.assertEquals("200", url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar"));
AbsentConfigurator configurator1 = new AbsentConfigurator(URL.valueOf("override://10.20.153.10/com.foo.BarService?timeout=200"));

url = configurator1.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=bar&side=consumer"));
Assert.assertNull(url.getParameter("timeout"));

url = configurator.configure(URL.valueOf("dubbo://10.20.153.11:20880/com.foo.BarService?application=bar&timeout=1000"));
url = configurator1.configure(URL.valueOf("dubbo://10.20.153.10:20880/com.foo.BarService?application=bar&timeout=1000&side=consumer"));
Assert.assertEquals("1000", url.getParameter("timeout"));
}

Expand Down
3 changes: 1 addition & 2 deletions dubbo-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-parent</artifactId>
<version>2.5.6</version>
<version>2.5.7</version>
</parent>
<artifactId>dubbo-common</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -54,7 +54,6 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jvnet.sorcerer</groupId>
Expand Down
14 changes: 14 additions & 0 deletions dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,20 @@ public class Constants {

public static final String GENERIC_SERIALIZATION_BEAN = "bean";

public static final String DUBBO_IP_TO_REGISTRY = "DUBBO_IP_TO_REGISTRY";

public static final String DUBBO_PORT_TO_REGISTRY = "DUBBO_PORT_TO_REGISTRY";

public static final String DUBBO_IP_TO_BIND = "DUBBO_IP_TO_BIND";

public static final String DUBBO_PORT_TO_BIND = "DUBBO_PORT_TO_BIND";

public static final String BIND_IP_KEY = "bind.ip";

public static final String BIND_PORT_KEY = "bind.port";

public static final String REGISTER_IP_KEY = "register.ip";

/*
* private Constants(){ }
*/
Expand Down
Loading