[1/2] incubator-rocketmq git commit: ROCKETMQ-18 Clean code closes apache/incubator-rocketmq#21
Repository: incubator-rocketmq Updated Branches: refs/heads/master 667225688 -> 167cce034 http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/167cce03/example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java -- diff --git a/example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java b/example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java index f28bffe..d9fafdd 100644 --- a/example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java +++ b/example/src/main/java/org/apache/rocketmq/example/benchmark/TransactionProducer.java @@ -43,8 +43,8 @@ public class TransactionProducer { public static void main(String[] args) throws MQClientException, UnsupportedEncodingException { threadCount = args.length >= 1 ? Integer.parseInt(args[0]) : 32; messageSize = args.length >= 2 ? Integer.parseInt(args[1]) : 1024 * 2; -ischeck = args.length >= 3 ? Boolean.parseBoolean(args[2]) : false; -ischeckffalse = args.length >= 4 ? Boolean.parseBoolean(args[3]) : false; +ischeck = args.length >= 3 && Boolean.parseBoolean(args[2]); +ischeckffalse = args.length >= 4 && Boolean.parseBoolean(args[3]); final Message msg = buildMessage(messageSize); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/167cce03/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java -- diff --git a/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java b/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java index 52b7653..6a6bdc7 100644 --- a/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java +++ b/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java @@ -54,13 +54,7 @@ public class Producer { } producer.shutdown(); -} catch (MQClientException e) { -e.printStackTrace(); -} catch (RemotingException e) { -e.printStackTrace(); -} catch (MQBrokerException e) { -e.printStackTrace(); -} catch (InterruptedException e) { +} catch (MQClientException | RemotingException | MQBrokerException | InterruptedException e) { e.printStackTrace(); } } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/167cce03/example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java -- diff --git a/example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java b/example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java index 7833576..edfad24 100644 --- a/example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java +++ b/example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java @@ -45,9 +45,7 @@ public class TransactionProducer { System.out.printf("%s%n", sendResult); Thread.sleep(10); -} catch (MQClientException e) { -e.printStackTrace(); -} catch (UnsupportedEncodingException e) { +} catch (MQClientException | UnsupportedEncodingException e) { e.printStackTrace(); } } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/167cce03/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java -- diff --git a/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java b/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java index 3446260..69b64ca 100644 --- a/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java +++ b/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java @@ -279,12 +279,10 @@ public class RouteInfoManager { try { this.lock.writeLock().lockInterruptibly(); BrokerLiveInfo brokerLiveInfo = this.brokerLiveTable.remove(brokerAddr); -if (brokerLiveInfo != null) { -log.info("unregisterBroker, remove from brokerLiveTable {}, {}", +log.info("unregisterBroker, remove from brokerLiveTable {}, {}", brokerLiveInfo != null ? "OK" : "Failed", brokerAddr -); -} +); this.filterServerTable.remove(brokerAddr);
incubator-rocketmq git commit: closes apache/incubator-rocketmq#15 *Won't fix: About config module, we would refactor here in the latest release version*
Repository: incubator-rocketmq Updated Branches: refs/heads/master f9d90201d -> b2ed298c7 closes apache/incubator-rocketmq#15 *Won't fix: About config module, we would refactor here in the latest release version* Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/b2ed298c Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/b2ed298c Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/b2ed298c Branch: refs/heads/master Commit: b2ed298c79a9df441d02ae99b5917b72ee78c6e5 Parents: f9d9020 Author: lollipop <lolli...@apache.org> Authored: Thu Dec 29 14:44:43 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Thu Dec 29 14:44:43 2016 +0800 -- --
incubator-rocketmq-site git commit: update team info
Repository: incubator-rocketmq-site Updated Branches: refs/heads/master 7885a8d47 -> dbcd745d3 update team info Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/commit/dbcd745d Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/dbcd745d Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/dbcd745d Branch: refs/heads/master Commit: dbcd745d351dbd2ba74263df8e5a342a58885308 Parents: 7885a8d Author: lollipop <lolli...@apache.org> Authored: Fri Dec 30 10:24:02 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Fri Dec 30 10:24:02 2016 +0800 -- _about/01-team.md | 2 +- assets/images/about/jmclean.jpeg | Bin 3768 -> 0 bytes assets/images/about/justinmclean.jpeg | Bin 0 -> 56228 bytes content/about/contact/index.html | 2 +- content/about/team/index.html | 6 +++--- content/assets/images/about/jmclean.jpeg | Bin 3768 -> 0 bytes content/assets/images/about/justinmclean.jpeg | Bin 0 -> 56228 bytes content/docs/best-practice-broker/index.html | 2 +- content/docs/best-practice-consumer/index.html | 2 +- content/docs/best-practice-namesvr/index.html | 2 +- content/docs/best-practice-producer/index.html | 2 +- content/docs/cli-admin-tool/index.html | 2 +- content/docs/cluster-deployment/index.html | 2 +- content/docs/code-guidelines/index.html| 2 +- content/docs/core-concept/index.html | 2 +- content/docs/faq/index.html| 2 +- content/docs/motivation/index.html | 2 +- content/docs/pull-request/index.html | 2 +- content/docs/quick-start/index.html| 2 +- content/feed.xml | 2 +- 20 files changed, 18 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/dbcd745d/_about/01-team.md -- diff --git a/_about/01-team.md b/_about/01-team.md index 151801e..29d29f4 100644 --- a/_about/01-team.md +++ b/_about/01-team.md @@ -18,7 +18,7 @@ The following is a list of developers with commit privileges that have directly |![brian](/assets/images/about/brianm.jpeg)|brianm| [@brianm](https://github.com/brianm)|bri...@apache.org |Mentor/PMC Member| -8 | |![WillemJiang](/assets/images/about/WillemJiang.jpeg)|nianjiang| [@WillemJiang](https://github.com/WillemJiang)|nianji...@apache.org |Mentor/PMC Member| +8 | |![lukehan](/assets/images/about/lukehan.jpeg)|lukehan| [@lukehan](https://github.com/lukehan)|luke...@apache.org |Mentor/PMC Member| +8 | -|![jmclean](/assets/images/about/jmclean.jpeg)|jmclean| [@jmclean](https://github.com/jmclean)|jmcl...@apache.org |Mentor/PMC Member| +11 | +|![justinmclean](/assets/images/about/justinmclean.jpeg)|jmclean| [@justinmclean](https://github.com/justinmclean)|jmcl...@apache.org |Mentor/PMC Member| +11 | |![vongosling](/assets/images/about/vongosling.jpeg)|vongosling|[@vongosling](https://github.com/vongosling)|vongosl...@apache.org |Committer/PMC Member| +8 | |![vintagewang](/assets/images/about/vintagewang.jpeg)|vintagewang|[@vintagewang](https://github.com/vintagewang)|vintagew...@apache.org |Committer/PMC Member| +8 | |![zhouxinyu](/assets/images/about/zhouxinyu.png)|yukon|[@zhouxinyu](https://github.com/zhouxinyu)|yu...@apache.org |Committer/PMC Member| +8 | http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/dbcd745d/assets/images/about/jmclean.jpeg -- diff --git a/assets/images/about/jmclean.jpeg b/assets/images/about/jmclean.jpeg deleted file mode 100644 index d696177..000 Binary files a/assets/images/about/jmclean.jpeg and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/dbcd745d/assets/images/about/justinmclean.jpeg -- diff --git a/assets/images/about/justinmclean.jpeg b/assets/images/about/justinmclean.jpeg new file mode 100644 index 000..81e128d Binary files /dev/null and b/assets/images/about/justinmclean.jpeg differ http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/dbcd745d/content/about/contact/index.html -- diff --git a/content/about/contact/index.html b/content/about/contact/index.html index e4bc65c..f8f6ce3 100644 --- a/content/about/contact/index.html +++ b/content/about/contact/index.html @@ -57,7 +57,7 @@ - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/
[2/2] incubator-rocketmq-site git commit: update team page
update team page Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/commit/426d5709 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/426d5709 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/426d5709 Branch: refs/heads/master Commit: 426d5709c4d191ec8ba7c9f5bf0a03387d48045b Parents: 7108bb3 Author: lollipop <lolli...@apache.org> Authored: Fri Dec 30 16:33:14 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Fri Dec 30 16:33:14 2016 +0800 -- _about/01-team.md | 4 ++-- content/about/contact/index.html | 2 +- content/about/team/index.html | 6 +++--- content/docs/best-practice-broker/index.html | 2 +- content/docs/best-practice-consumer/index.html | 2 +- content/docs/best-practice-namesvr/index.html | 2 +- content/docs/best-practice-producer/index.html | 2 +- content/docs/cli-admin-tool/index.html | 2 +- content/docs/cluster-deployment/index.html | 2 +- content/docs/code-guidelines/index.html| 2 +- content/docs/core-concept/index.html | 2 +- content/docs/faq/index.html| 2 +- content/docs/motivation/index.html | 2 +- content/docs/pull-request/index.html | 2 +- content/docs/quick-start/index.html| 2 +- content/feed.xml | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/426d5709/_about/01-team.md -- diff --git a/_about/01-team.md b/_about/01-team.md index 29d29f4..659225d 100644 --- a/_about/01-team.md +++ b/_about/01-team.md @@ -5,14 +5,14 @@ excerpt: "Project team." modified: 2016-12-28T19:55:43-04:00 --- -The RocketMQ team is comprised of Members and Contributors. Members have direct access to the source of RocketMQ project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to RocketMQ are greatly appreciated. +The RocketMQ team is comprised of Members and Contributors. Members have direct access to the source of RocketMQ project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to RocketMQ are greatly appreciated, whether for trivial cleanups, big new features or other material rewards. More details see [here](https://github.com/apache/incubator-rocketmq/blob/master/CONTRIBUTING.md). ### Members The following is a list of developers with commit privileges that have directly contributed to the project in one way or another. -|Image| Id| Github Id | Email |Roles| Time Zone| +|Image| Id| Github Id | Email |[Roles](https://www.apache.org/foundation/how-it-works.html#roles)| Time Zone| |:---|:---|:---|:---|:---|:---| |![bsnyde](/assets/images/about/bsnyder.jpeg)|bsnyder| [@bsnyder](https://github.com/bsnyder)|bsny...@apache.org |Mentor/PMC Member| -7 | |![brian](/assets/images/about/brianm.jpeg)|brianm| [@brianm](https://github.com/brianm)|bri...@apache.org |Mentor/PMC Member| -8 | http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/426d5709/content/about/contact/index.html -- diff --git a/content/about/contact/index.html b/content/about/contact/index.html index e2c3a7e..f51740e 100644 --- a/content/about/contact/index.html +++ b/content/about/contact/index.html @@ -57,7 +57,7 @@ - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/426d5709/content/about/team/index.html -- diff --git a/content/about/team/index.html b/content/about/team/index.html index 9b7d737..6054ac0 100644 --- a/content/about/team/index.html +++ b/content/about/team/index.html @@ -57,7 +57,7 @@ - + @@ -208,7 +208,7 @@ -The RocketMQ team is comprised of Members and Contributors. Members have direct access to the source of RocketMQ project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to RocketMQ are greatly appreciated. +The RocketMQ team is comprised of Members and Contributors. Members have direct access to the source of RocketMQ project and actively
[1/2] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master' [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master 372900973 -> 0ff328fc4 (forced update) Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/0ff328fc Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/0ff328fc Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/0ff328fc Branch: refs/heads/master Commit: 0ff328fc4acc34aa70640c8aa46b7febe88740c2 Parents: 5dcf557 c4a2a5e Author: lollipop <vongosl...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <vongosl...@apache.org> Committed: Tue Dec 20 11:02:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[2/2] incubator-rocketmq git commit: Remove native characters in README. reviewed by @vongosling
Remove native characters in README. reviewed by @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/c4a2a5e0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/c4a2a5e0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/c4a2a5e0 Branch: refs/heads/master Commit: c4a2a5e0960d2ed1a952cf6485d6b07904f8886c Parents: 2e95422 Author: stevenschew <stevensc...@apache.org> Authored: Tue Dec 20 10:16:13 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 12:09:41 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c4a2a5e0/bin/README.md -- diff --git a/bin/README.md b/bin/README.md index 58903a1..d028475 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,34 +1,37 @@ -### æä½ç³»ç»è°ä¼ -å¨ç产ç¯å¢é¨ç½²Brokeråï¼å¿ é¡»è¦æ§è¡os.shï¼å¯¹æä½ç³»ç»è¿è¡è°ä¼ +### Operating system tuning +Before the broker deployment, you must run **os.sh**, which is optimized for your operating system. -**P.S: os.shåªè½æ§è¡ä¸æ¬¡ï¼éè¦sudo rootæé** +## Notice +### os.sh should be executed only once with the root permission. +### os.sh parameter settings is just for reference. You can tune it in your target host systems. -### å¯å¨broker -* Unixå¹³å° - `nohup sh mqbroker &` +### Start broker +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqbroker &` - `mqbroker.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³ébroker - sh mqshutdown broker + `mqbroker.exe` -### å¯å¨Name Server -* Unixå¹³å° +### Shutodwn broker + sh mqshutdown broker - `nohup sh mqnamesrv &` +### Start Nameserver +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqnamesrv &` - `mqnamesrv.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³éName Server - sh mqshutdown namesrv + `mqnamesrv.exe` -### æ´æ°æå建Topic - sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA +### Shutdown Nameserver +sh mqshutdown namesrv -### æ´æ°æå建订é ç» - sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file +### Update or create Topic +sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA + +### Update or create subscription group +sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file
[5/5] incubator-rocketmq git commit: Remove independent mysql jdbc driver statement. reviewed by @zhouxinyu
Remove independent mysql jdbc driver statement. reviewed by @zhouxinyu Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/c8181981 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/c8181981 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/c8181981 Branch: refs/heads/master Commit: c81819813ab502cd99caaf1aeae466894e2fcd1d Parents: c01a7fd Author: vongosling <vongosl...@apache.org> Authored: Mon Dec 19 20:18:19 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 14:08:09 2016 +0800 -- NOTICE | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c8181981/NOTICE -- diff --git a/NOTICE b/NOTICE index 913ef38..fea5b4c 100644 --- a/NOTICE +++ b/NOTICE @@ -2,7 +2,4 @@ RocketMQ Copyright 2016 Alibaba Group. This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -This distribution has producerGroup binary dependency on mysql-connector-java, which is available under gpl 2.0. -The source code of mysql-connector-java can be found at http://dev.mysql.com/downloads/connector/reconsumeTimes/. \ No newline at end of file +The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file
[4/5] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/f4a39870 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/f4a39870 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/f4a39870 Branch: refs/heads/master Commit: f4a39870ae4050c6e513481efeea541cefb8b5f1 Parents: 0eff1f2 b72519d Author: lollipop <lolli...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 14:01:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[2/2] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/7dc15722 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/7dc15722 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/7dc15722 Branch: refs/heads/master Commit: 7dc15722950e101a7e6cd2f0327b319ec6c1f473 Parents: 07af6af 5e076ea Author: lollipop <lolli...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 14:01:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[1/2] incubator-rocketmq git commit: Revert SendMessageRequestHeaderV2. Reviewed by @vintagewang @vongosling [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master 197f93714 -> 836c40d55 (forced update) Revert SendMessageRequestHeaderV2. Reviewed by @vintagewang @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/836c40d5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/836c40d5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/836c40d5 Branch: refs/heads/master Commit: 836c40d55aeff87b54e8aa6c4595dcbfb1ab6c87 Parents: 7dc1572 Author: yukonAuthored: Tue Dec 20 12:56:56 2016 +0800 Committer: yukon Committed: Tue Dec 20 12:59:25 2016 +0800 -- .../header/SendMessageRequestHeaderV2.java | 171 ++- 1 file changed, 86 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/836c40d5/rocketmq-common/src/main/java/com/alibaba/rocketmq/common/protocol/header/SendMessageRequestHeaderV2.java -- diff --git a/rocketmq-common/src/main/java/com/alibaba/rocketmq/common/protocol/header/SendMessageRequestHeaderV2.java b/rocketmq-common/src/main/java/com/alibaba/rocketmq/common/protocol/header/SendMessageRequestHeaderV2.java index dadf4bf..6ce4cd5 100644 --- a/rocketmq-common/src/main/java/com/alibaba/rocketmq/common/protocol/header/SendMessageRequestHeaderV2.java +++ b/rocketmq-common/src/main/java/com/alibaba/rocketmq/common/protocol/header/SendMessageRequestHeaderV2.java @@ -24,65 +24,66 @@ import com.alibaba.rocketmq.remoting.exception.RemotingCommandException; /** + * Use short variable name to speed up FastJson deserialization process. * @author shijia.wxr */ public class SendMessageRequestHeaderV2 implements CommandCustomHeader { @CFNotNull -private String producerGroup; +private String a; // producerGroup; @CFNotNull -private String topic; +private String b; // topic; @CFNotNull -private String defaultTopic; +private String c; // defaultTopic; @CFNotNull -private Integer defaultTopicQueueNums; +private Integer d; // defaultTopicQueueNums; @CFNotNull -private Integer queueId; +private Integer e; // queueId; @CFNotNull -private Integer sysFlag; +private Integer f; // sysFlag; @CFNotNull -private Long bornTimestamp; +private Long g; // bornTimestamp; @CFNotNull -private Integer flag; +private Integer h; // flag; @CFNullable -private String properties; +private String i; // properties; @CFNullable -private Integer reconsumeTimes; +private Integer j; // reconsumeTimes; @CFNullable -private boolean unitMode; +private boolean k; // unitMode = false; -private Integer consumeRetryTimes; +private Integer l; // consumeRetryTimes public static SendMessageRequestHeader createSendMessageRequestHeaderV1(final SendMessageRequestHeaderV2 v2) { SendMessageRequestHeader v1 = new SendMessageRequestHeader(); -v1.setProducerGroup(v2.producerGroup); -v1.setTopic(v2.topic); -v1.setDefaultTopic(v2.defaultTopic); -v1.setDefaultTopicQueueNums(v2.defaultTopicQueueNums); -v1.setQueueId(v2.queueId); -v1.setSysFlag(v2.sysFlag); -v1.setBornTimestamp(v2.bornTimestamp); -v1.setFlag(v2.flag); -v1.setProperties(v2.properties); -v1.setReconsumeTimes(v2.reconsumeTimes); -v1.setUnitMode(v2.unitMode); -v1.setMaxReconsumeTimes(v2.consumeRetryTimes); +v1.setProducerGroup(v2.a); +v1.setTopic(v2.b); +v1.setDefaultTopic(v2.c); +v1.setDefaultTopicQueueNums(v2.d); +v1.setQueueId(v2.e); +v1.setSysFlag(v2.f); +v1.setBornTimestamp(v2.g); +v1.setFlag(v2.h); +v1.setProperties(v2.i); +v1.setReconsumeTimes(v2.j); +v1.setUnitMode(v2.k); +v1.setMaxReconsumeTimes(v2.l); return v1; } public static SendMessageRequestHeaderV2 createSendMessageRequestHeaderV2(final SendMessageRequestHeader v1) { SendMessageRequestHeaderV2 v2 = new SendMessageRequestHeaderV2(); -v2.producerGroup = v1.getProducerGroup(); -v2.topic = v1.getTopic(); -v2.defaultTopic = v1.getDefaultTopic(); -v2.defaultTopicQueueNums = v1.getDefaultTopicQueueNums(); -v2.queueId = v1.getQueueId(); -v2.sysFlag = v1.getSysFlag(); -v2.bornTimestamp = v1.getBornTimestamp(); -v2.flag = v1.getFlag(); -v2.properties = v1.getProperties(); -v2.reconsumeTimes = v1.getReconsumeTimes(); -v2.unitMode = v1.isUnitMode(); -v2.consumeRetryTimes = v1.getMaxReconsumeTimes(); +
[2/6] incubator-rocketmq git commit: Update the description for command 'updateTopicPerm' , incidentally, commit minor update for pom. Review by @vongosling
Update the description for command 'updateTopicPerm' , incidentally, commit minor update for pom. Review by @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/76a05dd7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/76a05dd7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/76a05dd7 Branch: refs/heads/master Commit: 76a05dd7406ec9fe469d5d2ffab198d3487a1c47 Parents: eb90447 Author: lollipop <lolli...@apache.org> Authored: Tue Dec 20 11:00:06 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 12:01:01 2016 +0800 -- pom.xml | 4 ++-- .../rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/76a05dd7/pom.xml -- diff --git a/pom.xml b/pom.xml index 93748a5..381cdb1 100644 --- a/pom.xml +++ b/pom.xml @@ -103,7 +103,7 @@ stevenschew Wei Zhou stevenschew@@apache.org -https://github.com/zhouwei198732 +https://github.com/stevenschew committer @@ -113,7 +113,7 @@ lollipop Jixiang Jin lolli...@apache.org -https://github.com/jinjixiang +https://github.com/lollipopjin committer http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/76a05dd7/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java -- diff --git a/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java b/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java index 1938934..abff611 100644 --- a/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java +++ b/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java @@ -60,7 +60,7 @@ public class UpdateTopicPermSubCommand implements SubCommand { opt.setRequired(true); options.addOption(opt); -opt = new Option("p", "perm", true, "set topic's permission(2|4|6), intro[2:R; 4:W; 6:RW]"); +opt = new Option("p", "perm", true, "set topic's permission(2|4|6), intro[2:W; 4:R; 6:RW]"); opt.setRequired(true); options.addOption(opt);
[1/6] incubator-rocketmq git commit: Remove independent mysql jdbc driver statement. reviewed by @yukon [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master 836c40d55 -> 9875a7d9e (forced update) Remove independent mysql jdbc driver statement. reviewed by @yukon Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/eb904479 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/eb904479 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/eb904479 Branch: refs/heads/master Commit: eb90447934238d3cbbdf0bb48096811883998830 Parents: c01a7fd Author: vongoslingAuthored: Mon Dec 19 20:18:19 2016 +0800 Committer: vongosling Committed: Mon Dec 19 20:18:19 2016 +0800 -- NOTICE | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/eb904479/NOTICE -- diff --git a/NOTICE b/NOTICE index 913ef38..fea5b4c 100644 --- a/NOTICE +++ b/NOTICE @@ -2,7 +2,4 @@ RocketMQ Copyright 2016 Alibaba Group. This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -This distribution has producerGroup binary dependency on mysql-connector-java, which is available under gpl 2.0. -The source code of mysql-connector-java can be found at http://dev.mysql.com/downloads/connector/reconsumeTimes/. \ No newline at end of file +The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file
[3/6] incubator-rocketmq git commit: Remove native characters in README. reviewed by @vongosling
Remove native characters in README. reviewed by @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/05c94273 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/05c94273 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/05c94273 Branch: refs/heads/master Commit: 05c9427351e18a96bf00df8f5227b773de4060d7 Parents: eb90447 Author: stevenschew <stevensc...@apache.org> Authored: Tue Dec 20 10:16:13 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 12:09:41 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/05c94273/bin/README.md -- diff --git a/bin/README.md b/bin/README.md index 58903a1..d028475 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,34 +1,37 @@ -### æä½ç³»ç»è°ä¼ -å¨ç产ç¯å¢é¨ç½²Brokeråï¼å¿ é¡»è¦æ§è¡os.shï¼å¯¹æä½ç³»ç»è¿è¡è°ä¼ +### Operating system tuning +Before the broker deployment, you must run **os.sh**, which is optimized for your operating system. -**P.S: os.shåªè½æ§è¡ä¸æ¬¡ï¼éè¦sudo rootæé** +## Notice +### os.sh should be executed only once with the root permission. +### os.sh parameter settings is just for reference. You can tune it in your target host systems. -### å¯å¨broker -* Unixå¹³å° - `nohup sh mqbroker &` +### Start broker +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqbroker &` - `mqbroker.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³ébroker - sh mqshutdown broker + `mqbroker.exe` -### å¯å¨Name Server -* Unixå¹³å° +### Shutodwn broker + sh mqshutdown broker - `nohup sh mqnamesrv &` +### Start Nameserver +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqnamesrv &` - `mqnamesrv.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³éName Server - sh mqshutdown namesrv + `mqnamesrv.exe` -### æ´æ°æå建Topic - sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA +### Shutdown Nameserver +sh mqshutdown namesrv -### æ´æ°æå建订é ç» - sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file +### Update or create Topic +sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA + +### Update or create subscription group +sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file
[4/7] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/7d1af821 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/7d1af821 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/7d1af821 Branch: refs/heads/master Commit: 7d1af8218f2c5f7d9bf9da9cb49f5bcdc99d06dc Parents: f035d9b b46c687 Author: lollipop <lolli...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 14:01:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[2/7] incubator-rocketmq git commit: Remove native characters in README. reviewed by @vongosling
Remove native characters in README. reviewed by @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/b46c6872 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/b46c6872 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/b46c6872 Branch: refs/heads/master Commit: b46c687291f9c30d5cbce96a52c44f4d54d1c1b2 Parents: b04125b Author: stevenschew <stevensc...@apache.org> Authored: Tue Dec 20 10:16:13 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 12:09:41 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/b46c6872/bin/README.md -- diff --git a/bin/README.md b/bin/README.md index 58903a1..d028475 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,34 +1,37 @@ -### æä½ç³»ç»è°ä¼ -å¨ç产ç¯å¢é¨ç½²Brokeråï¼å¿ é¡»è¦æ§è¡os.shï¼å¯¹æä½ç³»ç»è¿è¡è°ä¼ +### Operating system tuning +Before the broker deployment, you must run **os.sh**, which is optimized for your operating system. -**P.S: os.shåªè½æ§è¡ä¸æ¬¡ï¼éè¦sudo rootæé** +## Notice +### os.sh should be executed only once with the root permission. +### os.sh parameter settings is just for reference. You can tune it in your target host systems. -### å¯å¨broker -* Unixå¹³å° - `nohup sh mqbroker &` +### Start broker +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqbroker &` - `mqbroker.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³ébroker - sh mqshutdown broker + `mqbroker.exe` -### å¯å¨Name Server -* Unixå¹³å° +### Shutodwn broker + sh mqshutdown broker - `nohup sh mqnamesrv &` +### Start Nameserver +* Unix platform -* Windowså¹³å°ï¼ä» æ¯æ64ä½ï¼ + `nohup sh mqnamesrv &` - `mqnamesrv.exe` +* Windows platformï¼Only support 64 bitï¼ -### å ³éName Server - sh mqshutdown namesrv + `mqnamesrv.exe` -### æ´æ°æå建Topic - sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA +### Shutdown Nameserver +sh mqshutdown namesrv -### æ´æ°æå建订é ç» - sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file +### Update or create Topic +sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA + +### Update or create subscription group +sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA \ No newline at end of file
[2/2] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/6beb5c6c Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/6beb5c6c Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/6beb5c6c Branch: refs/heads/master Commit: 6beb5c6cc37c7af158de12ebd360e7fdf211e113 Parents: c30821b 5933990 Author: lollipop <vongosl...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <vongosl...@apache.org> Committed: Tue Dec 20 11:02:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[2/2] incubator-rocketmq git commit: Update the description for command 'updateTopicPerm' , incidentally, commit minor update for pom. Review by @vongosling
Update the description for command 'updateTopicPerm' , incidentally, commit minor update for pom. Review by @vongosling Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/5dcf557c Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/5dcf557c Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/5dcf557c Branch: refs/heads/master Commit: 5dcf557c4ee9dce175f331fd2630f9e36956b157 Parents: 2e95422 Author: lollipop <lolli...@apache.org> Authored: Tue Dec 20 11:00:06 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Tue Dec 20 12:01:01 2016 +0800 -- pom.xml | 4 ++-- .../rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/5dcf557c/pom.xml -- diff --git a/pom.xml b/pom.xml index 93748a5..381cdb1 100644 --- a/pom.xml +++ b/pom.xml @@ -103,7 +103,7 @@ stevenschew Wei Zhou stevenschew@@apache.org -https://github.com/zhouwei198732 +https://github.com/stevenschew committer @@ -113,7 +113,7 @@ lollipop Jixiang Jin lolli...@apache.org -https://github.com/jinjixiang +https://github.com/lollipopjin committer http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/5dcf557c/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java -- diff --git a/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java b/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java index 1938934..abff611 100644 --- a/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java +++ b/rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/topic/UpdateTopicPermSubCommand.java @@ -60,7 +60,7 @@ public class UpdateTopicPermSubCommand implements SubCommand { opt.setRequired(true); options.addOption(opt); -opt = new Option("p", "perm", true, "set topic's permission(2|4|6), intro[2:R; 4:W; 6:RW]"); +opt = new Option("p", "perm", true, "set topic's permission(2|4|6), intro[2:W; 4:R; 6:RW]"); opt.setRequired(true); options.addOption(opt);
[1/2] incubator-rocketmq git commit: Merge remote-tracking branch 'origin/master' [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master 293fc97e5 -> 372900973 (forced update) Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/37290097 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/37290097 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/37290097 Branch: refs/heads/master Commit: 372900973ac4afed6404020eda6d6760232fddfb Parents: 5dcf557 5933990 Author: lollipop <vongosl...@apache.org> Authored: Tue Dec 20 11:02:30 2016 +0800 Committer: lollipop <vongosl...@apache.org> Committed: Tue Dec 20 11:02:30 2016 +0800 -- bin/README.md | 45 - 1 file changed, 24 insertions(+), 21 deletions(-) --
[6/6] incubator-rocketmq git commit: MASTER [ROCKETMQ-3] Clean up and perfect the unit test of rocketmq-broker closes apache/incubator-rocketmq#7
MASTER [ROCKETMQ-3] Clean up and perfect the unit test of rocketmq-broker closes apache/incubator-rocketmq#7 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/774101da Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/774101da Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/774101da Branch: refs/heads/master Commit: 774101da10125a158cb0ab8943a73526b18cee4c Parents: 07b3cd1 Author: dongeforever <zhendongli...@yeah.net> Authored: Fri Dec 23 17:15:39 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Fri Dec 23 17:15:39 2016 +0800 -- pom.xml | 1 - .../rocketmq/broker/BrokerTestHarness.java | 74 + .../rocketmq/broker/api/SendMessageTest.java| 84 ++-- .../offset/ConsumerOffsetManagerTest.java | 63 +++ .../broker/topic/TopicConfigManagerTest.java| 49 +--- .../src/test/resources/logback-test.xml | 33 6 files changed, 199 insertions(+), 105 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/774101da/pom.xml -- diff --git a/pom.xml b/pom.xml index decb352..fa4a0be 100644 --- a/pom.xml +++ b/pom.xml @@ -242,7 +242,6 @@ com/alibaba/rocketmq/common/protocol/MQProtosHelperTest.java com/alibaba/rocketmq/client/consumer/loadbalance/AllocateMessageQueueAveragelyTest.java com/alibaba/rocketmq/store/RecoverTest.java - com/alibaba/rocketmq/broker/api/SendMessageTest.java http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/774101da/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/BrokerTestHarness.java -- diff --git a/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/BrokerTestHarness.java b/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/BrokerTestHarness.java new file mode 100644 index 000..ca6f17b --- /dev/null +++ b/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/BrokerTestHarness.java @@ -0,0 +1,74 @@ +/** + * 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. + */ + +/** + * $Id: SendMessageTest.java 1831 2013-05-16 01:39:51Z shijia.wxr $ + */ +package com.alibaba.rocketmq.broker; + +import com.alibaba.rocketmq.common.BrokerConfig; +import com.alibaba.rocketmq.remoting.netty.NettyClientConfig; +import com.alibaba.rocketmq.remoting.netty.NettyServerConfig; +import com.alibaba.rocketmq.store.config.MessageStoreConfig; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.Random; + +/** + * @author zander + */ +public class BrokerTestHarness { + +protected BrokerController brokerController = null; + +protected Random random = new Random(); +public final String BROKER_NAME = "TestBrokerName"; +protected String brokerAddr = ""; +protected Logger logger = LoggerFactory.getLogger(BrokerTestHarness.class); +protected BrokerConfig brokerConfig = new BrokerConfig(); +protected NettyServerConfig nettyServerConfig = new NettyServerConfig(); +protected NettyClientConfig nettyClientConfig = new NettyClientConfig(); +protected MessageStoreConfig storeConfig = new MessageStoreConfig(); + +@Before +public void startup() throws Exception { +brokerConfig.setBrokerName(BROKER_NAME); +brokerConfig.setBrokerIP1("127.0.0.1"); +storeConfig.setStorePathRootDir(System.getProperty("user.home") + File.separator + "unitteststore"); +storeConfig.setStorePathCommitLog(System.getProperty("user.home") + File.separator + &qu
[5/6] incubator-rocketmq git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-rocketmq into unit-test
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-rocketmq into unit-test Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/07b3cd1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/07b3cd1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/07b3cd1b Branch: refs/heads/master Commit: 07b3cd1b48a59c6059b46ac350b96d1f77b91bc2 Parents: c92332e dd985d0 Author: lollipop <lolli...@apache.org> Authored: Fri Dec 23 17:11:04 2016 +0800 Committer: lollipop <lolli...@apache.org> Committed: Fri Dec 23 17:11:04 2016 +0800 -- --
[1/4] incubator-rocketmq git commit: [ROCKETMQ-13] Wrong log level for AcceptSocketService termination. [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master b85645996 -> e5892e164 (forced update) [ROCKETMQ-13] Wrong log level for AcceptSocketService termination. Additionally, added code comments and did a cleanup. JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-13 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/fed09763 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/fed09763 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/fed09763 Branch: refs/heads/master Commit: fed09763bccb73696d1953937b8b1eb1ce88b131 Parents: 626990c Author: shtykh_romanAuthored: Mon Dec 26 12:17:53 2016 +0900 Committer: Willem Jiang Committed: Mon Dec 26 15:12:41 2016 +0800 -- .../alibaba/rocketmq/store/ha/HAService.java| 26 +--- 1 file changed, 17 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/fed09763/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/ha/HAService.java -- diff --git a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/ha/HAService.java b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/ha/HAService.java index 075252c..2cf695c 100644 --- a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/ha/HAService.java +++ b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/ha/HAService.java @@ -46,7 +46,7 @@ public class HAService { private final AtomicInteger connectionCount = new AtomicInteger(0); -private final List connectionList = new LinkedList(); +private final List connectionList = new LinkedList<>(); private final AcceptSocketService acceptSocketService; @@ -170,17 +170,22 @@ public class HAService { return push2SlaveMaxOffset; } +/** + * Listens to slave connections to create {@link HAConnection}. + */ class AcceptSocketService extends ServiceThread { private ServerSocketChannel serverSocketChannel; private Selector selector; private final SocketAddress socketAddressListen; - public AcceptSocketService(final int port) { this.socketAddressListen = new InetSocketAddress(port); } - +/** + * Starts listening to slave connections. + * @throws Exception If fails. + */ public void beginAccept() throws Exception { this.serverSocketChannel = ServerSocketChannel.open(); this.selector = RemotingUtil.openSelector(); @@ -190,6 +195,7 @@ public class HAService { this.serverSocketChannel.register(this.selector, SelectionKey.OP_ACCEPT); } +/** {@inheritDoc} */ @Override public void shutdown(final boolean interrupt) { super.shutdown(interrupt); @@ -202,6 +208,7 @@ public class HAService { } } +/** {@inheritDoc} */ @Override public void run() { log.info(this.getServiceName() + " service started"); @@ -210,10 +217,12 @@ public class HAService { try { this.selector.select(1000); Set selected = this.selector.selectedKeys(); + if (selected != null) { for (SelectionKey k : selected) { if ((k.readyOps() & SelectionKey.OP_ACCEPT) != 0) { SocketChannel sc = ((ServerSocketChannel) k.channel()).accept(); + if (sc != null) { HAService.log.info("HAService receive new connection, " + sc.socket().getRemoteSocketAddress()); @@ -234,16 +243,15 @@ public class HAService { selected.clear(); } - } catch (Exception e) { log.error(this.getServiceName() + " service has exception.", e); } } -log.error(this.getServiceName() + " service end"); +log.info(this.getServiceName() + " service end"); } - +/** {@inheritDoc} */ @Override public String getServiceName() { return AcceptSocketService.class.getSimpleName(); @@ -256,8 +264,8 @@ public class HAService { class GroupTransferService extends ServiceThread { private final WaitNotifyObject notifyTransferObject = new WaitNotifyObject(); -private volatile List requestsWrite = new ArrayList(); -private volatile List requestsRead = new ArrayList(); +private volatile List
[3/4] incubator-rocketmq git commit: [ROCKETMQ-9] Clean up the code
[ROCKETMQ-9] Clean up the code Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/e5892e16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/e5892e16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/e5892e16 Branch: refs/heads/master Commit: e5892e164d469acf687c1cb3e598c6c44f9ef1c1 Parents: d1fa869 Author: Willem JiangAuthored: Tue Dec 27 13:33:43 2016 +0800 Committer: Willem Jiang Committed: Tue Dec 27 13:33:43 2016 +0800 -- .../main/java/com/alibaba/rocketmq/store/MappedFileQueue.java | 6 +++--- .../java/com/alibaba/rocketmq/store/index/IndexService.java| 4 ++-- rocketmq-store/src/test/resources/logback-test.xml | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e5892e16/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/MappedFileQueue.java -- diff --git a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/MappedFileQueue.java b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/MappedFileQueue.java index 8d9d3ab..0d15ece 100644 --- a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/MappedFileQueue.java +++ b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/MappedFileQueue.java @@ -484,10 +484,10 @@ public class MappedFileQueue { try { return this.mappedFiles.get(index); } catch (Exception e) { -if (returnFirstOnNotFound) +if (returnFirstOnNotFound) { return mappedFile; - -LOG_ERROR.warn("findMappedFileByOffset failure. {}", UtilAll.currentStackTrace()); +} +LOG_ERROR.warn("findMappedFileByOffset failure. ", e); } } } catch (Exception e) { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e5892e16/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/index/IndexService.java -- diff --git a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/index/IndexService.java b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/index/IndexService.java index fded747..f4f27bc 100644 --- a/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/index/IndexService.java +++ b/rocketmq-store/src/main/java/com/alibaba/rocketmq/store/index/IndexService.java @@ -279,7 +279,7 @@ public class IndexService { * * @return {@link IndexFile} or null on failure. */ -private IndexFile retryGetAndCreateIndexFile() { +public IndexFile retryGetAndCreateIndexFile() { IndexFile indexFile = null; for (int times = 0; null == indexFile && times < MAX_TRY_IDX_CREATE; times++) { @@ -288,7 +288,7 @@ public class IndexService { break; try { -log.error("Tried to create index file " + times + " times"); +log.info("Tried to create index file " + times + " times"); Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e5892e16/rocketmq-store/src/test/resources/logback-test.xml -- diff --git a/rocketmq-store/src/test/resources/logback-test.xml b/rocketmq-store/src/test/resources/logback-test.xml index 11d429d..6754c0a 100644 --- a/rocketmq-store/src/test/resources/logback-test.xml +++ b/rocketmq-store/src/test/resources/logback-test.xml @@ -20,6 +20,7 @@ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %msg%n + UTF-8
incubator-rocketmq git commit: [ROCKETMQ-254]Fix logger appender unit tests which cost too long
Repository: incubator-rocketmq Updated Branches: refs/heads/develop bcc65e547 -> aa1c75774 [ROCKETMQ-254]Fix logger appender unit tests which cost too long Author: lindzh <linso...@163.com> Closes #141 from lindzh/logger_appender_test. Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/aa1c7577 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/aa1c7577 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/aa1c7577 Branch: refs/heads/develop Commit: aa1c75774eb33fca9a1c3f036249b6c5b86ef0f5 Parents: bcc65e5 Author: lindzh <linso...@163.com> Authored: Fri Aug 11 15:40:24 2017 +0800 Committer: lollipop <lolli...@apache.org> Committed: Fri Aug 11 15:40:24 2017 +0800 -- .../rocketmq/broker/BrokerControllerTest.java | 9 ++ .../filter/ConsumerFilterManagerTest.java | 20 +-- .../filter/MessageStoreWithFilterTest.java | 21 +-- .../org/apache/rocketmq/common/UtilAll.java | 15 ++ .../logappender/common/ProducerInstance.java| 30 ++-- .../log4j/RocketmqLog4jAppender.java| 4 +- .../log4j2/RocketmqLog4j2Appender.java | 4 +- .../logback/RocketmqLogbackAppender.java| 4 +- .../rocketmq/logappender/AbstractTestCase.java | 151 +-- .../apache/rocketmq/logappender/Log4jTest.java | 7 +- .../rocketmq/logappender/LogbackTest.java | 7 +- .../apache/rocketmq/logappender/log4j2Test.java | 7 +- .../src/test/resources/log4j-example.properties | 2 +- .../src/test/resources/log4j-example.xml| 10 +- .../src/test/resources/log4j2-example.xml | 2 +- .../src/test/resources/logback-example.xml | 12 +- .../rocketmq/store/AppendCallbackTest.java | 8 + .../rocketmq/store/ConsumeQueueExtTest.java | 35 ++--- .../apache/rocketmq/store/ConsumeQueueTest.java | 19 +-- .../rocketmq/store/DefaultMessageStoreTest.java | 10 ++ .../rocketmq/store/MappedFileQueueTest.java | 11 ++ .../apache/rocketmq/store/MappedFileTest.java | 10 ++ .../rocketmq/store/StoreCheckpointTest.java | 10 ++ .../rocketmq/store/index/IndexFileTest.java | 7 + .../rocketmq/test/base/IntegrationTestBase.java | 5 +- 25 files changed, 181 insertions(+), 239 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/aa1c7577/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java -- diff --git a/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java b/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java index 86b9c4e..fe30d8f 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java @@ -18,11 +18,15 @@ package org.apache.rocketmq.broker; import org.apache.rocketmq.common.BrokerConfig; +import org.apache.rocketmq.common.UtilAll; import org.apache.rocketmq.remoting.netty.NettyClientConfig; import org.apache.rocketmq.remoting.netty.NettyServerConfig; import org.apache.rocketmq.store.config.MessageStoreConfig; +import org.junit.After; import org.junit.Test; +import java.io.File; + import static org.assertj.core.api.Assertions.assertThat; public class BrokerControllerTest { @@ -44,4 +48,9 @@ public class BrokerControllerTest { brokerController.shutdown(); } } + +@After +public void destory(){ +UtilAll.deleteFile(new File(new MessageStoreConfig().getStorePathRootDir())); +} } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/aa1c7577/broker/src/test/java/org/apache/rocketmq/broker/filter/ConsumerFilterManagerTest.java -- diff --git a/broker/src/test/java/org/apache/rocketmq/broker/filter/ConsumerFilterManagerTest.java b/broker/src/test/java/org/apache/rocketmq/broker/filter/ConsumerFilterManagerTest.java index c8412a8..68d6009 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/filter/ConsumerFilterManagerTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/filter/ConsumerFilterManagerTest.java @@ -17,6 +17,7 @@ package org.apache.rocketmq.broker.filter; +import org.apache.rocketmq.common.UtilAll; import org.apache.rocketmq.common.filter.ExpressionType; import org.apache.rocketmq.common.filter.FilterAPI; import org.apache.rocketmq.common.protocol.heartbeat.SubscriptionData; @@ -232,7 +233,7 @@ public class ConsumerFilterManagerTest { assertThat(filterData.isDead()).isTrue(); assertThat(filterData.getCompiledExpression()).isNotNull(); } finally { -deleteD