[2/9] incubator-rocketmq-site git commit: Change customer tu users
Change customer tu users 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/92fc39f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/92fc39f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/92fc39f4 Branch: refs/heads/asf-site Commit: 92fc39f487628ffd4685d0a82a4a4e9b7fb8b605 Parents: 3a39b1b Author: yukon <yu...@apache.org> Authored: Fri Aug 18 22:26:30 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 18 22:26:30 2017 +0800 -- _about/01-team.md| 2 +- _data/navigation.yml | 4 ++-- _pages/customer.md | 60 --- _pages/users.md | 60 +++ 4 files changed, 63 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/92fc39f4/_about/01-team.md -- diff --git a/_about/01-team.md b/_about/01-team.md index e329c13..7a6b9ad 100644 --- a/_about/01-team.md +++ b/_about/01-team.md @@ -24,7 +24,7 @@ The following is a list of developers with commit privileges that have directly |![zhouxinyu](/assets/images/about/zhouxinyu.png)|yukon|[@zhouxinyu](https://github.com/zhouxinyu)|yu...@apache.org |Committer/PMC Member| +8 | |![lizhanhui](/assets/images/about/lizhanhui.jpg)|lizhanhui|[@lizhanhui](https://github.com/lizhanhui)|lizhan...@apache.org |Committer/PMC Member| +8 | |![dongeforever](/assets/images/about/dongeforever.jpeg)|dongeforever|[@dongeforever](https://github.com/dongeforever)|dongefore...@apache.org |Committer/PMC Member| +8 | -|![lollipop](/assets/images/about/lollipop.jpeg)|lollipop|[@lollipopjin](https://github.com/lollipopjin)|lolli...@apache.org |Committer| +8 | +|![lollipop](/assets/images/about/lollipop.jpeg)|lollipop|[@lollipopjin](https://github.com/lollipopjin)|lolli...@apache.org |Committer/PMC Member| +8 | |![stevensche](/assets/images/about/stevenschew.png)|stevenschew|[@stevenschew](https://github.com/stevenschew)|stevensc...@apache.org |Committer| +8 | |![longdafeng](/assets/images/about/longdafeng.jpeg)|longda|[@longdafeng](https://github.com/longdafeng)|lon...@apache.org |Committer| +8 | |![shroman](/assets/images/about/rshtykh.png)|shroman|[@shroman](https://github.com/shroman)|shro...@apache.org |Committer| +9 | http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/92fc39f4/_data/navigation.yml -- diff --git a/_data/navigation.yml b/_data/navigation.yml index 99e4890..4e5c03f 100644 --- a/_data/navigation.yml +++ b/_data/navigation.yml @@ -6,8 +6,8 @@ main: url: /year-archive/ - title: "Community" url: /community/ - - title: "Customer" -url: /customer/ + - title: "Users" +url: /users/ - title: "About" url: /about/team/ # - title: "Sample Collections" http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/92fc39f4/_pages/customer.md -- diff --git a/_pages/customer.md b/_pages/customer.md deleted file mode 100644 index e70388b..000 --- a/_pages/customer.md +++ /dev/null @@ -1,60 +0,0 @@ -layout: splash -permalink: /customer/ -title: "Apache RocketMQ" -header: - overlay_color: "#5e616c" - overlay_image: /assets/images/rmq-home-page.jpg - cta_label: " Getting Started" - cta_url: "/docs/quick-start/" - caption: -excerpt: 'Apache RocketMQ⢠is an open source distributed messaging and streaming data platform. Latest release v4.0.0-incubating {::nomarkdown}https://ghbtns.com/github-btn.html?user=apache=incubator-rocketmq=star=true=large; frameborder="0" scrolling="0" width="160px" height="30px"> https://ghbtns.com/github-btn.html?user=apache=incubator-rocketmq=fork=true=large; frameborder="0" scrolling="0" width="158px" height="30px">{:/nomarkdown}' -feature_row: - - image_path: /assets/images/community/alibaba-logo.png -alt: "Alibaba Group" - - image_path: /assets/images/community/ant-logo.png -alt: "China Telecom Group" - - image_path: /assets/images/community/webank-logo.png -alt: "WeBank Group" -feature_row1: - - image_path: /assets/images/community/didi-logo.png -alt: "DiDi Group" - - image_path: /assets/images/community/yeahmobi-logo.png -alt: "YeahMobi Group" - - image_path: /assets/images/community/egov-logo.png -alt: "Egov Group" -feature_row2: - - image_
incubator-rocketmq-site git commit: First clean up for TLP
Repository: incubator-rocketmq-site Updated Branches: refs/heads/master e194d2beb -> 2b7aacd24 First clean up for TLP 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/2b7aacd2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/2b7aacd2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/2b7aacd2 Branch: refs/heads/master Commit: 2b7aacd243969ac1f6ffe2c4ced222980ad20b48 Parents: e194d2b Author: yukon <yu...@apache.org> Authored: Fri Sep 15 20:32:06 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Sep 15 20:32:06 2017 +0800 -- README.md | 2 +- _about/01-team.md | 21 ++--- _docs/06-best-practice-pull-request.md | 2 +- _docs/08-release-manual.md | 4 ++-- assets/images/about/Jaskey.jpeg| Bin 2080 -> 2476 bytes assets/images/about/brianm.jpeg| Bin 2818 -> 0 bytes assets/images/about/dongeforever.jpeg | Bin 23023 -> 3239 bytes assets/images/about/jim.jpg| Bin 7668 -> 2662 bytes assets/images/about/lukehan.jpeg | Bin 2871 -> 0 bytes assets/images/about/vsair.png | Bin 14747 -> 15200 bytes home.md| 3 --- 11 files changed, 14 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/2b7aacd2/README.md -- diff --git a/README.md b/README.md index 1e77b07..0e002cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Apache RocketMQ (incubating) website -This is the website for [Apache RocketMQ]( http://rocketmq.incubator.apache.org/) (incubating). +This is the website for [Apache RocketMQ]( http://rocketmq.apache.org/) (incubating). ## About This website is based on Jekyll and a Jekyll theme named Minimal Mistakes. http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/2b7aacd2/_about/01-team.md -- diff --git a/_about/01-team.md b/_about/01-team.md index 7a6b9ad..a1b7b5f 100644 --- a/_about/01-team.md +++ b/_about/01-team.md @@ -14,17 +14,16 @@ The following is a list of developers with commit privileges that have directly |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| -7 | -|![justinmclean](/assets/images/about/justinmclean.jpeg)|jmclean| [@justinmclean](https://github.com/justinmclean)|jmcl...@apache.org |Mentor| +11 | -|![jim](/assets/images/about/jim.jpg)|jim| [@jim](https://github.com/jimjag)|j...@apache.org |Mentor| -7 | -|![WillemJiang](/assets/images/about/WillemJiang.jpeg)|ningjiang| [@WillemJiang](https://github.com/WillemJiang)|ningji...@apache.org |Mentor| +8 | -|![lukehan](/assets/images/about/lukehan.jpeg)|lukehan| [@lukehan](https://github.com/lukehan)|luke...@apache.org |Mentor| +8 | -|![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 | -|![lizhanhui](/assets/images/about/lizhanhui.jpg)|lizhanhui|[@lizhanhui](https://github.com/lizhanhui)|lizhan...@apache.org |Committer/PMC Member| +8 | -|![dongeforever](/assets/images/about/dongeforever.jpeg)|dongeforever|[@dongeforever](https://github.com/dongeforever)|dongefore...@apache.org |Committer/PMC Member| +8 | -|![lollipop](/assets/images/about/lollipop.jpeg)|lollipop|[@lollipopjin](https://github.com/lollipopjin)|lolli...@apache.org |Committer/PMC Member| +8 | +|![bsnyde](/assets/images/about/bsnyder.jpeg)|bsnyder| [@bsnyder](https://github.com/bsnyder)|bsny...@apache.org |PMC Member| -7 | +|![justinmclean](/assets/images/about/justinmclean.jpeg)|jmclean| [@justinmclean](https://github.com/justinmclean)|jmcl...@apache.org |PMC Member| +11 | +|![jim](/assets/images/about/jim.jpg)|jim| [@jim](https://github.com/jimjag)|j...@apache.org |PMC Member| -7 | +|![WillemJiang](/assets/images/about/WillemJiang.jpeg)|ningjiang| [@WillemJiang](https://github.com/WillemJiang)|ningji...@apache.org |PMC Member| +8 | +|![vongosling](/assets/images/about/vongosling.jpeg)|vongosling|[@vongosling](https
[1/8] incubator-rocketmq git commit: initialize RocketMQ5
Repository: incubator-rocketmq Updated Branches: refs/heads/rocketmq5 [created] 0b88e66fa http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/service/RpcProxyCommon.java -- diff --git a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/service/RpcProxyCommon.java b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/service/RpcProxyCommon.java new file mode 100644 index 000..c5d9a3c --- /dev/null +++ b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/service/RpcProxyCommon.java @@ -0,0 +1,329 @@ +/* + * 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.rocketmq.rpc.impl.service; + +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import org.apache.rocketmq.remoting.api.AsyncHandler; +import org.apache.rocketmq.remoting.api.RemotingService; +import org.apache.rocketmq.remoting.api.command.RemotingCommand; +import org.apache.rocketmq.remoting.api.serializable.Serializer; +import org.apache.rocketmq.remoting.api.serializable.SerializerFactory; +import org.apache.rocketmq.remoting.external.ThreadUtils; +import org.apache.rocketmq.remoting.impl.protocol.serializer.SerializerFactoryImpl; +import org.apache.rocketmq.rpc.annotation.MethodType; +import org.apache.rocketmq.rpc.annotation.RemoteMethod; +import org.apache.rocketmq.rpc.annotation.RemoteService; +import org.apache.rocketmq.rpc.annotation.VisibleForInternal; +import org.apache.rocketmq.rpc.api.Promise; +import org.apache.rocketmq.rpc.api.PromiseListener; +import org.apache.rocketmq.rpc.impl.command.ResponseCode; +import org.apache.rocketmq.rpc.impl.command.RpcRequestCode; +import org.apache.rocketmq.rpc.impl.config.RpcCommonConfig; +import org.apache.rocketmq.rpc.impl.context.RpcCallerContext; +import org.apache.rocketmq.rpc.impl.exception.ServiceExceptionHandlerManager; +import org.apache.rocketmq.rpc.impl.exception.ServiceExceptionManager; +import org.apache.rocketmq.rpc.impl.metrics.ServiceStats; +import org.apache.rocketmq.rpc.impl.promise.DefaultPromise; +import org.apache.rocketmq.rpc.internal.ExceptionMessageUtil; +import org.apache.rocketmq.rpc.internal.RpcErrorMapper; +import org.apache.rocketmq.rpc.internal.ServiceUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.apache.rocketmq.remoting.internal.ExceptionUtils.getStackTrace; + +public abstract class RpcProxyCommon { +protected final static SerializerFactory SERIALIZER_FACTORY = new SerializerFactoryImpl(); +protected static final Logger log = LoggerFactory.getLogger(RpcProxyCommon.class); +protected final ThreadLocal threadLocalCallerContext = new ThreadLocal<>(); +protected RpcCommonConfig rpcCommonConfig; +protected ExecutorService callServiceThreadPool; +protected ExecutorService promiseExecutorService; +protected ServiceStats serviceStats; + +public RpcProxyCommon(RpcCommonConfig rpcCommonConfig) { +this.rpcCommonConfig = rpcCommonConfig; +this.serviceStats = new ServiceStats(); +this.promiseExecutorService = ThreadUtils.newThreadPoolExecutor(rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), +rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), rpcCommonConfig.getServiceThreadKeepAliveTime(), +TimeUnit.MILLISECONDS, new ArrayBlockingQueue(rpcCommonConfig.getServiceThreadBlockQueueSize()), "promiseExecutorService", true); +this.callServiceThreadPool = ThreadUtils.newThreadPoolExecutor(rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), +rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), rpcCommonConfig.getServiceThreadKeepAliveTime(), +TimeUnit.MILLISECONDS, new
[2/3] incubator-rocketmq git commit: Use LinkedBlockingQueue for better performance
Use LinkedBlockingQueue for better performance Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/489b1d8b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/489b1d8b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/489b1d8b Branch: refs/heads/rocketmq5 Commit: 489b1d8b7829990bd5b6ecef1ab5aeae685a1ec4 Parents: 114b6ae Author: yukon <yu...@apache.org> Authored: Wed Sep 20 17:18:43 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Wed Sep 20 17:18:43 2017 +0800 -- .../impl/netty/NettyRemotingAbstract.java | 3 +-- .../rpc/impl/client/SimpleClientImpl.java | 12 +++ .../rpc/impl/server/SimpleServerImpl.java | 11 ++ .../rpc/impl/service/RpcInstanceAbstract.java | 12 +++ .../rpc/impl/service/RpcProxyCommon.java| 22 +--- 5 files changed, 39 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/489b1d8b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingAbstract.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingAbstract.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingAbstract.java index 4c22e7c..a5c2118 100644 --- a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingAbstract.java +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingAbstract.java @@ -25,7 +25,6 @@ import io.netty.channel.SimpleChannelInboundHandler; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; @@ -98,7 +97,7 @@ public abstract class NettyRemotingAbstract implements RemotingService { clientConfig.getClientAsyncCallbackExecutorThreads(), 60, TimeUnit.SECONDS, -new ArrayBlockingQueue(1), +new LinkedBlockingQueue(1), "PublicExecutor", true); this.remotingCommandFactory = new RemotingCommandFactoryImpl(remotingCommandFactoryMeta); } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/489b1d8b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/SimpleClientImpl.java -- diff --git a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/SimpleClientImpl.java b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/SimpleClientImpl.java index 787e8c1..4483ca3 100644 --- a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/SimpleClientImpl.java +++ b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/SimpleClientImpl.java @@ -18,8 +18,8 @@ package org.apache.rocketmq.rpc.impl.client; import java.util.Properties; -import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import org.apache.rocketmq.remoting.api.RemotingClient; import org.apache.rocketmq.remoting.api.RemotingService; @@ -48,9 +48,13 @@ public class SimpleClientImpl extends RpcInstanceAbstract implements SimpleClien super(rpcCommonConfig); this.remotingClient = remotingClient; this.rpcCommonConfig = rpcCommonConfig; -this.callServiceThreadPool = ThreadUtils.newThreadPoolExecutor(rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), -rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), rpcCommonConfig.getServiceThreadKeepAliveTime(), -TimeUnit.MILLISECONDS, new ArrayBlockingQueue(rpcCommonConfig.getServiceThreadBlockQueueSize()), "clientCallServiceThread", true); +this.callServiceThreadPool = ThreadUtils.newThreadPoolExecutor( +rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), +rpcCommonConfig.getClientAsyncCallbackExecutorThreads(), +rpcCommonConfig.getServiceThreadKeepAliveTime(), +TimeUnit.MILLISECONDS, +new LinkedBlockingQueue(rpcCommonConfig.getServiceThreadBlockQueueSize()), +"clientCallServiceThread", true); } public void initialize() { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/489b1d8b/remot
[3/3] incubator-rocketmq git commit: Polish thread poll create method
Polish thread poll create method Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/6593294f Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/6593294f Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/6593294f Branch: refs/heads/rocketmq5 Commit: 6593294f07dec7039668e7f5807f530433c3bbda Parents: 489b1d8 Author: yukon <yu...@apache.org> Authored: Wed Sep 20 17:39:46 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Wed Sep 20 20:37:15 2017 +0800 -- remoting-core/pom.xml | 2 +- .../rocketmq/remoting/external/ThreadUtils.java | 26 +--- .../impl/netty/NettyRemotingAbstract.java | 8 ++ .../rpc/impl/client/SimpleClientImpl.java | 10 +++- .../rpc/impl/server/SimpleServerImpl.java | 10 +++- .../rpc/impl/service/RpcInstanceAbstract.java | 18 -- .../rpc/impl/service/RpcProxyCommon.java| 19 +- 7 files changed, 37 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/6593294f/remoting-core/pom.xml -- diff --git a/remoting-core/pom.xml b/remoting-core/pom.xml index 702b826..997011b 100644 --- a/remoting-core/pom.xml +++ b/remoting-core/pom.xml @@ -77,7 +77,7 @@ io.netty netty-all -4.1.6.Final +4.1.15.Final com.alibaba http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/6593294f/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/external/ThreadUtils.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/external/ThreadUtils.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/external/ThreadUtils.java index 1a80d20..5a50089 100644 --- a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/external/ThreadUtils.java +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/external/ThreadUtils.java @@ -20,6 +20,7 @@ package org.apache.rocketmq.remoting.external; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; @@ -43,25 +44,32 @@ public final class ThreadUtils { int maximumPoolSize, long keepAliveTime, TimeUnit unit, -BlockingQueue workQueue, String processName, boolean isDaemon) { -return new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, newThreadFactory(processName, isDaemon)); +BlockingQueue workQueue, +String processName, boolean isDaemon) { +return new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, newGenericThreadFactory(processName, isDaemon)); +} + +public static ExecutorService newFixedThreadPool(int nThreads, int workQueueCapacity, String processName, boolean isDaemon) { +return new ThreadPoolExecutor( +nThreads, +nThreads, +0, +TimeUnit.MILLISECONDS, +new LinkedBlockingQueue(workQueueCapacity), +newGenericThreadFactory(processName, isDaemon)); } public static ExecutorService newSingleThreadExecutor(String processName, boolean isDaemon) { -return Executors.newSingleThreadExecutor(newThreadFactory(processName, isDaemon)); +return Executors.newSingleThreadExecutor(newGenericThreadFactory(processName, isDaemon)); } public static ScheduledExecutorService newSingleThreadScheduledExecutor(String processName, boolean isDaemon) { -return Executors.newSingleThreadScheduledExecutor(newThreadFactory(processName, isDaemon)); +return Executors.newSingleThreadScheduledExecutor(newGenericThreadFactory(processName, isDaemon)); } public static ScheduledExecutorService newFixedThreadScheduledPool(int nThreads, String processName, boolean isDaemon) { -return Executors.newScheduledThreadPool(nThreads, newThreadFactory(processName, isDaemon)); -} - -public static ThreadFactory newThreadFactory(String processName, boolean isDaemon) { -return newGenericThreadFactory("Remoting-" + processName, isDaemon); +return Executors.newScheduledThreadPool(nThreads, newGenericThr
[1/3] incubator-rocketmq git commit: Minor polish
Repository: incubator-rocketmq Updated Branches: refs/heads/rocketmq5 0b88e66fa -> 6593294f0 Minor polish Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/114b6ae0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/114b6ae0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/114b6ae0 Branch: refs/heads/rocketmq5 Commit: 114b6ae083ed5338e2b59a501ec08ec23c3e2ece Parents: 0b88e66 Author: yukon <yu...@apache.org> Authored: Wed Sep 20 17:06:04 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Wed Sep 20 17:06:04 2017 +0800 -- .../remoting/api/buffer/ByteBufferWrapper.java | 28 .../impl/buffer/NettyByteBufferWrapper.java | 73 ++-- .../impl/netty/NettyRemotingAbstract.java | 16 +++-- .../remoting/impl/netty/handler/Decoder.java| 2 +- 4 files changed, 64 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/114b6ae0/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/buffer/ByteBufferWrapper.java -- diff --git a/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/buffer/ByteBufferWrapper.java b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/buffer/ByteBufferWrapper.java index 7cae3ac..7360c88 100644 --- a/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/buffer/ByteBufferWrapper.java +++ b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/buffer/ByteBufferWrapper.java @@ -20,37 +20,37 @@ package org.apache.rocketmq.remoting.api.buffer; import java.nio.ByteBuffer; public interface ByteBufferWrapper { -void writeByte(int index, byte data); - void writeByte(byte data); -byte readByte(); - -void writeInt(int data); +void writeByte(int index, byte data); void writeBytes(byte[] data); void writeBytes(ByteBuffer data); -int readableBytes(); +void writeInt(int data); -int readInt(); +void writeShort(short value); + +void writeLong(long id); + +byte readByte(); void readBytes(byte[] dst); void readBytes(ByteBuffer dst); -int readerIndex(); - -void setReaderIndex(int readerIndex); +short readShort(); -void writeLong(long id); +int readInt(); long readLong(); -void ensureCapacity(int capacity); +int readableBytes(); -short readShort(); +int readerIndex(); -void writeShort(short value); +void setReaderIndex(int readerIndex); + +void ensureCapacity(int capacity); } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/114b6ae0/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/buffer/NettyByteBufferWrapper.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/buffer/NettyByteBufferWrapper.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/buffer/NettyByteBufferWrapper.java index e17bcfd..5a71452 100644 --- a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/buffer/NettyByteBufferWrapper.java +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/buffer/NettyByteBufferWrapper.java @@ -18,39 +18,27 @@ package org.apache.rocketmq.remoting.impl.buffer; import io.netty.buffer.ByteBuf; -import io.netty.channel.Channel; import java.nio.ByteBuffer; import org.apache.rocketmq.remoting.api.buffer.ByteBufferWrapper; public class NettyByteBufferWrapper implements ByteBufferWrapper { private final ByteBuf buffer; -private final Channel channel; public NettyByteBufferWrapper(ByteBuf buffer) { -this(buffer, null); -} - -public NettyByteBufferWrapper(ByteBuf buffer, Channel channel) { -this.channel = channel; this.buffer = buffer; } -public void writeByte(int index, byte data) { -buffer.writeByte(data); -} - +@Override public void writeByte(byte data) { buffer.writeByte(data); } -public byte readByte() { -return buffer.readByte(); -} - -public void writeInt(int data) { -buffer.writeInt(data); +@Override +public void writeByte(int index, byte data) { +buffer.writeByte(data); } +@Override public void writeBytes(byte[] data) { buffer.writeBytes(data); } @@ -60,16 +48,24 @@ public class NettyByteBufferWrapper implements ByteBufferWrapper { buffer.writeBytes(data); } -public int readableBytes() {
incubator-rocketmq git commit: Interface polish, remove unused exeption code
Repository: incubator-rocketmq Updated Branches: refs/heads/rocketmq5 6593294f0 -> 73e0071a0 Interface polish, remove unused exeption 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/73e0071a Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/73e0071a Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/73e0071a Branch: refs/heads/rocketmq5 Commit: 73e0071a01fa6f455b35471e9cd26084c58beaf4 Parents: 6593294 Author: yukon <yu...@apache.org> Authored: Fri Sep 22 17:07:01 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Sep 22 17:07:01 2017 +0800 -- .../apache/rocketmq/rpc/api/AdvancedClient.java | 6 ++-- .../apache/rocketmq/rpc/api/SimpleClient.java | 6 ++-- .../apache/rocketmq/rpc/api/SimpleServer.java | 6 ++-- .../rocketmq/rpc/impl/command/ResponseCode.java | 37 +--- 4 files changed, 10 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/73e0071a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/AdvancedClient.java -- diff --git a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/AdvancedClient.java b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/AdvancedClient.java index 881dc68..d2627cd 100644 --- a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/AdvancedClient.java +++ b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/AdvancedClient.java @@ -17,19 +17,19 @@ package org.apache.rocketmq.rpc.api; public interface AdvancedClient { - T callSync(String address, + T callSync(final String address, final String serviceCode, final String version, final Object[] parameter, final Class responseType) throws Exception; - Promise callAsync(String address, + Promise callAsync(final String address, final String serviceCode, final String version, final Object[] parameter, final Class responseType) throws Exception; -void callOneway(String address, +void callOneway(final String address, final String serviceCode, final String version, final Object[] parameter) throws Exception; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/73e0071a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleClient.java -- diff --git a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleClient.java b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleClient.java index ece1f60..ce5dffa 100644 --- a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleClient.java +++ b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleClient.java @@ -22,11 +22,11 @@ import java.util.concurrent.ExecutorService; import org.apache.rocketmq.remoting.api.ObjectLifecycle; public interface SimpleClient extends ObjectLifecycle { - T bind(Class service, String address, Properties properties); //keyValue + T bind(final Class service, final String address, final Properties properties); -void publish(Object service); +void publish(final Object service); -void publish(Object service, ExecutorService executorService); +void publish(final Object service, final ExecutorService executorService); AdvancedClient advancedClient(); } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/73e0071a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleServer.java -- diff --git a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleServer.java b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleServer.java index 4bf5372..5f67fe6 100644 --- a/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleServer.java +++ b/remoting-core/rpc-api/src/main/java/org/apache/rocketmq/rpc/api/SimpleServer.java @@ -25,9 +25,9 @@ import org.apache.rocketmq.remoting.api.channel.RemotingChannel; public interface SimpleServer extends ObjectLifecycle { T bind(final Class service, final RemotingChannel channel, final Properties properties); -AdvancedServer advancedServer(); - void publish(final Object service); -void publish(Object service, ExecutorService executorService); +void publish(final Object service, final ExecutorService executorService); + +AdvancedServer advancedServer(); } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/73e0071a/re
[5/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingServer.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingServer.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingServer.java new file mode 100644 index 000..d875f95 --- /dev/null +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/netty/NettyRemotingServer.java @@ -0,0 +1,286 @@ +/* + * 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.rocketmq.remoting.impl.netty; + +import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.PooledByteBufAllocator; +import io.netty.channel.ChannelDuplexHandler; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.epoll.EpollEventLoopGroup; +import io.netty.channel.epoll.EpollServerSocketChannel; +import io.netty.channel.group.ChannelGroup; +import io.netty.channel.group.DefaultChannelGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.ServerSocketChannel; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.codec.http2.Http2SecurityUtil; +import io.netty.handler.ssl.OpenSsl; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.ssl.SslProvider; +import io.netty.handler.ssl.SupportedCipherSuiteFilter; +import io.netty.handler.ssl.util.SelfSignedCertificate; +import io.netty.handler.timeout.IdleState; +import io.netty.handler.timeout.IdleStateEvent; +import io.netty.handler.timeout.IdleStateHandler; +import io.netty.util.concurrent.DefaultEventExecutorGroup; +import io.netty.util.concurrent.EventExecutorGroup; +import io.netty.util.concurrent.GlobalEventExecutor; +import java.net.InetSocketAddress; +import java.util.concurrent.TimeUnit; +import org.apache.rocketmq.remoting.api.AsyncHandler; +import org.apache.rocketmq.remoting.api.RemotingServer; +import org.apache.rocketmq.remoting.api.channel.RemotingChannel; +import org.apache.rocketmq.remoting.api.command.RemotingCommand; +import org.apache.rocketmq.remoting.config.RemotingConfig; +import org.apache.rocketmq.remoting.external.ThreadUtils; +import org.apache.rocketmq.remoting.impl.channel.NettyChannelImpl; +import org.apache.rocketmq.remoting.impl.netty.handler.ChannelStatistics; +import org.apache.rocketmq.remoting.impl.netty.handler.ProtocolSelector; +import org.apache.rocketmq.remoting.internal.JvmUtils; + +public class NettyRemotingServer extends NettyRemotingAbstract implements RemotingServer { +private final RemotingConfig serverConfig; + +private final ServerBootstrap serverBootstrap; +private final EventLoopGroup bossGroup; +private final EventLoopGroup ioGroup; +private EventExecutorGroup workerGroup; +private Class socketChannelClass; + +private int port; +private SslContext sslContext; + +NettyRemotingServer(final RemotingConfig serverConfig) { +super(serverConfig); + +this.serverBootstrap = new ServerBootstrap(); +this.serverConfig = serverConfig; + +if (JvmUtils.isLinux() && this.serverConfig.isServerNativeEpollEnable()) { +this.ioGroup = new EpollEventLoopGroup(serverConfig.getServerIoThreads(), ThreadUtils.newGenericThreadFactory("NettyEpollIoThreads", +serverConfig.getServerIoThreads())); + +this.bossGroup = new EpollEventLoopGroup(serverConfig.getServerAcceptorThreads(), ThreadUtils.newGenericThreadFactory("NettyBossThreads", +serverConfig.getServerAcceptorThreads())); + +this.socketChannelClass = EpollServerSocketChannel.class; +} else { +
[3/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/RpcBootstrapFactory.java -- diff --git a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/RpcBootstrapFactory.java b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/RpcBootstrapFactory.java new file mode 100644 index 000..13ce176 --- /dev/null +++ b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/RpcBootstrapFactory.java @@ -0,0 +1,36 @@ +/* + * 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.rocketmq.rpc; + +import java.util.Properties; +import org.apache.rocketmq.remoting.internal.BeanUtils; +import org.apache.rocketmq.rpc.api.SimpleClient; +import org.apache.rocketmq.rpc.api.SimpleServer; +import org.apache.rocketmq.rpc.impl.client.SimpleClientImpl; +import org.apache.rocketmq.rpc.impl.config.RpcCommonConfig; +import org.apache.rocketmq.rpc.impl.server.SimpleServerImpl; + +public class RpcBootstrapFactory { +public static SimpleServer createServerBootstrap(Properties properties) { +return new SimpleServerImpl(BeanUtils.populate(properties, RpcCommonConfig.class)); +} + +public static SimpleClient createClientBootstrap(Properties properties) { +return new SimpleClientImpl(BeanUtils.populate(properties, RpcCommonConfig.class)); +} +} http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/AdvancedClientImpl.java -- diff --git a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/AdvancedClientImpl.java b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/AdvancedClientImpl.java new file mode 100644 index 000..e94f589 --- /dev/null +++ b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/client/AdvancedClientImpl.java @@ -0,0 +1,57 @@ +/* + * 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.rocketmq.rpc.impl.client; + +import org.apache.rocketmq.remoting.api.command.RemotingCommand; +import org.apache.rocketmq.rpc.annotation.MethodType; +import org.apache.rocketmq.rpc.api.AdvancedClient; +import org.apache.rocketmq.rpc.api.Promise; +import org.apache.rocketmq.rpc.impl.service.RpcJdkProxy; +import org.apache.rocketmq.rpc.impl.service.RpcProxyFactory; + +public class AdvancedClientImpl implements AdvancedClient { +private final SimpleClientImpl simpleClient; + +public AdvancedClientImpl(final SimpleClientImpl simpleClient) { +this.simpleClient = simpleClient; +} + +@Override +public T callSync(final String address, final String serviceCode, final String version, +final Object[] parameter, +final Class responseType) throws Exception { +RemotingCommand request = simpleClient.createRemoteRequest(serviceCode, version, parameter); +RpcJdkProxy rpcJdkProxy = RpcProxyFactory.createServiceProxy(null, simpleClient, simpleClient.getRemotingClient(), simpleClient.getRpcCommonConfig(), address); +return (T) simpleClient.invokeRemoteMethod(rpcJdkProxy, serviceCode, request, responseType, MethodType.SYNC); +} + +@Override +public Promise callAsync(final String address, final String serviceCode, final
[4/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/internal/ByteUtils.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/internal/ByteUtils.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/internal/ByteUtils.java new file mode 100644 index 000..c298ce7 --- /dev/null +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/internal/ByteUtils.java @@ -0,0 +1,379 @@ +/* + * 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.rocketmq.remoting.internal; + +/** + * Copy from Bouncy Castle Crypto APIs + * + * This class is a utility class for manipulating byte arrays. + */ +public final class ByteUtils { + +private static final char[] HEX_CHARS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + +/** + * Default constructor (private) + */ +private ByteUtils() { +// empty +} + +/** + * Compare two byte arrays (perform null checks beforehand). + * + * @param left the first byte array + * @param right the second byte array + * @return the result of the comparison + */ +public static boolean equals(byte[] left, byte[] right) { +if (left == null) { +return right == null; +} +if (right == null) { +return false; +} + +if (left.length != right.length) { +return false; +} +boolean result = true; +for (int i = left.length - 1; i >= 0; i--) { +result &= left[i] == right[i]; +} +return result; +} + +/** + * Compare two two-dimensional byte arrays. No null checks are performed. + * + * @param left the first byte array + * @param right the second byte array + * @return the result of the comparison + */ +public static boolean equals(byte[][] left, byte[][] right) { +if (left.length != right.length) { +return false; +} + +boolean result = true; +for (int i = left.length - 1; i >= 0; i--) { +result &= ByteUtils.equals(left[i], right[i]); +} + +return result; +} + +/** + * Compare two three-dimensional byte arrays. No null checks are performed. + * + * @param left the first byte array + * @param right the second byte array + * @return the result of the comparison + */ +public static boolean equals(byte[][][] left, byte[][][] right) { +if (left.length != right.length) { +return false; +} + +boolean result = true; +for (int i = left.length - 1; i >= 0; i--) { +if (left[i].length != right[i].length) { +return false; +} +for (int j = left[i].length - 1; j >= 0; j--) { +result &= ByteUtils.equals(left[i][j], right[i][j]); +} +} + +return result; +} + +/** + * Computes a hashcode based on the contents of a one-dimensional byte array + * rather than its identity. + * + * @param array the array to compute the hashcode of + * @return the hashcode + */ +public static int deepHashCode(byte[] array) { +int result = 1; +for (int i = 0; i < array.length; i++) { +result = 31 * result + array[i]; +} +return result; +} + +/** + * Computes a hashcode based on the contents of a two-dimensional byte array + * rather than its identity. + * + * @param array the array to compute the hashcode of + * @return the hashcode + */ +public static int deepHashCode(byte[][] array) { +int result = 1; +for (int i = 0; i < array.length; i++) { +result = 31 * result + deepHashCode(array[i]); +} +return result; +} + +/** + * Computes a hashcode based on the contents of a three-dimensional byte + * array rather than its identity. + * + * @param array the array to
[2/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/metrics/StatsItem.java -- diff --git a/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/metrics/StatsItem.java b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/metrics/StatsItem.java new file mode 100644 index 000..219ee6e --- /dev/null +++ b/remoting-core/rpc-impl/src/main/java/org/apache/rocketmq/rpc/impl/metrics/StatsItem.java @@ -0,0 +1,442 @@ +/* + * 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.rocketmq.rpc.impl.metrics; + +import java.util.Arrays; +import java.util.Calendar; +import java.util.LinkedList; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; +import org.slf4j.Logger; + +public class StatsItem { +private final AtomicLong value = new AtomicLong(0); +private final AtomicLong times = new AtomicLong(0); +private final AtomicLong[] valueIncDistributeRegion = new AtomicLong[10]; +private final AtomicLong valueMaxInMinutes = new AtomicLong(0); +private final AtomicLong valueMaxIn10Minutes = new AtomicLong(0); +private final AtomicLong valueMaxInHour = new AtomicLong(0); + +private final LinkedList csListMinute = new LinkedList(); +private final LinkedList csListHour = new LinkedList(); +private final LinkedList csListDay = new LinkedList(); + +private final ScheduledExecutorService scheduledExecutorService; +private final String statsName; +private final String statsKey; +private final Logger log; + +public StatsItem(String statsName, String statsKey, ScheduledExecutorService scheduledExecutorService, Logger log) { +this.statsName = statsName; +this.statsKey = statsKey; +this.scheduledExecutorService = scheduledExecutorService; +this.log = log; + +for (int i = 0; i < this.valueIncDistributeRegion.length; i++) { +valueIncDistributeRegion[i] = new AtomicLong(0); +} +} + +public static boolean compareAndIncreaseOnly(final AtomicLong target, final long value) { +long prev = target.get(); +while (value > prev) { +boolean updated = target.compareAndSet(prev, value); +if (updated) +return true; + +prev = target.get(); +} + +return false; +} + +private static StatsSnapshot computeStatsData(final LinkedList csList) { +StatsSnapshot statsSnapshot = new StatsSnapshot(); +synchronized (csList) { +double tps = 0; +double avgpt = 0; +long sum = 0; +if (!csList.isEmpty()) { +CallSnapshot first = csList.getFirst(); +CallSnapshot last = csList.getLast(); +sum = last.getValue() - first.getValue(); +tps = (sum * 1000.0d) / (last.getTimestamp() - first.getTimestamp()); + +long timesDiff = last.getTimes() - first.getTimes(); +if (timesDiff > 0) { +avgpt = (sum * 1.0d) / timesDiff; +} + +} + +statsSnapshot.setSum(sum); +statsSnapshot.setTps(tps); +statsSnapshot.setAvgpt(avgpt); +} + +return statsSnapshot; +} + +public static long computNextMinutesTimeMillis() { +Calendar cal = Calendar.getInstance(); +cal.setTimeInMillis(System.currentTimeMillis()); +cal.add(Calendar.DAY_OF_MONTH, 0); +cal.add(Calendar.HOUR_OF_DAY, 0); +cal.add(Calendar.MINUTE, 1); +cal.set(Calendar.SECOND, 0); +cal.set(Calendar.MILLISECOND, 0); + +return cal.getTimeInMillis(); +} + +public static long computNextHourTimeMillis() { +Calendar cal = Calendar.getInstance(); +cal.setTimeInMillis(System.currentTimeMillis()); +cal.add(Calendar.DAY_OF_MONTH, 0); +cal.add(Calendar.HOUR_OF_DAY, 1); +cal.set(Calendar.MINUTE, 0); +cal.set(Calendar.SECOND,
[7/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/NestedRuntimeException.java -- diff --git a/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/NestedRuntimeException.java b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/NestedRuntimeException.java new file mode 100644 index 000..7ef01db --- /dev/null +++ b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/NestedRuntimeException.java @@ -0,0 +1,97 @@ +/* + * 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.rocketmq.remoting.api.exception; + +/** + * Handy class for wrapping runtime {@code Exceptions} with a root cause. + * + * This class is {@code abstract} to force the programmer to extend + * the class. {@code getMessage} will include nested exception + * information; {@code getRootCause} will include the innermost cause of + * this exception, if any; {@code printStackTrace} and other like methods will + * delegate to the wrapped exception, if any. + * + * @since 1.0.0 + */ +public abstract class NestedRuntimeException extends RuntimeException { +private static final long serialVersionUID = -8371779880133933367L; + +/** + * Construct a {@code NestedRuntimeException} with the specified detail message. + * + * @param msg the detail message + */ +public NestedRuntimeException(String msg) { +super(msg); +} + +/** + * Construct a {@code NestedRuntimeException} with the specified detail message + * and nested exception. + * + * @param msg the detail message + * @param cause the nested exception + */ +public NestedRuntimeException(String msg, Throwable cause) { +super(msg, cause); +} + +/** + * Build a message for the given base message and root cause. + * + * @param message the base message + * @param cause the root cause + * @return the full exception message + */ +private static String getMessageWithCause(String message, Throwable cause) { +if (cause != null) { +StringBuilder sb = new StringBuilder(); +if (message != null) { +sb.append(message).append("; "); +} +sb.append("nested exception is ").append(cause); +return sb.toString(); +} else { +return message; +} +} + +/** + * Return the detail message, including the message from the nested exception + * if there is one. + */ +@Override +public String getMessage() { +return getMessageWithCause(super.getMessage(), getCause()); +} + +/** + * Retrieve the innermost cause of this exception, if any. + * + * @return the innermost exception, or {@code null} if none + */ +public Throwable getRootCause() { +Throwable rootCause = null; +Throwable cause = getCause(); +while (cause != null && cause != rootCause) { +rootCause = cause; +cause = cause.getCause(); +} +return rootCause; +} + +} http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/RemoteAccessException.java -- diff --git a/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/RemoteAccessException.java b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/RemoteAccessException.java new file mode 100644 index 000..6ce6dd4 --- /dev/null +++ b/remoting-core/remoting-api/src/main/java/org/apache/rocketmq/remoting/api/exception/RemoteAccessException.java @@ -0,0 +1,57 @@ +/* + * 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
[6/8] incubator-rocketmq git commit: initialize RocketMQ5
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/ChannelHandlerContextWrapperImpl.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/ChannelHandlerContextWrapperImpl.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/ChannelHandlerContextWrapperImpl.java new file mode 100644 index 000..bbd33ea --- /dev/null +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/ChannelHandlerContextWrapperImpl.java @@ -0,0 +1,33 @@ +/* + * 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.rocketmq.remoting.impl.channel; + +import org.apache.rocketmq.remoting.api.channel.ChannelHandlerContextWrapper; + +public class ChannelHandlerContextWrapperImpl implements ChannelHandlerContextWrapper { + +private io.netty.channel.ChannelHandlerContext context; + +public ChannelHandlerContextWrapperImpl(io.netty.channel.ChannelHandlerContext context) { +this.context = context; +} + +public io.netty.channel.ChannelHandlerContext getContext() { +return context; +} +} http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/0b88e66f/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/FileRegionImpl.java -- diff --git a/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/FileRegionImpl.java b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/FileRegionImpl.java new file mode 100644 index 000..b90afc1 --- /dev/null +++ b/remoting-core/remoting-impl/src/main/java/org/apache/rocketmq/remoting/impl/channel/FileRegionImpl.java @@ -0,0 +1,85 @@ +/* + * 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.rocketmq.remoting.impl.channel; + +import io.netty.channel.FileRegion; +import io.netty.util.AbstractReferenceCounted; +import java.io.IOException; +import java.nio.channels.WritableByteChannel; +import org.apache.rocketmq.remoting.api.channel.ChunkRegion; + +public class FileRegionImpl extends AbstractReferenceCounted implements FileRegion { +private final ChunkRegion chunkRegion; + +public FileRegionImpl(ChunkRegion chunkRegion) { +this.chunkRegion = chunkRegion; +} + +@Override +public long position() { +return chunkRegion.position(); +} + +@Override +public long transfered() { +return chunkRegion.transferred(); +} + +@Override +public long transferred() { +return chunkRegion.transferred(); +} + +@Override +public long count() { +return chunkRegion.count(); +} + +@Override +public long transferTo(WritableByteChannel target, long position) throws IOException { +return chunkRegion.transferTo(target, position); +} + +@Override +protected void deallocate() { +chunkRegion.release(); +} + +@Override +public FileRegion retain() { +super.retain(); +return this; +} + +@Override +public FileRegion retain(int increment) { +super.retain(increment); +return this; +} + +@Override +public FileRegion
[8/8] incubator-rocketmq git commit: initialize RocketMQ5
initialize RocketMQ5 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/0b88e66f Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/0b88e66f Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/0b88e66f Branch: refs/heads/rocketmq5 Commit: 0b88e66fa8c8121d35a133e277d9e40093e91b06 Parents: Author: yukon <yu...@apache.org> Authored: Tue Sep 19 15:22:16 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Sep 19 15:22:16 2017 +0800 -- .gitignore | 10 + CONTRIBUTING.md | 15 + README.md | 51 ++ example/pom.xml | 39 ++ .../rpc/example/model/TradeRequest.java | 47 ++ .../rpc/example/model/TradeResponse.java| 38 ++ .../rpc/example/model/TradeServiceAPI.java | 47 ++ .../rpc/example/model/TradeServiceAPIGen.java | 60 ++ .../rpc/example/model/TradeServiceAPIImpl.java | 68 ++ .../rocketmq/rpc/example/quickstart/Client.java | 35 + .../rocketmq/rpc/example/quickstart/Server.java | 30 + pom.xml | 166 + remoting-core/pom.xml | 146 + remoting-core/remoting-api/pom.xml | 41 ++ .../rocketmq/remoting/api/AsyncHandler.java | 34 + .../remoting/api/ConnectionService.java | 24 + .../rocketmq/remoting/api/ObjectLifecycle.java | 29 + .../rocketmq/remoting/api/RemotingClient.java | 28 + .../rocketmq/remoting/api/RemotingEndPoint.java | 23 + .../remoting/api/RemotingMarshaller.java| 27 + .../rocketmq/remoting/api/RemotingServer.java | 32 + .../rocketmq/remoting/api/RemotingService.java | 40 ++ .../rocketmq/remoting/api/RequestProcessor.java | 25 + .../remoting/api/buffer/ByteBufferWrapper.java | 56 ++ .../api/channel/ChannelEventListener.java | 28 + .../channel/ChannelHandlerContextWrapper.java | 21 + .../remoting/api/channel/ChunkRegion.java | 54 ++ .../remoting/api/channel/RemotingChannel.java | 78 +++ .../remoting/api/command/RemotingCommand.java | 90 +++ .../api/command/RemotingCommandFactory.java | 24 + .../remoting/api/command/TrafficType.java | 40 ++ .../remoting/api/compressable/Compressor.java | 28 + .../api/compressable/CompressorFactory.java | 28 + .../api/exception/NestedRuntimeException.java | 97 +++ .../api/exception/RemoteAccessException.java| 57 ++ .../api/exception/RemoteCodecException.java | 33 + .../RemoteConnectFailureException.java | 49 ++ .../api/exception/RemoteTimeoutException.java | 70 ++ .../api/interceptor/ExceptionContext.java | 76 +++ .../remoting/api/interceptor/Interceptor.java | 26 + .../api/interceptor/InterceptorGroup.java | 49 ++ .../api/interceptor/RequestContext.java | 65 ++ .../api/interceptor/ResponseContext.java| 73 +++ .../remoting/api/protocol/Protocol.java | 39 ++ .../remoting/api/protocol/ProtocolFactory.java | 30 + .../remoting/api/serializable/Serializer.java | 36 ++ .../api/serializable/SerializerFactory.java | 28 + .../apache/rocketmq/remoting/common/Pair.java | 44 ++ .../remoting/common/TypePresentation.java | 73 +++ remoting-core/remoting-impl/pom.xml | 71 ++ .../common/ChannelEventListenerGroup.java | 61 ++ .../common/RemotingCommandFactoryMeta.java | 49 ++ .../remoting/common/ResponseResult.java | 190 ++ .../common/SemaphoreReleaseOnlyOnce.java| 40 ++ .../remoting/common/metrics/ChannelMetrics.java | 27 + .../remoting/config/RemotingConfig.java | 375 +++ .../remoting/config/TcpSocketConfig.java| 98 +++ .../rocketmq/remoting/external/ThreadUtils.java | 177 + .../impl/buffer/NettyByteBufferWrapper.java | 114 .../ChannelHandlerContextWrapperImpl.java | 33 + .../remoting/impl/channel/FileRegionImpl.java | 85 +++ .../remoting/impl/channel/NettyChannelImpl.java | 94 +++ .../remoting/impl/command/CodecHelper.java | 180 ++ .../command/RemotingCommandFactoryImpl.java | 53 ++ .../impl/command/RemotingCommandImpl.java | 210 ++ .../impl/command/RequestIdGenerator.java| 34 + .../remoting/impl/netty/NettyChannelEvent.java | 55 ++ .../impl/netty/NettyChannelEventType.java | 25 + .../impl/netty/NettyRemotingAbstract.java | 641 +++ .../impl/netty/NettyRemotingClient.java | 499 +++ .../impl/netty/NettyRemotingServer.java | 286 + .../impl/netty/RemotingBootstrapFactory.java| 60 ++ .../impl/netty/handler/ChannelStatistics.java | 61 ++ .../remoting/impl/netty/handler/Decoder.j
incubator-rocketmq git commit: [ROCKETMQ-281] Add check policy for preventing repeat start mq
Repository: incubator-rocketmq Updated Branches: refs/heads/develop 254d43249 -> 6a97d2884 [ROCKETMQ-281] Add check policy for preventing repeat start mq Author: å å² <yubao@alibaba-inc.com> Author: fuyou001 <fuyou...@gmail.com> Closes #158 from fuyou001/ROCKETMQ-281. Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/6a97d288 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/6a97d288 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/6a97d288 Branch: refs/heads/develop Commit: 6a97d2884fe8ea23de8f231c8647b99ea5be1811 Parents: 254d432 Author: å å² <yubao@alibaba-inc.com> Authored: Tue Sep 5 11:30:11 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Sep 5 11:30:11 2017 +0800 -- .../apache/rocketmq/broker/BrokerStartup.java | 4 +- .../rocketmq/broker/BrokerStartupTest.java | 3 +- .../rocketmq/store/DefaultMessageStore.java | 62 ++-- .../store/config/StorePathConfigHelper.java | 4 ++ .../rocketmq/store/DefaultMessageStoreTest.java | 28 - 5 files changed, 80 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/6a97d288/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java -- diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java index e0a3b69..94ebe4f 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java @@ -54,7 +54,9 @@ public class BrokerStartup { public static BrokerController start(BrokerController controller) { try { + controller.start(); + String tip = "The broker[" + controller.getBrokerConfig().getBrokerName() + ", " + controller.getBrokerAddr() + "] boot success. serializeType=" + RemotingCommand.getSerializeTypeConfigInThisServer(); @@ -242,7 +244,7 @@ public class BrokerStartup { System.setProperty("rocketmq.namesrv.domain.subgroup", rmqAddressServerSubGroup); } -public static Options buildCommandlineOptions(final Options options) { +private static Options buildCommandlineOptions(final Options options) { Option opt = new Option("c", "configFile", true, "Broker config properties file"); opt.setRequired(false); options.addOption(opt); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/6a97d288/broker/src/test/java/org/apache/rocketmq/broker/BrokerStartupTest.java -- diff --git a/broker/src/test/java/org/apache/rocketmq/broker/BrokerStartupTest.java b/broker/src/test/java/org/apache/rocketmq/broker/BrokerStartupTest.java index a5ad3ac..c8da08d 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/BrokerStartupTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/BrokerStartupTest.java @@ -25,6 +25,8 @@ import org.junit.Test; public class BrokerStartupTest { +private String storePathRootDir = "."; + @Test public void testProperties2SystemEnv() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { @@ -36,5 +38,4 @@ public class BrokerStartupTest { method.invoke(null, properties); Assert.assertEquals("value", System.getProperty("rocketmq.namesrv.domain")); } - } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/6a97d288/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java index ffa8dbc..59ef490 100644 --- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java +++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java @@ -16,6 +16,25 @@ */ package org.apache.rocketmq.store; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.SocketAddress; +import java.nio.ByteBuffer; +import java.nio.channels.FileLock; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import ja
[2/2] incubator-rocketmq-site git commit: Release at 20180907
Release at 20180907 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/de85b26a Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/de85b26a Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/de85b26a Branch: refs/heads/asf-site Commit: de85b26a24d0df4db95966941d10cb6cf83b485a Parents: c0c525d Author: yukon <yu...@apache.org> Authored: Thu Sep 7 14:23:02 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Thu Sep 7 14:23:02 2017 +0800 -- content/about/contact/index.html| 4 ++-- content/about/rewards/index.html| 4 ++-- content/about/team/index.html | 4 ++-- content/docs/batch-example/index.html | 4 ++-- content/docs/best-practice-broker/index.html| 4 ++-- content/docs/best-practice-consumer/index.html | 4 ++-- content/docs/best-practice-namesvr/index.html | 4 ++-- content/docs/best-practice-producer/index.html | 4 ++-- content/docs/broadcast-example/index.html | 4 ++-- content/docs/cli-admin-tool/index.html | 4 ++-- content/docs/cluster-deployment/index.html | 4 ++-- content/docs/code-guidelines/index.html | 4 ++-- content/docs/core-concept/index.html| 4 ++-- content/docs/create-pull-request/index.html | 4 ++-- content/docs/documentation/index.html | 4 ++-- content/docs/faq/index.html | 4 ++-- content/docs/filter-by-sql92-example/index.html | 4 ++-- content/docs/how-to-contribute/index.html | 4 ++-- content/docs/logappender-example/index.html | 4 ++-- content/docs/motivation/index.html | 4 ++-- content/docs/openmessaging-example/index.html | 4 ++-- content/docs/order-example/index.html | 4 ++-- content/docs/pull-request/index.html| 21 ++-- content/docs/quick-start/index.html | 4 ++-- content/docs/release-manual.html| 4 ++-- content/docs/rmq-arc/index.html | 4 ++-- content/docs/rmq-deployment/index.html | 4 ++-- content/docs/roadmap/index.html | 4 ++-- content/docs/schedule-example/index.html| 4 ++-- content/docs/simple-example/index.html | 4 ++-- content/docs/system-config/index.html | 4 ++-- content/dowloading/releases/index.html | 4 ++-- content/feed.xml| 2 +- 33 files changed, 82 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/de85b26a/content/about/contact/index.html -- diff --git a/content/about/contact/index.html b/content/about/contact/index.html index 6a95b97..773e713 100644 --- a/content/about/contact/index.html +++ b/content/about/contact/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/de85b26a/content/about/rewards/index.html -- diff --git a/content/about/rewards/index.html b/content/about/rewards/index.html index 088c684..9dc4fd9 100644 --- a/content/about/rewards/index.html +++ b/content/about/rewards/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/de85b26a/content/about/team/index.html -- diff --git a/content/about/team/index.html b/content/about/team/index.html index 0c996ef..5274ec2 100644 --- a/content/about/team/index.html +++ b/content/about/team/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/de85b26a/content/docs/batch-example/index.html -- diff --git a/content/docs/batch-example/index.html b/content/docs/batch-example/index.html index c7aa2d1..c95301c 100644 --- a/content/docs/batch-example/index.html +++ b/content/docs/batch-example/index.html @@ -57,7 +57,7 @@ - + @@ -466,7 +466,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/de85b26a/content/docs/best-practice-broker/index.html -
incubator-rocketmq-site git commit: Add a checklist when create a pull request
Repository: incubator-rocketmq-site Updated Branches: refs/heads/master 9dce04a64 -> e194d2beb Add a checklist when create a pull request 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/e194d2be Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/e194d2be Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/e194d2be Branch: refs/heads/master Commit: e194d2bebc2458671c7f827b10e177bcfd1b67c7 Parents: 9dce04a Author: yukon <yu...@apache.org> Authored: Thu Sep 7 14:21:20 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Thu Sep 7 14:21:20 2017 +0800 -- _docs/06-best-practice-pull-request.md | 16 1 file changed, 16 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/e194d2be/_docs/06-best-practice-pull-request.md -- diff --git a/_docs/06-best-practice-pull-request.md b/_docs/06-best-practice-pull-request.md index 321ba1a..084cbf8 100644 --- a/_docs/06-best-practice-pull-request.md +++ b/_docs/06-best-practice-pull-request.md @@ -83,6 +83,22 @@ Pull requests are made to `apache/incubator-rocketmq` repository on Github. In the Github UI you should pick the master branch as target of the PR. You pull request will be reviewed and commented by committers, and issues can be discussed. When all reviewers are positive on the pull request, it will be merged. +# Check List for a PR + +Each pull request should follow this checklist to help us incorporate your contribution quickly and easily: + +```markdown +- [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/projects/ROCKETMQ/issues/) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. +- [ ] Format the pull request title like `[ROCKETMQ-XXX] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body. +- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. +- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-rocketmq/tree/master/test). +- [ ] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test` to make sure integration-test pass. +- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas). + +``` + +Remember use `- [x]` mark a item finished in the check list and there is a [demo pull request](https://github.com/apache/incubator-rocketmq/pull/152) can be your reference. + # Merging a PR (yours or contributors) Start with reading [GitHub PR merging locally](https://help.github.com/articles/checking-out-pull-requests-locally/). Remember that pull requests are equivalent to a remote github branch with potentially a multitude of commits. In this case it is recommended to squash remote commit history to have one commit per issue, rather than merging in a multitude of contributor's commits. In order to do that, as well as to close the PR at the same time, it is recommended to use squash commits. Merging pull requests are equivalent to a "pull" of a contributor's branch:
[1/2] incubator-rocketmq-site git commit: Add a checklist when create a pull request
Repository: incubator-rocketmq-site Updated Branches: refs/heads/asf-site d32317148 -> de85b26a2 Add a checklist when create a pull request 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/c0c525d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/c0c525d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/c0c525d3 Branch: refs/heads/asf-site Commit: c0c525d306a9db83da44fb06a16c2893e19a1283 Parents: d323171 Author: yukon <yu...@apache.org> Authored: Thu Sep 7 14:21:20 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Thu Sep 7 14:21:55 2017 +0800 -- _docs/06-best-practice-pull-request.md | 16 1 file changed, 16 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/c0c525d3/_docs/06-best-practice-pull-request.md -- diff --git a/_docs/06-best-practice-pull-request.md b/_docs/06-best-practice-pull-request.md index 321ba1a..084cbf8 100644 --- a/_docs/06-best-practice-pull-request.md +++ b/_docs/06-best-practice-pull-request.md @@ -83,6 +83,22 @@ Pull requests are made to `apache/incubator-rocketmq` repository on Github. In the Github UI you should pick the master branch as target of the PR. You pull request will be reviewed and commented by committers, and issues can be discussed. When all reviewers are positive on the pull request, it will be merged. +# Check List for a PR + +Each pull request should follow this checklist to help us incorporate your contribution quickly and easily: + +```markdown +- [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/projects/ROCKETMQ/issues/) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. +- [ ] Format the pull request title like `[ROCKETMQ-XXX] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body. +- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. +- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-rocketmq/tree/master/test). +- [ ] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test` to make sure integration-test pass. +- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas). + +``` + +Remember use `- [x]` mark a item finished in the check list and there is a [demo pull request](https://github.com/apache/incubator-rocketmq/pull/152) can be your reference. + # Merging a PR (yours or contributors) Start with reading [GitHub PR merging locally](https://help.github.com/articles/checking-out-pull-requests-locally/). Remember that pull requests are equivalent to a remote github branch with potentially a multitude of commits. In this case it is recommended to squash remote commit history to have one commit per issue, rather than merging in a multitude of contributor's commits. In order to do that, as well as to close the PR at the same time, it is recommended to use squash commits. Merging pull requests are equivalent to a "pull" of a contributor's branch:
incubator-rocketmq git commit: Polish chapter 'Learn it & Contact us' in README [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/master b8433d87f -> 2ddb744b3 (forced update) Polish chapter 'Learn it & Contact us' in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/2ddb744b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/2ddb744b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/2ddb744b Branch: refs/heads/master Commit: 2ddb744b3157604ec87a82143c3100728589c6ec Parents: 421a22c Author: yukon <yu...@apache.org> Authored: Mon Aug 21 16:18:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Aug 21 16:19:32 2017 +0800 -- README.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/2ddb744b/README.md -- diff --git a/README.md b/README.md index 0047c7d..cbf4629 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ It offers a variety of features: -- ## Learn it & Contact us -* Mailing Lists: <http://rocketmq.incubator.apache.org/about/contact/> +* Mailing Lists: <https://rocketmq.incubator.apache.org/about/contact/> * Home: <https://rocketmq.incubator.apache.org> -* Wiki: <https://cwiki.apache.org/confluence/display/ROCKETMQ/Apache+RocketMQ+Home> +* Docs: <https://rocketmq.incubator.apache.org/docs/quick-start/> * Issues: <https://issues.apache.org/jira/browse/RocketMQ> -* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* Ask: <https://stackoverflow.com/questions/tagged/rocketmq> -- @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards. more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) -- ## License
incubator-rocketmq git commit: Polish chapter 'Learn it & Contact us' in README
Repository: incubator-rocketmq Updated Branches: refs/heads/develop 332df78e2 -> ca14a2d47 Polish chapter 'Learn it & Contact us' in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/ca14a2d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/ca14a2d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/ca14a2d4 Branch: refs/heads/develop Commit: ca14a2d474b6c71143944ec95f7c28e23e15632d Parents: 332df78 Author: yukon <yu...@apache.org> Authored: Mon Aug 21 16:18:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Aug 21 16:31:28 2017 +0800 -- README.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ca14a2d4/README.md -- diff --git a/README.md b/README.md index 0047c7d..cbf4629 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ It offers a variety of features: -- ## Learn it & Contact us -* Mailing Lists: <http://rocketmq.incubator.apache.org/about/contact/> +* Mailing Lists: <https://rocketmq.incubator.apache.org/about/contact/> * Home: <https://rocketmq.incubator.apache.org> -* Wiki: <https://cwiki.apache.org/confluence/display/ROCKETMQ/Apache+RocketMQ+Home> +* Docs: <https://rocketmq.incubator.apache.org/docs/quick-start/> * Issues: <https://issues.apache.org/jira/browse/RocketMQ> -* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* Ask: <https://stackoverflow.com/questions/tagged/rocketmq> -- @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards. more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) -- ## License
incubator-rocketmq git commit: Polish chapter 'Learn it & Contact us' in README
Repository: incubator-rocketmq Updated Branches: refs/heads/master 421a22c73 -> b8433d87f Polish chapter 'Learn it & Contact us' in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/b8433d87 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/b8433d87 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/b8433d87 Branch: refs/heads/master Commit: b8433d87f6518822127b403fc57852e6953127f4 Parents: 421a22c Author: yukon <yu...@apache.org> Authored: Mon Aug 21 16:18:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Aug 21 16:18:21 2017 +0800 -- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/b8433d87/README.md -- diff --git a/README.md b/README.md index 0047c7d..416a6ed 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ It offers a variety of features: -- ## Learn it & Contact us -* Mailing Lists: <http://rocketmq.incubator.apache.org/about/contact/> +* Mailing Lists: <https://rocketmq.incubator.apache.org/about/contact/> * Home: <https://rocketmq.incubator.apache.org> -* Wiki: <https://cwiki.apache.org/confluence/display/ROCKETMQ/Apache+RocketMQ+Home> +* Docs: <https://rocketmq.incubator.apache.org/docs/quick-start/> * Issues: <https://issues.apache.org/jira/browse/RocketMQ> -* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* Ask: <https://stackoverflow.com/questions/tagged/rocketmq> --
incubator-rocketmq-site git commit: Add some user logos
Repository: incubator-rocketmq-site Updated Branches: refs/heads/master 92fc39f48 -> 77bf3831b Add some user logos 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/77bf3831 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/77bf3831 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/77bf3831 Branch: refs/heads/master Commit: 77bf3831b6fe5530a62aed3efc2aa2e1d709ef88 Parents: 92fc39f Author: yukon <yu...@apache.org> Authored: Tue Aug 22 19:23:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Aug 22 20:30:51 2017 +0800 -- _pages/users.md | 51 +- assets/images/community/gome-logo.png| Bin 0 -> 18321 bytes assets/images/community/huawei-logo.png | Bin 0 -> 4235 bytes assets/images/community/iqiyi-logo.png | Bin 0 -> 15922 bytes assets/images/community/kedaxunfei-logo.png | Bin 0 -> 8267 bytes assets/images/community/mingsheng-logo.gif | Bin 0 -> 5308 bytes assets/images/community/mingsheng-logo.png | Bin 0 -> 11269 bytes assets/images/community/mobike-logo.png | Bin 0 -> 13080 bytes assets/images/community/mogujie-logo.png | Bin 0 -> 8293 bytes assets/images/community/shouqi-logo.png | Bin 0 -> 5281 bytes assets/images/community/shunfeng-logo.png| Bin 0 -> 13829 bytes assets/images/community/wensihaihui-logo.png | Bin 0 -> 10679 bytes assets/images/community/yunpan-logo.png | Bin 14263 -> 13018 bytes 13 files changed, 39 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/77bf3831/_pages/users.md -- diff --git a/_pages/users.md b/_pages/users.md index 78406c5..b4f8443 100644 --- a/_pages/users.md +++ b/_pages/users.md @@ -13,35 +13,56 @@ feature_row: - image_path: /assets/images/community/alibaba-logo.png alt: "Alibaba Group" - image_path: /assets/images/community/ant-logo.png -alt: "China Telecom Group" - - image_path: /assets/images/community/webank-logo.png -alt: "WeBank Group" +alt: "Ant Finance" + - image_path: /assets/images/community/huawei-logo.png +alt: "HuaWei Group" feature_row1: - image_path: /assets/images/community/didi-logo.png alt: "DiDi Group" - - image_path: /assets/images/community/yeahmobi-logo.png -alt: "YeahMobi Group" - - image_path: /assets/images/community/egov-logo.png -alt: "Egov Group" + - image_path: /assets/images/community/webank-logo.png +alt: "WeBank Group" + - image_path: /assets/images/community/iqiyi-logo.png +alt: "IQiYi" feature_row2: + - image_path: /assets/images/community/mingsheng-logo.png +alt: "Ming Sheng Bank" + - image_path: /assets/images/community/shunfeng-logo.png +alt: "ShunFeng Group" + - image_path: /assets/images/community/kedaxunfei-logo.png +alt: "KeDaXunFei" +feature_row3: - image_path: /assets/images/community/china-telecom-logo.png alt: "China Telecom Group" - image_path: /assets/images/community/media-logo.jpg alt: "Media Group" - - image_path: /assets/images/community/decent-logo.png -alt: "Decent Group" -feature_row3: + - image_path: /assets/images/community/mogujie-logo.png +alt: "Mogujie" +feature_row4: + - image_path: /assets/images/community/gome-logo.png +alt: "Gome" + - image_path: /assets/images/community/wensihaihui-logo.png +alt: "WenSiHaiHui" + - image_path: /assets/images/community/mobike-logo.png +alt: "MoBike" +feature_row5: - image_path: /assets/images/community/yunpan-logo.png alt: "Yunpan Group" - image_path: /assets/images/community/shihai-logo.jpg alt: "Shihai Group" - image_path: /assets/images/community/tree-logo.png alt: "Tree Finance Group" -feature_row4: +feature_row6: - image_path: /assets/images/community/yhsoft-logo.png alt: "YH software Group" - image_path: /assets/images/community/fenqile-logo.png alt: "Fenqile Group" + - image_path: /assets/images/community/egov-logo.png +alt: "Egov Group" +feature_row7: + - image_path: /assets/images/community/shouqi-logo.png +alt: "ShouQiYueChe" + - image_path: /assets/images/community/decent-logo.png +alt: "Decent Group" intro: - excerpt: "Who uses Apache RocketMQ ? " @@ -57,4 +78,10 @@ intro: {% include feature_row id="feature_r
[2/2] incubator-rocketmq-site git commit: Release at 2017.08.22
Release at 2017.08.22 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/1d2c295e Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/1d2c295e Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/1d2c295e Branch: refs/heads/asf-site Commit: 1d2c295e9fc7d2def3b4dd06abd52f6d6eb326c9 Parents: 3ef142f Author: yukon <yu...@apache.org> Authored: Tue Aug 22 20:33:04 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Aug 22 20:33:04 2017 +0800 -- content/about/contact/index.html| 4 +- content/about/rewards/index.html| 4 +- content/about/team/index.html | 4 +- content/assets/images/community/gome-logo.png | Bin 0 -> 18321 bytes content/assets/images/community/huawei-logo.png | Bin 0 -> 4235 bytes content/assets/images/community/iqiyi-logo.png | Bin 0 -> 15922 bytes .../assets/images/community/kedaxunfei-logo.png | Bin 0 -> 8267 bytes .../assets/images/community/mingsheng-logo.gif | Bin 0 -> 5308 bytes .../assets/images/community/mingsheng-logo.png | Bin 0 -> 11269 bytes content/assets/images/community/mobike-logo.png | Bin 0 -> 13080 bytes .../assets/images/community/mogujie-logo.png| Bin 0 -> 8293 bytes content/assets/images/community/shouqi-logo.png | Bin 0 -> 5281 bytes .../assets/images/community/shunfeng-logo.png | Bin 0 -> 13829 bytes .../images/community/wensihaihui-logo.png | Bin 0 -> 10679 bytes content/assets/images/community/yunpan-logo.png | Bin 14263 -> 13018 bytes content/docs/batch-example/index.html | 4 +- content/docs/best-practice-broker/index.html| 4 +- content/docs/best-practice-consumer/index.html | 4 +- content/docs/best-practice-namesvr/index.html | 4 +- content/docs/best-practice-producer/index.html | 4 +- content/docs/broadcast-example/index.html | 4 +- content/docs/cli-admin-tool/index.html | 4 +- content/docs/cluster-deployment/index.html | 4 +- content/docs/code-guidelines/index.html | 4 +- content/docs/core-concept/index.html| 4 +- content/docs/create-pull-request/index.html | 4 +- content/docs/documentation/index.html | 4 +- content/docs/faq/index.html | 4 +- content/docs/filter-by-sql92-example/index.html | 4 +- content/docs/logappender-example/index.html | 4 +- content/docs/motivation/index.html | 4 +- content/docs/openmessaging-example/index.html | 4 +- content/docs/order-example/index.html | 4 +- content/docs/pull-request/index.html| 4 +- content/docs/quick-start/index.html | 4 +- content/docs/release-manual.html| 4 +- content/docs/rmq-arc/index.html | 4 +- content/docs/rmq-deployment/index.html | 4 +- content/docs/roadmap/index.html | 4 +- content/docs/schedule-example/index.html| 4 +- content/docs/simple-example/index.html | 4 +- content/docs/system-config/index.html | 4 +- content/dowloading/releases/index.html | 4 +- content/feed.xml| 2 +- content/users/index.html| 217 ++- 45 files changed, 275 insertions(+), 68 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/1d2c295e/content/about/contact/index.html -- diff --git a/content/about/contact/index.html b/content/about/contact/index.html index 15a5bad..0184cc9 100644 --- a/content/about/contact/index.html +++ b/content/about/contact/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/1d2c295e/content/about/rewards/index.html -- diff --git a/content/about/rewards/index.html b/content/about/rewards/index.html index 4b7a5a6..fae3dcf 100644 --- a/content/about/rewards/index.html +++ b/content/about/rewards/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/1d2c295e/content/about/team/index.html -- diff --git a/content/about/team/index.html b/content/about/team/index.html index d736366..c2e6960 100644 --- a/content/about/team/index.h
[2/2] incubator-rocketmq-site git commit: Release at 20170825
Release at 20170825 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/d3231714 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/d3231714 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/d3231714 Branch: refs/heads/asf-site Commit: d323171480848550f7ba8cf4e373aafdc2c25a2b Parents: 7719b1d Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:47:51 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:47:51 2017 +0800 -- content/about/contact/index.html| 22 +--- content/about/rewards/index.html| 4 ++-- content/about/team/index.html | 4 ++-- content/docs/batch-example/index.html | 4 ++-- content/docs/best-practice-broker/index.html| 4 ++-- content/docs/best-practice-consumer/index.html | 4 ++-- content/docs/best-practice-namesvr/index.html | 4 ++-- content/docs/best-practice-producer/index.html | 4 ++-- content/docs/broadcast-example/index.html | 4 ++-- content/docs/cli-admin-tool/index.html | 4 ++-- content/docs/cluster-deployment/index.html | 4 ++-- content/docs/code-guidelines/index.html | 4 ++-- content/docs/core-concept/index.html| 4 ++-- content/docs/create-pull-request/index.html | 4 ++-- content/docs/documentation/index.html | 4 ++-- content/docs/faq/index.html | 4 ++-- content/docs/filter-by-sql92-example/index.html | 4 ++-- content/docs/how-to-contribute/index.html | 4 ++-- content/docs/logappender-example/index.html | 4 ++-- content/docs/motivation/index.html | 4 ++-- content/docs/openmessaging-example/index.html | 4 ++-- content/docs/order-example/index.html | 4 ++-- content/docs/pull-request/index.html| 4 ++-- content/docs/quick-start/index.html | 4 ++-- content/docs/release-manual.html| 4 ++-- content/docs/rmq-arc/index.html | 4 ++-- content/docs/rmq-deployment/index.html | 4 ++-- content/docs/roadmap/index.html | 4 ++-- content/docs/schedule-example/index.html| 4 ++-- content/docs/simple-example/index.html | 4 ++-- content/docs/system-config/index.html | 4 ++-- content/dowloading/releases/index.html | 4 ++-- content/feed.xml| 2 +- 33 files changed, 82 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/d3231714/content/about/contact/index.html -- diff --git a/content/about/contact/index.html b/content/about/contact/index.html index 28a0ade..6a95b97 100644 --- a/content/about/contact/index.html +++ b/content/about/contact/index.html @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@ http://schema.org/CreativeWork;> - + @@ -271,7 +271,23 @@ -Besides, we hold tagged questions on http://stackoverflow.com/questions/tagged/rocketmq;>stackoverflow.com where you can launch an interactive discussion. Also, you can try to find answers to your question about RocketMQ on Quora https://www.quora.com/topic/RocketMQ;>here. +Security Issues Tracking + +Apache RocketMQ specifically offers security features and is responsive to issues around its features. If you have any concern around RocketMQ Security or believe you have uncovered a vulnerability, please report it via the e-mail address mailto:priv...@rocketmq.apache.org;>priv...@rocketmq.apache.org. In the message, try to provide a description of the issue and ideally a way of reproducing it. + +Dealing with fixed issues or general questions on how to use the security features should be handled regularly via the users and the dev lists. + +The ASF Security team maintains a page with a description of how vulnerabilities are handled, check their http://www.apache.org/security/;>web page for more information. + +Issue Tracking + +Apache RocketMQ project uses JIRA for issue tracking. + +Issues, bugs, and feature requests should be submitted to the https://issues.apache.org/jira/browse/ROCKETMQ;>issue tracking system for this project. + +RocketMQ on Stack Overflow + +We hold tagged questions on http://stackoverflow.com/questions/tagged/rocketmq;>stackoverflow.com where you can launch an interactive discussion. http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/d3231714/content/about/rewards/index.html -- diff --git a/content/about/r
incubator-rocketmq git commit: Polish the contributing guide
Repository: incubator-rocketmq Updated Branches: refs/heads/master 2ddb744b3 -> a8333a73b Polish the contributing guide Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/a8333a73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/a8333a73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/a8333a73 Branch: refs/heads/master Commit: a8333a73b82d83c16c750219541a64ad50eebc3d Parents: 2ddb744 Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:55:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:55:21 2017 +0800 -- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/a8333a73/README.md -- diff --git a/README.md b/README.md index cbf4629..a27ba7b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/) -- ## License
incubator-rocketmq git commit: Polish the contributing guide
Repository: incubator-rocketmq Updated Branches: refs/heads/develop ca14a2d47 -> c6b2a9982 Polish the contributing guide Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/c6b2a998 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/c6b2a998 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/c6b2a998 Branch: refs/heads/develop Commit: c6b2a998237615202ee9c4c6a1480c4a5d0eae59 Parents: ca14a2d Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:55:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:56:05 2017 +0800 -- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c6b2a998/README.md -- diff --git a/README.md b/README.md index cbf4629..a27ba7b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/) -- ## License
incubator-rocketmq-site git commit: Polish the contact page with issue tracking
Repository: incubator-rocketmq-site Updated Branches: refs/heads/master 52516e2b8 -> 9dce04a64 Polish the contact page with issue tracking 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/9dce04a6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/9dce04a6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/9dce04a6 Branch: refs/heads/master Commit: 9dce04a64bbd7c2dbd9453ab3dcdc6ea0442e458 Parents: 52516e2 Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:46:28 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:46:28 2017 +0800 -- _about/02-contact.md | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/9dce04a6/_about/02-contact.md -- diff --git a/_about/02-contact.md b/_about/02-contact.md index 475c971..c1a2415 100644 --- a/_about/02-contact.md +++ b/_about/02-contact.md @@ -17,6 +17,22 @@ These are the mailing lists that have been established for RocketMQ. For each li |Development|Development related discussions|[Subscribe](mailto:dev-subscr...@rocketmq.incubator.apache.org)|[Unsubscribe](mailto:dev-unsubscr...@rocketmq.incubator.apache.org)|[mail-archives.apache.org](http://mail-archives.apache.org/mod_mbox/incubator-rocketmq-dev//)| |Commits|All commits to repositories|[Subscribe](mailto:commits-subscr...@rocketmq.incubator.apache.org)|[Unsubscribe](mailto:commits-unsubscr...@rocketmq.incubator.apache.org)|[mail-archives.apache.org](http://mail-archives.apache.org/mod_mbox/incubator-rocketmq-commits/)| -Besides, we hold tagged questions on [stackoverflow.com](http://stackoverflow.com/questions/tagged/rocketmq) where you can launch an interactive discussion. Also, you can try to find answers to your question about RocketMQ on Quora [here](https://www.quora.com/topic/RocketMQ). +## Security Issues Tracking + +Apache RocketMQ specifically offers security features and is responsive to issues around its features. If you have any concern around RocketMQ Security or believe you have uncovered a vulnerability, please report it via the e-mail address [priv...@rocketmq.apache.org](mailto:priv...@rocketmq.apache.org). In the message, try to provide a description of the issue and ideally a way of reproducing it. + +Dealing with fixed issues or general questions on how to use the security features should be handled regularly via the users and the dev lists. + +The ASF Security team maintains a page with a description of how vulnerabilities are handled, check their [web page](http://www.apache.org/security/) for more information. + +## Issue Tracking + +Apache RocketMQ project uses JIRA for issue tracking. + +Issues, bugs, and feature requests should be submitted to the [issue tracking system](https://issues.apache.org/jira/browse/ROCKETMQ) for this project. + +## RocketMQ on Stack Overflow + +We hold tagged questions on [stackoverflow.com](http://stackoverflow.com/questions/tagged/rocketmq) where you can launch an interactive discussion.
incubator-rocketmq-externals git commit: Add two chapters rocketmq-cpp and contribute in README
Repository: incubator-rocketmq-externals Updated Branches: refs/heads/master 7097594aa -> 114d5e7b9 Add two chapters rocketmq-cpp and contribute in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/commit/114d5e7b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/tree/114d5e7b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/diff/114d5e7b Branch: refs/heads/master Commit: 114d5e7b96af0ba71da188c20f4e7c544848299a Parents: 7097594 Author: yukon <yu...@apache.org> Authored: Mon Sep 4 15:22:02 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Sep 4 15:27:09 2017 +0800 -- README.md | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/114d5e7b/README.md -- diff --git a/README.md b/README.md index 8cd617b..c9e0bdd 100644 --- a/README.md +++ b/README.md @@ -22,5 +22,17 @@ Apache RocketMQ Docker provides Dockerfile and bash scripts for building and run ## RocketMQ-MySQL This project is a data replicator between MySQL and other systems.For more details please refer to [README](https://github.com/apache/incubator-rocketmq-externals/tree/master/rocketmq-mysql). +## RocketMQ-CPP + +A stable, widely used C++ client sdk of Apache RocketMQ, donated by Alibaba Group. + ## Others [RocketMQ-Druid](https://github.com/druid-io/druid/tree/master/extensions-contrib/druid-rocketmq), [RocketMQ-Ignite](https://github.com/apache/ignite/tree/master/modules/rocketmq) and [RocketMQ-Storm](https://github.com/apache/storm/tree/master/external/storm-rocketmq) integration can be found in those repositories. + +## Contribution + +We are always very happy to have contributions, whether for trivial cleanups or big new features. We want to have high quality, well documented codes for each programming language, as well as the surrounding ecosystem of integration tools that people use with RocketMQ. + +Nor is code the only way to contribute to the project. We strongly value documentation, integration with other project, and gladly accept improvements for these aspects. + +More info please refer to [How To Contribute](http://rocketmq.apache.org/docs/how-to-contribute/).
[06/28] incubator-rocketmq git commit: Remove unused class GetRouteInfoResponseHeader and meaningless comments
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java index f507b36..6fc7335 100644 --- a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java +++ b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java @@ -85,9 +85,7 @@ public class HAService { return result; } -/** - */ public void notifyTransferSome(final long offset) { for (long value = this.push2SlaveMaxOffset.get(); offset > value; ) { boolean ok = this.push2SlaveMaxOffset.compareAndSet(value, offset); @@ -374,17 +372,6 @@ public class HAService { return !this.reportOffset.hasRemaining(); } -// private void reallocateByteBuffer() { -// ByteBuffer bb = ByteBuffer.allocate(READ_MAX_BUFFER_SIZE); -// int remain = this.byteBufferRead.limit() - this.dispatchPostion; -// bb.put(this.byteBufferRead.array(), this.dispatchPostion, remain); -// this.dispatchPostion = 0; -// this.byteBufferRead = bb; -// } - -/** - - */ private void reallocateByteBuffer() { int remain = READ_MAX_BUFFER_SIZE - this.dispatchPostion; if (remain > 0) { @@ -426,7 +413,6 @@ public class HAService { break; } } else { -// TODO ERROR log.info("HAClient, processReadEvent read socket < 0"); return false; } @@ -598,8 +584,6 @@ public class HAService { log.info(this.getServiceName() + " service end"); } - -// // private void disableWriteFlag() { // if (this.socketChannel != null) { // SelectionKey sk = this.socketChannel.keyFor(this.selector); @@ -610,8 +594,6 @@ public class HAService { // } // } // } -// -// // private void enableWriteFlag() { // if (this.socketChannel != null) { // SelectionKey sk = this.socketChannel.keyFor(this.selector); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java index 54f5732..862e620 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java @@ -208,7 +208,6 @@ public class IndexFile { if (slotValue <= invalidIndex || slotValue > this.indexHeader.getIndexCount() || this.indexHeader.getIndexCount() <= 1) { -// TODO NOTFOUND } else { for (int nextIndexToRead = slotValue;;) { if (phyOffsets.size() >= maxNum) { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java index 5102a21..3195448 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java @@ -20,11 +20,7 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -/** - * - * - */ public class IndexHeader { public static final int INDEX_HEADER_SIZE = 40; private static int beginTimestampIndex = 0; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java index 25640a4..35b8e85 100644 --- a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java +++ b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java @@ -336,10 +336,7 @@ public class ScheduleMessageService extends ConfigManager { } } // end of if (bufferCQ != null) else { -/* - -
[28/28] incubator-rocketmq git commit: Merge branch 'develop'
Merge branch 'develop' Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/1b853e81 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/1b853e81 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/1b853e81 Branch: refs/heads/master Commit: 1b853e81a9023d8c03e34dcd44bdde77e678804d Parents: a8333a7 08a0c40 Author: yukon <yu...@apache.org> Authored: Tue Aug 29 20:30:02 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Aug 29 20:30:02 2017 +0800 -- .travis.yml | 13 - benchmark/consumer.sh | 18 - benchmark/producer.sh | 18 - benchmark/runclass.sh | 43 --- benchmark/tproducer.sh | 18 - .../rocketmq/broker/BrokerController.java | 11 +- .../rocketmq/broker/BrokerPathConfigHelper.java | 1 - .../apache/rocketmq/broker/BrokerStartup.java | 8 +- .../rocketmq/broker/client/ConsumerManager.java | 3 +- .../client/rebalance/RebalanceLockManager.java | 44 +-- .../broker/filter/ConsumerFilterData.java | 3 - .../broker/filter/ConsumerFilterManager.java| 14 +- .../filter/ExpressionForRetryMessageFilter.java | 4 +- .../broker/filter/ExpressionMessageFilter.java | 2 +- .../broker/filtersrv/FilterServerManager.java | 3 - .../broker/latency/BrokerFastFailure.java | 1 + .../latency/BrokerFixedThreadPoolExecutor.java | 15 +- .../NotifyMessageArrivingListener.java | 2 +- .../longpolling/PullRequestHoldService.java | 2 +- .../broker/offset/ConsumerOffsetManager.java| 3 +- .../rocketmq/broker/out/BrokerOuterAPI.java | 12 +- .../broker/pagecache/ManyMessageTransfer.java | 4 +- .../broker/pagecache/OneMessageTransfer.java| 4 +- .../broker/pagecache/QueryMessageTransfer.java | 4 +- .../plugin/AbstractPluginMessageStore.java | 2 +- .../processor/AbstractSendMessageProcessor.java | 8 +- .../broker/processor/AdminBrokerProcessor.java | 129 --- .../processor/EndTransactionProcessor.java | 3 +- .../broker/processor/PullMessageProcessor.java | 41 +- .../broker/processor/SendMessageProcessor.java | 55 ++- .../subscription/SubscriptionGroupManager.java | 2 +- .../broker/topic/TopicConfigManager.java| 6 +- .../rocketmq/broker/BrokerControllerTest.java | 27 +- .../CommitLogDispatcherCalcBitMapTest.java | 1 - .../filter/ConsumerFilterManagerTest.java | 20 +- .../filter/MessageStoreWithFilterTest.java | 280 +++--- .../processor/PullMessageProcessorTest.java | 9 +- .../processor/SendMessageProcessorTest.java | 13 +- broker/src/test/resources/logback-test.xml | 1 - .../org/apache/rocketmq/client/MQAdmin.java | 21 +- .../org/apache/rocketmq/client/MQHelper.java| 1 - .../org/apache/rocketmq/client/Validators.java | 14 - .../client/consumer/DefaultMQPullConsumer.java | 9 +- .../client/consumer/DefaultMQPushConsumer.java | 73 ++-- .../rocketmq/client/consumer/MQConsumer.java| 16 - .../client/consumer/MQPullConsumer.java | 74 +--- .../client/consumer/MQPushConsumer.java | 18 +- .../client/consumer/MessageSelector.java| 13 +- .../listener/MessageListenerConcurrently.java | 4 +- .../listener/MessageListenerOrderly.java| 7 +- .../AllocateMessageQueueConsistentHash.java | 8 +- .../consumer/store/LocalFileOffsetStore.java| 10 +- .../client/consumer/store/OffsetStore.java | 15 - .../consumer/store/RemoteBrokerOffsetStore.java | 4 +- .../client/impl/ClientRemotingProcessor.java| 25 +- .../rocketmq/client/impl/MQAdminImpl.java | 14 +- .../rocketmq/client/impl/MQClientAPIImpl.java | 379 ++- .../ConsumeMessageConcurrentlyService.java | 66 ++-- .../consumer/ConsumeMessageOrderlyService.java | 92 ++--- .../impl/consumer/ConsumeMessageService.java| 8 +- .../consumer/DefaultMQPullConsumerImpl.java | 104 ++--- .../consumer/DefaultMQPushConsumerImpl.java | 62 +-- .../client/impl/consumer/RebalanceImpl.java | 31 +- .../client/impl/consumer/RebalancePullImpl.java | 3 +- .../client/impl/consumer/RebalancePushImpl.java | 7 +- .../client/impl/consumer/RebalanceService.java | 3 - .../client/impl/factory/MQClientInstance.java | 33 +- .../impl/producer/DefaultMQProducerImpl.java| 113 +++--- .../client/impl/producer/MQProducerInner.java | 6 +- .../rocketmq/client/log/ClientLogger.java | 27 +- .../client/producer/DefaultMQProducer.java | 58 ++- .../producer/LocalTransactionExecuter.java | 2 +- .../rocketmq/client/producer/SendCallback.java | 4 +- .../rocketmq/client/producer/SendResult.j
[20/28] incubator-rocketmq git commit: Remove broken jdk version in travis
Remove broken jdk version in travis Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/629c3e9e Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/629c3e9e Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/629c3e9e Branch: refs/heads/master Commit: 629c3e9ea084d0a2947b2ab6f1cc8b0c6ed98502 Parents: c6b2a99 Author: vongoslingAuthored: Mon Aug 28 10:51:22 2017 +0800 Committer: vongosling Committed: Mon Aug 28 10:51:22 2017 +0800 -- .travis.yml | 13 - 1 file changed, 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/629c3e9e/.travis.yml -- diff --git a/.travis.yml b/.travis.yml index 2bc2296..daa88a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,6 @@ matrix: # On Linux, run with specific JDKs only. - os: linux env: CUSTOM_JDK="oraclejdk8" - - os: linux -env: CUSTOM_JDK="oraclejdk7" - - os: linux -env: CUSTOM_JDK="openjdk7" before_install: - echo 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -XX:MaxPermSize=512m -XX:+BytecodeVerificationLocal"' >> ~/.mavenrc @@ -25,15 +21,6 @@ before_install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi -#os: -# - linux -# - osx -#jdk: -# - oraclejdk8 -# - oraclejdk7 -# - openjdk7 - - script: - travis_retry mvn -B clean apache-rat:check - travis_retry mvn -B package jacoco:report coveralls:report
[05/28] incubator-rocketmq git commit: [ROCKETMQ-209]Remove duplicated code in class MQClientAPIImpl
[ROCKETMQ-209]Remove duplicated code in class MQClientAPIImpl Author: Ritabrata Moitra <rmoi...@thoughtworks.com> Closes #134 from Ritabrata-TW/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/ffad6566 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/ffad6566 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/ffad6566 Branch: refs/heads/master Commit: ffad6566b8aee86b87b34f2c77ab2ae3b9c15b1c Parents: ccc2235 Author: Ritabrata Moitra <rmoi...@thoughtworks.com> Authored: Fri Aug 11 19:59:28 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 19:59:28 2017 +0800 -- .../rocketmq/client/impl/MQClientAPIImpl.java | 160 ++- .../rocketmq/store/DefaultMessageStore.java | 47 +++--- .../rocketmq/store/DefaultMessageStoreTest.java | 21 +-- 3 files changed, 114 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ffad6566/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java -- diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java index 4244bdd..ae9ed6c 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java @@ -18,14 +18,14 @@ package org.apache.rocketmq.client.impl; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; -import java.util.Iterator; -import java.util.Collections; -import java.util.ArrayList; -import java.util.HashMap; import java.util.concurrent.atomic.AtomicInteger; import org.apache.rocketmq.client.ClientConfig; import org.apache.rocketmq.client.consumer.PullCallback; @@ -49,12 +49,12 @@ import org.apache.rocketmq.common.UtilAll; import org.apache.rocketmq.common.admin.ConsumeStats; import org.apache.rocketmq.common.admin.TopicStatsTable; import org.apache.rocketmq.common.message.Message; +import org.apache.rocketmq.common.message.MessageBatch; import org.apache.rocketmq.common.message.MessageClientIDSetter; -import org.apache.rocketmq.common.message.MessageExt; -import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.common.message.MessageConst; import org.apache.rocketmq.common.message.MessageDecoder; -import org.apache.rocketmq.common.message.MessageBatch; +import org.apache.rocketmq.common.message.MessageExt; +import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.common.namesrv.TopAddressing; import org.apache.rocketmq.common.protocol.RequestCode; import org.apache.rocketmq.common.protocol.ResponseCode; @@ -152,7 +152,6 @@ import org.apache.rocketmq.remoting.protocol.RemotingCommand; import org.apache.rocketmq.remoting.protocol.RemotingSerializable; import org.slf4j.Logger; - public class MQClientAPIImpl { private final static Logger log = ClientLogger.getLog(); @@ -169,7 +168,8 @@ public class MQClientAPIImpl { private String nameSrvAddr = null; private ClientConfig clientConfig; -public MQClientAPIImpl(final NettyClientConfig nettyClientConfig, final ClientRemotingProcessor clientRemotingProcessor, +public MQClientAPIImpl(final NettyClientConfig nettyClientConfig, +final ClientRemotingProcessor clientRemotingProcessor, RPCHook rpcHook, final ClientConfig clientConfig) { this.clientConfig = clientConfig; topAddressing = new TopAddressing(MixAll.getWSAddr(), clientConfig.getUnitName()); @@ -233,7 +233,8 @@ public class MQClientAPIImpl { this.remotingClient.shutdown(); } -public void createSubscriptionGroup(final String addr, final SubscriptionGroupConfig config, final long timeoutMillis) +public void createSubscriptionGroup(final String addr, final SubscriptionGroupConfig config, +final long timeoutMillis) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.UPDATE_AND_CREATE_SUBSCRIPTIONGROUP, null); @@ -255,7 +256,8 @@ public class MQClientAPIImpl { } -public void createTopic(final String addr, final String defaultTopic, final TopicConfig topicConfig, final long timeoutMillis) +public void createTopic(final String addr, final String defaultTopic,
[07/28] incubator-rocketmq git commit: Remove unused class GetRouteInfoResponseHeader and meaningless comments
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java -- diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java index 9bf34be..7eda7c1 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java @@ -297,10 +297,10 @@ public class DefaultMQPushConsumerImpl implements MQConsumerInner { pullRequest.getMessageQueue().getTopic(), pullResult.getMsgFoundList().size()); boolean dispathToConsume = processQueue.putMessage(pullResult.getMsgFoundList()); - DefaultMQPushConsumerImpl.this.consumeMessageService.submitConsumeRequest(// -pullResult.getMsgFoundList(), // -processQueue, // -pullRequest.getMessageQueue(), // + DefaultMQPushConsumerImpl.this.consumeMessageService.submitConsumeRequest( +pullResult.getMsgFoundList(), +processQueue, +pullRequest.getMessageQueue(), dispathToConsume); if (DefaultMQPushConsumerImpl.this.defaultMQPushConsumer.getPullInterval() > 0) { @@ -311,12 +311,12 @@ public class DefaultMQPushConsumerImpl implements MQConsumerInner { } } -if (pullResult.getNextBeginOffset() < prevRequestOffset// +if (pullResult.getNextBeginOffset() < prevRequestOffset || firstMsgOffset < prevRequestOffset) { log.warn( -"[BUG] pull message result maybe data wrong, nextBeginOffset: {} firstMsgOffset: {} prevRequestOffset: {}", // -pullResult.getNextBeginOffset(), // -firstMsgOffset, // +"[BUG] pull message result maybe data wrong, nextBeginOffset: {} firstMsgOffset: {} prevRequestOffset: {}", +pullResult.getNextBeginOffset(), +firstMsgOffset, prevRequestOffset); } @@ -336,7 +336,7 @@ public class DefaultMQPushConsumerImpl implements MQConsumerInner { DefaultMQPushConsumerImpl.this.executePullRequestImmediately(pullRequest); break; case OFFSET_ILLEGAL: -log.warn("the pull request offset illegal, {} {}", // +log.warn("the pull request offset illegal, {} {}", pullRequest.toString(), pullResult.toString()); pullRequest.setNextOffset(pullResult.getNextBeginOffset()); @@ -396,26 +396,26 @@ public class DefaultMQPushConsumerImpl implements MQConsumerInner { classFilter = sd.isClassFilterMode(); } -int sysFlag = PullSysFlag.buildSysFlag(// +int sysFlag = PullSysFlag.buildSysFlag( commitOffsetEnable, // commitOffset true, // suspend subExpression != null, // subscription classFilter // class filter ); try { -this.pullAPIWrapper.pullKernelImpl(// -pullRequest.getMessageQueue(), // 1 -subExpression, // 2 -subscriptionData.getExpressionType(), // 3 -subscriptionData.getSubVersion(), // 4 -pullRequest.getNextOffset(), // 5 -this.defaultMQPushConsumer.getPullBatchSize(), // 6 -sysFlag, // 7 -commitOffsetValue, // 8 -BROKER_SUSPEND_MAX_TIME_MILLIS, // 9 -CONSUMER_TIMEOUT_MILLIS_WHEN_SUSPEND, // 10 -CommunicationMode.ASYNC, // 11 -pullCallback // 12 +this.pullAPIWrapper.pullKernelImpl( +pullRequest.getMessageQueue(), +subExpression, +subscriptionData.getExpressionType(), +subscriptionData.getSubVersion(), +pullRequest.getNextOffset(), +this.defaultMQPushConsumer.getPullBatchSize(), +sysFlag, +commitOffsetValue, +
[14/28] incubator-rocketmq git commit: Reformat code globally second time
Reformat code globally second time Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/97aa813e Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/97aa813e Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/97aa813e Branch: refs/heads/master Commit: 97aa813eb89c14e0539a8847876d7a28a1efe638 Parents: 7f96008 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 20:46:04 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 20:50:22 2017 +0800 -- .../rocketmq/broker/BrokerPathConfigHelper.java | 1 - .../rocketmq/broker/client/ConsumerManager.java | 3 +- .../broker/filter/ConsumerFilterData.java | 3 - .../broker/filter/ConsumerFilterManager.java| 14 +-- .../filter/ExpressionForRetryMessageFilter.java | 4 +- .../broker/filter/ExpressionMessageFilter.java | 2 +- .../broker/filtersrv/FilterServerManager.java | 1 - .../broker/latency/BrokerFastFailure.java | 1 + .../latency/BrokerFixedThreadPoolExecutor.java | 15 ++- .../NotifyMessageArrivingListener.java | 2 +- .../longpolling/PullRequestHoldService.java | 2 +- .../broker/offset/ConsumerOffsetManager.java| 3 +- .../rocketmq/broker/out/BrokerOuterAPI.java | 12 +- .../broker/pagecache/ManyMessageTransfer.java | 4 +- .../broker/pagecache/OneMessageTransfer.java| 4 +- .../broker/pagecache/QueryMessageTransfer.java | 4 +- .../plugin/AbstractPluginMessageStore.java | 2 +- .../broker/processor/AdminBrokerProcessor.java | 82 - .../processor/EndTransactionProcessor.java | 3 +- .../broker/processor/PullMessageProcessor.java | 35 +++--- .../broker/processor/SendMessageProcessor.java | 31 +++-- .../subscription/SubscriptionGroupManager.java | 2 +- .../broker/topic/TopicConfigManager.java| 6 +- .../rocketmq/broker/BrokerControllerTest.java | 2 +- .../CommitLogDispatcherCalcBitMapTest.java | 1 - .../filter/MessageStoreWithFilterTest.java | 7 +- .../processor/PullMessageProcessorTest.java | 9 +- .../processor/SendMessageProcessorTest.java | 13 +- .../org/apache/rocketmq/client/MQAdmin.java | 21 +--- .../org/apache/rocketmq/client/MQHelper.java| 1 - .../org/apache/rocketmq/client/Validators.java | 14 --- .../client/consumer/DefaultMQPullConsumer.java | 9 +- .../client/consumer/DefaultMQPushConsumer.java | 73 ++- .../rocketmq/client/consumer/MQConsumer.java| 16 --- .../client/consumer/MQPullConsumer.java | 74 +-- .../client/consumer/MQPushConsumer.java | 18 +-- .../client/consumer/MessageSelector.java| 13 +- .../listener/MessageListenerConcurrently.java | 4 +- .../listener/MessageListenerOrderly.java| 7 +- .../AllocateMessageQueueConsistentHash.java | 8 +- .../client/consumer/store/OffsetStore.java | 15 --- .../client/impl/ClientRemotingProcessor.java| 25 ++-- .../rocketmq/client/impl/MQAdminImpl.java | 12 +- .../consumer/ConsumeMessageOrderlyService.java | 6 +- .../client/impl/consumer/RebalanceImpl.java | 9 +- .../client/impl/consumer/RebalancePullImpl.java | 3 +- .../client/impl/consumer/RebalancePushImpl.java | 3 +- .../client/impl/factory/MQClientInstance.java | 6 +- .../impl/producer/DefaultMQProducerImpl.java| 21 ++-- .../rocketmq/client/log/ClientLogger.java | 2 +- .../client/producer/DefaultMQProducer.java | 58 ++--- .../rocketmq/client/producer/SendResult.java| 6 +- .../consumer/DefaultMQPullConsumerTest.java | 20 +-- .../consumer/DefaultMQPushConsumerTest.java | 41 --- .../AllocateMessageQueueConsitentHashTest.java | 45 --- .../store/RemoteBrokerOffsetStoreTest.java | 5 +- .../client/impl/MQClientAPIImplTest.java| 15 ++- .../impl/factory/MQClientInstanceTest.java | 2 +- .../client/producer/DefaultMQProducerTest.java | 18 ++- .../apache/rocketmq/common/BrokerConfig.java| 3 +- .../apache/rocketmq/common/Configuration.java | 4 - .../apache/rocketmq/common/CountDownLatch2.java | 8 +- .../org/apache/rocketmq/common/DataVersion.java | 2 +- .../java/org/apache/rocketmq/common/MixAll.java | 8 +- .../apache/rocketmq/common/ServiceThread.java | 2 +- .../org/apache/rocketmq/common/UtilAll.java | 2 - .../consistenthash/ConsistentHashRouter.java| 19 ++- .../rocketmq/common/consistenthash/Node.java| 1 - .../common/consistenthash/VirtualNode.java | 1 - .../rocketmq/common/filter/FilterAPI.java | 2 +- .../rocketmq/common/filter/impl/PolishExpr.java | 1 - .../rocketmq/common/message/MessageDecoder.java | 9 +- .../common/message/MessageExtBatch.java | 16 ++- .../rocketmq/com
[15/28] incubator-rocketmq git commit: Remove preceded whitespace check from checkstyle
Remove preceded whitespace check from checkstyle Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/f091203a Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/f091203a Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/f091203a Branch: refs/heads/master Commit: f091203a9d4a8c79d6ec8bdfc719a318b7f1ba8f Parents: 97aa813 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 21:56:52 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 21:56:52 2017 +0800 -- style/rmq_checkstyle.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/f091203a/style/rmq_checkstyle.xml -- diff --git a/style/rmq_checkstyle.xml b/style/rmq_checkstyle.xml index 6ec2ad0..e93b353 100644 --- a/style/rmq_checkstyle.xml +++ b/style/rmq_checkstyle.xml @@ -126,8 +126,8 @@ - - + +
[18/28] incubator-rocketmq git commit: Polish chapter 'Learn it & Contact us' in README
Polish chapter 'Learn it & Contact us' in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/ca14a2d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/ca14a2d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/ca14a2d4 Branch: refs/heads/master Commit: ca14a2d474b6c71143944ec95f7c28e23e15632d Parents: 332df78 Author: yukon <yu...@apache.org> Authored: Mon Aug 21 16:18:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Aug 21 16:31:28 2017 +0800 -- README.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ca14a2d4/README.md -- diff --git a/README.md b/README.md index 0047c7d..cbf4629 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ It offers a variety of features: -- ## Learn it & Contact us -* Mailing Lists: <http://rocketmq.incubator.apache.org/about/contact/> +* Mailing Lists: <https://rocketmq.incubator.apache.org/about/contact/> * Home: <https://rocketmq.incubator.apache.org> -* Wiki: <https://cwiki.apache.org/confluence/display/ROCKETMQ/Apache+RocketMQ+Home> +* Docs: <https://rocketmq.incubator.apache.org/docs/quick-start/> * Issues: <https://issues.apache.org/jira/browse/RocketMQ> -* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* Ask: <https://stackoverflow.com/questions/tagged/rocketmq> -- @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards. more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) -- ## License
[02/28] incubator-rocketmq git commit: [ROCKETMQ-254]Fix logger appender unit tests which cost too long
[ROCKETMQ-254]Fix logger appender unit tests which cost too long Author: lindzhCloses #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/master Commit: aa1c75774eb33fca9a1c3f036249b6c5b86ef0f5 Parents: bcc65e5 Author: lindzh Authored: Fri Aug 11 15:40:24 2017 +0800 Committer: lollipop 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 { -deleteDirectory("./unit_test"); +UtilAll.deleteFile(new File("./unit_test")); } } @@ -269,23
[26/28] incubator-rocketmq git commit: Remove and Polish unstable UT
Remove and Polish unstable UT Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/c0e4c3fd Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/c0e4c3fd Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/c0e4c3fd Branch: refs/heads/master Commit: c0e4c3fdea853ab4339e2640384c1e88dbf6b702 Parents: 38d70bd Author: vongoslingAuthored: Tue Aug 29 16:12:25 2017 +0800 Committer: vongosling Committed: Tue Aug 29 16:12:25 2017 +0800 -- .../rocketmq/common/filter/FilterAPITest.java | 25 - .../common/protocol/route/BrokerDataTest.java | 57 2 files changed, 9 insertions(+), 73 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c0e4c3fd/common/src/test/java/org/apache/rocketmq/common/filter/FilterAPITest.java -- diff --git a/common/src/test/java/org/apache/rocketmq/common/filter/FilterAPITest.java b/common/src/test/java/org/apache/rocketmq/common/filter/FilterAPITest.java index 81ed971..73ab09e 100644 --- a/common/src/test/java/org/apache/rocketmq/common/filter/FilterAPITest.java +++ b/common/src/test/java/org/apache/rocketmq/common/filter/FilterAPITest.java @@ -17,11 +17,12 @@ package org.apache.rocketmq.common.filter; -import java.util.HashSet; -import java.util.Set; import org.apache.rocketmq.common.protocol.heartbeat.SubscriptionData; import org.junit.Test; +import java.util.HashSet; +import java.util.Set; + import static org.assertj.core.api.Assertions.assertThat; public class FilterAPITest { @@ -32,7 +33,7 @@ public class FilterAPITest { @Test public void testBuildSubscriptionData() throws Exception { SubscriptionData subscriptionData = -FilterAPI.buildSubscriptionData(group, topic, subString); +FilterAPI.buildSubscriptionData(group, topic, subString); assertThat(subscriptionData.getTopic()).isEqualTo(topic); assertThat(subscriptionData.getSubString()).isEqualTo(subString); String[] tags = subString.split("\\|\\|"); @@ -47,7 +48,7 @@ public class FilterAPITest { public void testBuildTagSome() { try { SubscriptionData subscriptionData = FilterAPI.build( -"TOPIC", "A || B", ExpressionType.TAG +"TOPIC", "A || B", ExpressionType.TAG ); assertThat(subscriptionData).isNotNull(); @@ -67,7 +68,7 @@ public class FilterAPITest { public void testBuildSQL() { try { SubscriptionData subscriptionData = FilterAPI.build( -"TOPIC", "a is not null", ExpressionType.SQL92 +"TOPIC", "a is not null", ExpressionType.SQL92 ); assertThat(subscriptionData).isNotNull(); @@ -79,16 +80,8 @@ public class FilterAPITest { } } -@Test -public void testBuildSQLWithNullSubString() { -try { -FilterAPI.build( -"TOPIC", null, ExpressionType.SQL92 -); - -assertThat(Boolean.FALSE).isTrue(); -} catch (Exception e) { -e.printStackTrace(); -} +@Test(expected = IllegalArgumentException.class) +public void testBuildSQLWithNullSubString() throws Exception { +FilterAPI.build("TOPIC", null, ExpressionType.SQL92); } } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c0e4c3fd/common/src/test/java/org/apache/rocketmq/common/protocol/route/BrokerDataTest.java -- diff --git a/common/src/test/java/org/apache/rocketmq/common/protocol/route/BrokerDataTest.java b/common/src/test/java/org/apache/rocketmq/common/protocol/route/BrokerDataTest.java deleted file mode 100644 index 97da458..000 --- a/common/src/test/java/org/apache/rocketmq/common/protocol/route/BrokerDataTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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
[01/28] incubator-rocketmq git commit: [ROCKETMQ-231]Wrong Pull result sizebugfix
Repository: incubator-rocketmq Updated Branches: refs/heads/master a8333a73b -> 1b853e81a [ROCKETMQ-231]Wrong Pull result sizebugfix Author: lindzhCloses #126 from lindzh/fix_consumer_pull_msg_size. Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/bcc65e54 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/bcc65e54 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/bcc65e54 Branch: refs/heads/master Commit: bcc65e5471d9821e0edb90f6f637e3034ed1da44 Parents: 98bd032 Author: lindzh Authored: Fri Aug 11 14:36:53 2017 +0800 Committer: vongosling Committed: Fri Aug 11 14:36:53 2017 +0800 -- .../rocketmq/store/DefaultMessageStore.java | 6 +-- .../rocketmq/store/DefaultMessageStoreTest.java | 53 .../org/apache/rocketmq/test/base/BaseConf.java | 2 +- .../rocketmq/test/base/IntegrationTestBase.java | 10 ++-- .../broadcast/order/OrderMsgBroadCastIT.java| 8 +-- 5 files changed, 60 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/bcc65e54/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java index b5bac3f..7b5ac45 100644 --- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java +++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java @@ -,7 +,7 @@ public class DefaultMessageStore implements MessageStore { return false; } -if ((messageTotal + 1) >= maxMsgNums) { +if (maxMsgNums <= messageTotal) { return true; } @@ -1120,7 +1120,7 @@ public class DefaultMessageStore implements MessageStore { return true; } -if ((messageTotal + 1) > this.messageStoreConfig.getMaxTransferCountOnMessageInDisk()) { +if (messageTotal > this.messageStoreConfig.getMaxTransferCountOnMessageInDisk() - 1) { return true; } } else { @@ -1128,7 +1128,7 @@ public class DefaultMessageStore implements MessageStore { return true; } -if ((messageTotal + 1) > this.messageStoreConfig.getMaxTransferCountOnMessageInMemory()) { +if (messageTotal > this.messageStoreConfig.getMaxTransferCountOnMessageInMemory() - 1) { return true; } } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/bcc65e54/store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java -- diff --git a/store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java b/store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java index 75f1de9..273cc21 100644 --- a/store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java +++ b/store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java @@ -22,9 +22,11 @@ import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; + import org.apache.rocketmq.common.BrokerConfig; import org.apache.rocketmq.store.config.FlushDiskType; import org.apache.rocketmq.store.config.MessageStoreConfig; +import org.apache.rocketmq.store.stats.BrokerStatsManager; import org.junit.Before; import org.junit.Test; @@ -45,19 +47,22 @@ public class DefaultMessageStoreTest { BornHost = new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0); } +public MessageStore buildMessageStore() throws Exception { +MessageStoreConfig messageStoreConfig = new MessageStoreConfig(); +messageStoreConfig.setMapedFileSizeCommitLog(1024 * 1024 * 10); +messageStoreConfig.setMapedFileSizeConsumeQueue(1024 * 1024 * 10); +messageStoreConfig.setMaxHashSlotNum(1); +messageStoreConfig.setMaxIndexNum(100 * 100); +messageStoreConfig.setFlushDiskType(FlushDiskType.ASYNC_FLUSH); +return new DefaultMessageStore(messageStoreConfig, new BrokerStatsManager("simpleTest"), new MyMessageArrivingListener(), new BrokerConfig()); +} + @Test public void testWriteAndRead() throws Exception { long totalMsgs = 100; QUEUE_TOTAL = 1; MessageBody = StoreMessage.getBytes(); - -MessageStoreConfig messageStoreConfig = new MessageStoreConfig(); -
[04/28] incubator-rocketmq git commit: [ROCKETMQ-258]Move benchmark scripts to distribution module
[ROCKETMQ-258]Move benchmark scripts to distribution module Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/ccc2235a Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/ccc2235a Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/ccc2235a Branch: refs/heads/master Commit: ccc2235ae9509f101971915ba0521109a82894b0 Parents: 38bbb14 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 17:54:04 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 17:54:04 2017 +0800 -- benchmark/consumer.sh | 18 - benchmark/producer.sh | 18 - benchmark/runclass.sh | 43 benchmark/tproducer.sh | 18 - distribution/benchmark/consumer.sh | 18 + distribution/benchmark/producer.sh | 18 + distribution/benchmark/runclass.sh | 43 distribution/benchmark/tproducer.sh | 18 + 8 files changed, 97 insertions(+), 97 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ccc2235a/benchmark/consumer.sh -- diff --git a/benchmark/consumer.sh b/benchmark/consumer.sh deleted file mode 100644 index 6f9cd3d..000 --- a/benchmark/consumer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# 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. - -sh ./runclass.sh org.apache.rocketmq.example.benchmark.Consumer $@ & http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ccc2235a/benchmark/producer.sh -- diff --git a/benchmark/producer.sh b/benchmark/producer.sh deleted file mode 100644 index 3116d11..000 --- a/benchmark/producer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# 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. - -sh ./runclass.sh -Dorg.apache.rocketmq.client.sendSmartMsg=true org.apache.rocketmq.example.benchmark.Producer $@ & http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/ccc2235a/benchmark/runclass.sh -- diff --git a/benchmark/runclass.sh b/benchmark/runclass.sh deleted file mode 100644 index 13c58d1..000 --- a/benchmark/runclass.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# 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. - -if
[16/28] incubator-rocketmq git commit: [ROCKETMQ-259]Fix too many reflection calls when decode remoting command header
[ROCKETMQ-259]Fix too many reflection calls when decode remoting command header Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/f613c3b7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/f613c3b7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/f613c3b7 Branch: refs/heads/master Commit: f613c3b7dfefc1cea15d8aa22fec763995a624e7 Parents: f091203 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 19:15:38 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 22:14:56 2017 +0800 -- .../remoting/protocol/RemotingCommand.java | 20 ++ .../remoting/protocol/RemotingCommandTest.java | 29 2 files changed, 37 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/f613c3b7/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java -- diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java index bee9b12..2f8cb38 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java @@ -43,7 +43,7 @@ public class RemotingCommand { private static final Map<Class, String> CANONICAL_NAME_CACHE = new HashMap<Class, String>(); // 1, Oneway // 1, RESPONSE_COMMAND -private static final Map<Field, Annotation> NOT_NULL_ANNOTATION_CACHE = new HashMap<Field, Annotation>(); +private static final Map<Field, Boolean> NULLABLE_FIELD_CACHE = new HashMap<Field, Boolean>(); private static final String STRING_CANONICAL_NAME = String.class.getCanonicalName(); private static final String DOUBLE_CANONICAL_NAME_1 = Double.class.getCanonicalName(); private static final String DOUBLE_CANONICAL_NAME_2 = double.class.getCanonicalName(); @@ -252,11 +252,9 @@ public class RemotingCommand { try { String value = this.extFields.get(fieldName); if (null == value) { -Annotation annotation = getNotNullAnnotation(field); -if (annotation != null) { +if (!isFieldNullable(field)) { throw new RemotingCommandException("the custom field <" + fieldName + "> is null"); } - continue; } @@ -305,16 +303,14 @@ public class RemotingCommand { return field; } -private Annotation getNotNullAnnotation(Field field) { -Annotation annotation = NOT_NULL_ANNOTATION_CACHE.get(field); - -if (annotation == null) { -annotation = field.getAnnotation(CFNotNull.class); -synchronized (NOT_NULL_ANNOTATION_CACHE) { -NOT_NULL_ANNOTATION_CACHE.put(field, annotation); +private boolean isFieldNullable(Field field) { +if (!NULLABLE_FIELD_CACHE.containsKey(field)) { +Annotation annotation = field.getAnnotation(CFNotNull.class); +synchronized (NULLABLE_FIELD_CACHE) { +NULLABLE_FIELD_CACHE.put(field, annotation == null); } } -return annotation; +return NULLABLE_FIELD_CACHE.get(field); } private String getCanonicalName(Class clazz) { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/f613c3b7/remoting/src/test/java/org/apache/rocketmq/remoting/protocol/RemotingCommandTest.java -- diff --git a/remoting/src/test/java/org/apache/rocketmq/remoting/protocol/RemotingCommandTest.java b/remoting/src/test/java/org/apache/rocketmq/remoting/protocol/RemotingCommandTest.java index e11915b..2bd41ce 100644 --- a/remoting/src/test/java/org/apache/rocketmq/remoting/protocol/RemotingCommandTest.java +++ b/remoting/src/test/java/org/apache/rocketmq/remoting/protocol/RemotingCommandTest.java @@ -16,8 +16,11 @@ */ package org.apache.rocketmq.remoting.protocol; +import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.nio.ByteBuffer; import org.apache.rocketmq.remoting.CommandCustomHeader; +import org.apache.rocketmq.remoting.annotation.CFNotNull; import org.apache.rocketmq.remoting.exception.RemotingCommandException; import org.junit.Test; @@ -179,6 +182,32 @@ public class RemotingCommandTe
[22/28] incubator-rocketmq git commit: Minor Polish
Minor Polish Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/4c5e58b4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/4c5e58b4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/4c5e58b4 Branch: refs/heads/master Commit: 4c5e58b46acaf4541fbd741b97593618f027be2d Parents: 76464ba Author: vongoslingAuthored: Mon Aug 28 18:16:39 2017 +0800 Committer: vongosling Committed: Mon Aug 28 18:16:39 2017 +0800 -- .../main/java/org/apache/rocketmq/client/log/ClientLogger.java| 1 - .../java/org/apache/rocketmq/client/log/ClientLoggerTest.java | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/4c5e58b4/client/src/main/java/org/apache/rocketmq/client/log/ClientLogger.java -- diff --git a/client/src/main/java/org/apache/rocketmq/client/log/ClientLogger.java b/client/src/main/java/org/apache/rocketmq/client/log/ClientLogger.java index e84a069..c3df9a6 100644 --- a/client/src/main/java/org/apache/rocketmq/client/log/ClientLogger.java +++ b/client/src/main/java/org/apache/rocketmq/client/log/ClientLogger.java @@ -98,7 +98,6 @@ public class ClientLogger { initialize.invoke(joranConfigurator, "log4j2", logConfigFilePath); } } -//logClass = classType; } catch (Exception e) { System.err.println(e); } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/4c5e58b4/client/src/test/java/org/apache/rocketmq/client/log/ClientLoggerTest.java -- diff --git a/client/src/test/java/org/apache/rocketmq/client/log/ClientLoggerTest.java b/client/src/test/java/org/apache/rocketmq/client/log/ClientLoggerTest.java index 0559e0d..d3f3be7 100644 --- a/client/src/test/java/org/apache/rocketmq/client/log/ClientLoggerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/log/ClientLoggerTest.java @@ -43,9 +43,10 @@ public class ClientLoggerTest { // FIXME: Workaround for concrete implementation for slf4j, is there any better solution for all slf4j implementations in one class ? 2017/8/1 @Test -public void testLog4j() throws Exception { +public void testLog4j2() throws Exception { Logger logger = ClientLogger.getLog(); +System.out.println(logger); assertEquals("org.apache.logging.slf4j.Log4jLogger", logger.getClass().getName()); } }
[03/28] incubator-rocketmq git commit: [ROCKETMQ-263]Sets a small timeout value for unit tests in OpenMessaging module
[ROCKETMQ-263]Sets a small timeout value for unit tests in OpenMessaging module Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/38bbb141 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/38bbb141 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/38bbb141 Branch: refs/heads/master Commit: 38bbb1417bcd8bba6eee19df1afe9e6b3061db89 Parents: aa1c757 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 17:27:06 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 17:27:06 2017 +0800 -- .../rocketmq/consumer/PullConsumerImplTest.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/38bbb141/openmessaging/src/test/java/io/openmessaging/rocketmq/consumer/PullConsumerImplTest.java -- diff --git a/openmessaging/src/test/java/io/openmessaging/rocketmq/consumer/PullConsumerImplTest.java b/openmessaging/src/test/java/io/openmessaging/rocketmq/consumer/PullConsumerImplTest.java index 277a5c6..843ddb7 100644 --- a/openmessaging/src/test/java/io/openmessaging/rocketmq/consumer/PullConsumerImplTest.java +++ b/openmessaging/src/test/java/io/openmessaging/rocketmq/consumer/PullConsumerImplTest.java @@ -46,13 +46,13 @@ public class PullConsumerImplTest { @Mock private DefaultMQPullConsumer rocketmqPullConsumer; -private LocalMessageCache localMessageCache = -spy(new LocalMessageCache(rocketmqPullConsumer, new ClientConfig())); +private LocalMessageCache localMessageCache = null; @Before public void init() throws NoSuchFieldException, IllegalAccessException { final MessagingAccessPoint messagingAccessPoint = MessagingAccessPointFactory .getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace"); + consumer = messagingAccessPoint.createPullConsumer(queueName, OMS.newKeyValue().put(NonStandardKeys.CONSUMER_GROUP, "TestGroup")); @@ -60,6 +60,10 @@ public class PullConsumerImplTest { field.setAccessible(true); field.set(consumer, rocketmqPullConsumer); //Replace +ClientConfig clientConfig = new ClientConfig(); +clientConfig.setOmsOperationTimeout(200); +localMessageCache = spy(new LocalMessageCache(rocketmqPullConsumer, clientConfig)); + field = PullConsumerImpl.class.getDeclaredField("localMessageCache"); field.setAccessible(true); field.set(consumer, localMessageCache);
[19/28] incubator-rocketmq git commit: Polish the contributing guide
Polish the contributing guide Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/c6b2a998 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/c6b2a998 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/c6b2a998 Branch: refs/heads/master Commit: c6b2a998237615202ee9c4c6a1480c4a5d0eae59 Parents: ca14a2d Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:55:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:56:05 2017 +0800 -- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/c6b2a998/README.md -- diff --git a/README.md b/README.md index cbf4629..a27ba7b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/) -- ## License
[24/28] incubator-rocketmq git commit: Remove star import rule in checkstyle
Remove star import rule in checkstyle Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/23b7d7a5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/23b7d7a5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/23b7d7a5 Branch: refs/heads/master Commit: 23b7d7a567217e8096b0944b30f3dc0cb45226fb Parents: bbe825f Author: vongoslingAuthored: Tue Aug 29 14:51:01 2017 +0800 Committer: vongosling Committed: Tue Aug 29 14:51:01 2017 +0800 -- style/rmq_checkstyle.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/23b7d7a5/style/rmq_checkstyle.xml -- diff --git a/style/rmq_checkstyle.xml b/style/rmq_checkstyle.xml index e93b353..a6edb24 100644 --- a/style/rmq_checkstyle.xml +++ b/style/rmq_checkstyle.xml @@ -122,7 +122,7 @@ - +
[09/28] incubator-rocketmq git commit: Reformat code globally second time
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java -- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java index 2509370..1bb5b38 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/UpdateNamesrvConfigCommand.java @@ -53,7 +53,8 @@ public class UpdateNamesrvConfigCommand implements SubCommand { } @Override -public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { +public void execute(final CommandLine commandLine, final Options options, +final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java -- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java index 611addd..24767cc 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java @@ -36,7 +36,7 @@ public class QueryConsumeQueueCommand implements SubCommand { QueryConsumeQueueCommand cmd = new QueryConsumeQueueCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); -String[] subargs = new String[]{"-t TopicTest", "-q 0", "-i 6447", "-b 100.81.165.119:10911"}; +String[] subargs = new String[] {"-t TopicTest", "-q 0", "-i 6447", "-b 100.81.165.119:10911"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, cmd.buildCommandlineOptions(options), new PosixParser()); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicClusterSubCommand.java -- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicClusterSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicClusterSubCommand.java index 7e2c7e3..a658b98 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicClusterSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicClusterSubCommand.java @@ -46,7 +46,8 @@ public class TopicClusterSubCommand implements SubCommand { } @Override -public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { +public void execute(final CommandLine commandLine, final Options options, +RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); String topic = commandLine.getOptionValue('t').trim(); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java -- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java index 70f296b..56aea2e 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java @@ -57,7 +57,8 @@ public class TopicListSubCommand implements SubCommand { } @Override -public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { +public void execute(final CommandLine commandLine, final Options options, +RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));
[3/4] incubator-rocketmq git commit: Polish the contributing guide
Polish the contributing guide Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/a8333a73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/a8333a73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/a8333a73 Branch: refs/heads/develop Commit: a8333a73b82d83c16c750219541a64ad50eebc3d Parents: 2ddb744 Author: yukon <yu...@apache.org> Authored: Fri Aug 25 11:55:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 25 11:55:21 2017 +0800 -- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/a8333a73/README.md -- diff --git a/README.md b/README.md index cbf4629..a27ba7b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/) -- ## License
[08/28] incubator-rocketmq git commit: Remove unused class GetRouteInfoResponseHeader and meaningless comments
Remove unused class GetRouteInfoResponseHeader and meaningless comments Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/7f96008c Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/7f96008c Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/7f96008c Branch: refs/heads/master Commit: 7f96008c8b6f3ce5ac38cd168bd12252799973e3 Parents: ffad656 Author: yukon <yu...@apache.org> Authored: Fri Aug 11 20:28:13 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Fri Aug 11 20:28:13 2017 +0800 -- .../rocketmq/broker/BrokerController.java | 11 +- .../apache/rocketmq/broker/BrokerStartup.java | 8 +- .../client/rebalance/RebalanceLockManager.java | 44 ++-- .../broker/filtersrv/FilterServerManager.java | 2 - .../processor/AbstractSendMessageProcessor.java | 8 +- .../broker/processor/AdminBrokerProcessor.java | 49 ++-- .../broker/processor/PullMessageProcessor.java | 16 +- .../broker/processor/SendMessageProcessor.java | 28 +-- .../rocketmq/broker/BrokerControllerTest.java | 8 +- .../consumer/store/LocalFileOffsetStore.java| 10 +- .../consumer/store/RemoteBrokerOffsetStore.java | 4 +- .../rocketmq/client/impl/MQAdminImpl.java | 2 +- .../rocketmq/client/impl/MQClientAPIImpl.java | 247 +-- .../ConsumeMessageConcurrentlyService.java | 66 +++-- .../consumer/ConsumeMessageOrderlyService.java | 86 +++ .../impl/consumer/ConsumeMessageService.java| 8 +- .../consumer/DefaultMQPullConsumerImpl.java | 104 .../consumer/DefaultMQPushConsumerImpl.java | 62 ++--- .../client/impl/consumer/RebalanceImpl.java | 22 +- .../client/impl/consumer/RebalancePushImpl.java | 4 +- .../client/impl/factory/MQClientInstance.java | 27 +- .../impl/producer/DefaultMQProducerImpl.java| 92 +++ .../client/impl/producer/MQProducerInner.java | 6 +- .../org/apache/rocketmq/common/TopicConfig.java | 10 - .../org/apache/rocketmq/common/help/FAQUrl.java | 26 +- .../common/message/MessageClientIDSetter.java | 2 +- .../protocol/body/ConsumerRunningInfo.java | 94 +++ .../header/GetConsumeStatsRequestHeader.java| 2 - .../header/GetConsumerStatusRequestHeader.java | 1 - .../GetEarliestMsgStoretimeRequestHeader.java | 1 - .../header/QueryCorrectionOffsetHeader.java | 2 +- .../header/SearchOffsetRequestHeader.java | 2 +- .../header/UnregisterClientRequestHeader.java | 2 +- .../header/UnregisterClientResponseHeader.java | 2 +- .../namesrv/GetRouteInfoResponseHeader.java | 33 --- .../RegisterOrderTopicRequestHeader.java| 2 +- .../rocketmq/common/sysflag/TopicSysFlag.java | 4 - .../rocketmq/common/utils/IOTinyUtils.java | 2 - .../rocketmq/example/simple/PushConsumer.java | 2 - .../src/main/resources/MessageFilterImpl.java | 2 +- .../rocketmq/filter/parser/SelectorParser.java | 1 - .../rocketmq/filter/parser/SelectorParser.jj| 1 - .../namesrv/kvconfig/KVConfigManager.java | 6 +- .../namesrv/routeinfo/RouteInfoManager.java | 4 +- .../rocketmq/remoting/netty/NettyDecoder.java | 2 +- .../remoting/netty/NettyRemotingAbstract.java | 24 +- .../remoting/netty/NettyRemotingClient.java | 8 +- .../remoting/netty/NettyServerConfig.java | 4 - .../remoting/netty/NettySystemConfig.java | 18 +- .../org/apache/rocketmq/store/CommitLog.java| 101 +++- .../rocketmq/store/DefaultMessageStore.java | 54 ++-- .../apache/rocketmq/store/DispatchRequest.java | 18 -- .../org/apache/rocketmq/store/MappedFile.java | 2 - .../apache/rocketmq/store/MappedFileQueue.java | 1 - .../apache/rocketmq/store/ha/HAConnection.java | 8 - .../org/apache/rocketmq/store/ha/HAService.java | 18 -- .../apache/rocketmq/store/index/IndexFile.java | 1 - .../rocketmq/store/index/IndexHeader.java | 4 - .../store/schedule/ScheduleMessageService.java | 3 - .../rocketmq/store/stats/BrokerStats.java | 2 - .../tools/admin/DefaultMQAdminExtImpl.java | 10 +- .../command/message/PrintMessageSubCommand.java | 5 +- 62 files changed, 617 insertions(+), 781 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java -- diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index c8624c4..cd68552 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/roc
[10/28] incubator-rocketmq git commit: Reformat code globally second time
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java index 6fc7335..51a8a27 100644 --- a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java +++ b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java @@ -85,7 +85,6 @@ public class HAService { return result; } - public void notifyTransferSome(final long offset) { for (long value = this.push2SlaveMaxOffset.get(); offset > value; ) { boolean ok = this.push2SlaveMaxOffset.compareAndSet(value, offset); @@ -180,7 +179,9 @@ public class HAService { this.serverSocketChannel.register(this.selector, SelectionKey.OP_ACCEPT); } -/** {@inheritDoc} */ +/** + * {@inheritDoc} + */ @Override public void shutdown(final boolean interrupt) { super.shutdown(interrupt); @@ -192,7 +193,9 @@ public class HAService { } } -/** {@inheritDoc} */ +/** + * {@inheritDoc} + */ @Override public void run() { log.info(this.getServiceName() + " service started"); @@ -235,7 +238,9 @@ public class HAService { log.info(this.getServiceName() + " service end"); } -/** {@inheritDoc} */ +/** + * {@inheritDoc} + */ @Override public String getServiceName() { return AcceptSocketService.class.getSimpleName(); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java index 862e620..edc2476 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java @@ -209,7 +209,7 @@ public class IndexFile { if (slotValue <= invalidIndex || slotValue > this.indexHeader.getIndexCount() || this.indexHeader.getIndexCount() <= 1) { } else { -for (int nextIndexToRead = slotValue;;) { +for (int nextIndexToRead = slotValue; ; ) { if (phyOffsets.size() >= maxNum) { break; } http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java index 3195448..44021cd 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java @@ -20,7 +20,6 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; - public class IndexHeader { public static final int INDEX_HEADER_SIZE = 40; private static int beginTimestampIndex = 0; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/store/src/main/java/org/apache/rocketmq/store/index/IndexService.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexService.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexService.java index c434df5..e562c2a 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexService.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexService.java @@ -35,7 +35,9 @@ import org.slf4j.LoggerFactory; public class IndexService { private static final Logger log = LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME); -/** Maximum times to attempt index file creation. */ +/** + * Maximum times to attempt index file creation. + */ private static final int MAX_TRY_IDX_CREATE = 3; private final DefaultMessageStore defaultMessageStore; private final int hashSlotNum; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java -- diff --git a/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java b/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java index
[13/28] incubator-rocketmq git commit: Reformat code globally second time
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java -- diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java index 9c9b59e..42ce2f9 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java @@ -51,7 +51,7 @@ import org.apache.rocketmq.remoting.exception.RemotingException; * * * - * Thread Safety: After initialization, the instance can be regarded as thread-safe. + * Thread Safety: After initialization, the instance can be regarded as thread-safe. * */ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { @@ -90,29 +90,29 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume * * There are three consuming points: * - * - * CONSUME_FROM_LAST_OFFSET: consumer clients pick up where it stopped previously. - * If it were a newly booting up consumer client, according aging of the consumer group, there are two - * cases: - * - * - * if the consumer group is created so recently that the earliest message being subscribed has yet - * expired, which means the consumer group represents a lately launched business, consuming will - * start from the very beginning; - * - * - * if the earliest message being subscribed has expired, consuming will start from the latest - * messages, meaning messages born prior to the booting timestamp would be ignored. - * - * - * - * - * CONSUME_FROM_FIRST_OFFSET: Consumer client will start from earliest messages available. - * - * - * CONSUME_FROM_TIMESTAMP: Consumer client will start from specified timestamp, which means - * messages born prior to {@link #consumeTimestamp} will be ignored - * + * + * CONSUME_FROM_LAST_OFFSET: consumer clients pick up where it stopped previously. + * If it were a newly booting up consumer client, according aging of the consumer group, there are two + * cases: + * + * + * if the consumer group is created so recently that the earliest message being subscribed has yet + * expired, which means the consumer group represents a lately launched business, consuming will + * start from the very beginning; + * + * + * if the earliest message being subscribed has expired, consuming will start from the latest + * messages, meaning messages born prior to the booting timestamp would be ignored. + * + * + * + * + * CONSUME_FROM_FIRST_OFFSET: Consumer client will start from earliest messages available. + * + * + * CONSUME_FROM_TIMESTAMP: Consumer client will start from specified timestamp, which means + * messages born prior to {@link #consumeTimestamp} will be ignored + * * */ private ConsumeFromWhere consumeFromWhere = ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET; @@ -223,11 +223,13 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume /** * Constructor specifying consumer group, RPC hook and message queue allocating algorithm. + * * @param consumerGroup Consume queue. * @param rpcHook RPC hook to execute before each remoting command. * @param allocateMessageQueueStrategy message queue allocating algorithm. */ -public DefaultMQPushConsumer(final String consumerGroup, RPCHook rpcHook, AllocateMessageQueueStrategy allocateMessageQueueStrategy) { +public DefaultMQPushConsumer(final String consumerGroup, RPCHook rpcHook, +AllocateMessageQueueStrategy allocateMessageQueueStrategy) { this.consumerGroup = consumerGroup; this.allocateMessageQueueStrategy = allocateMessageQueueStrategy; defaultMQPushConsumerImpl = new DefaultMQPushConsumerImpl(this, rpcHook); @@ -235,6 +237,7 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume /** * Constructor specifying RPC hook. + * * @param rpcHook RPC hook to execute before each remoting command. */ public DefaultMQPushConsumer(RPCHook rpcHook) { @@ -243,6 +246,7 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume /** * Constructor specifying consumer group. + * * @param consumerGroup Consumer group. */ public
[1/4] incubator-rocketmq git commit: Closes some timeout PRs, closes #125, closes #124, closes #122, closes #71, closes #58
Repository: incubator-rocketmq Updated Branches: refs/heads/develop 08a0c403c -> 1b853e81a Closes some timeout PRs, closes #125, closes #124, closes #122, closes #71, closes #58 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/421a22c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/421a22c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/421a22c7 Branch: refs/heads/develop Commit: 421a22c73bfb5d1c4748f7d23b0a2a4fd5586192 Parents: 98bd032 Author: yukon <yu...@apache.org> Authored: Tue Aug 1 20:35:28 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Aug 1 20:35:28 2017 +0800 -- --
[12/28] incubator-rocketmq git commit: Reformat code globally second time
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java -- diff --git a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java index 2f035e0..1ae6f2f 100644 --- a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java @@ -149,13 +149,16 @@ public class DefaultMQProducerTest { final Throwable[] assertionErrors = new Throwable[1]; final CountDownLatch countDownLatch = new CountDownLatch(2); producer.getDefaultMQProducerImpl().registerSendMessageHook(new SendMessageHook() { -@Override public String hookName() { +@Override +public String hookName() { return "TestHook"; } -@Override public void sendMessageBefore(final SendMessageContext context) { +@Override +public void sendMessageBefore(final SendMessageContext context) { assertionErrors[0] = assertInOtherThread(new Runnable() { -@Override public void run() { +@Override +public void run() { assertThat(context.getMessage()).isEqualTo(message); assertThat(context.getProducer()).isEqualTo(producer); assertThat(context.getCommunicationMode()).isEqualTo(CommunicationMode.SYNC); @@ -165,9 +168,11 @@ public class DefaultMQProducerTest { countDownLatch.countDown(); } -@Override public void sendMessageAfter(final SendMessageContext context) { +@Override +public void sendMessageAfter(final SendMessageContext context) { assertionErrors[0] = assertInOtherThread(new Runnable() { -@Override public void run() { +@Override +public void run() { assertThat(context.getMessage()).isEqualTo(message); assertThat(context.getProducer()).isEqualTo(producer.getDefaultMQProducerImpl()); assertThat(context.getCommunicationMode()).isEqualTo(CommunicationMode.SYNC); @@ -229,7 +234,8 @@ public class DefaultMQProducerTest { private Throwable assertInOtherThread(final Runnable runnable) { final Throwable[] assertionErrors = new Throwable[1]; Thread thread = new Thread(new Runnable() { -@Override public void run() { +@Override +public void run() { try { runnable.run(); } catch (AssertionError e) { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java -- diff --git a/common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java b/common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java index f22729c..9a208a3 100644 --- a/common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java +++ b/common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java @@ -54,7 +54,8 @@ public class BrokerConfig { private String messageStorePlugIn = ""; /** - * thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default value is 1. + * thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default + * value is 1. */ private int sendMessageThreadPoolNums = 1; //16 + Runtime.getRuntime().availableProcessors() * 4; private int pullMessageThreadPoolNums = 16 + Runtime.getRuntime().availableProcessors() * 2; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/97aa813e/common/src/main/java/org/apache/rocketmq/common/Configuration.java -- diff --git a/common/src/main/java/org/apache/rocketmq/common/Configuration.java b/common/src/main/java/org/apache/rocketmq/common/Configuration.java index d0c7aef..802f6ee 100644 --- a/common/src/main/java/org/apache/rocketmq/common/Configuration.java +++ b/common/src/main/java/org/apache/rocketmq/common/Configuration.java @@ -65,7 +65,6 @@ public class Configuration { /** * register config object * - * @param configObject * @return the current Configuration object */ public Configuration registerConfig(Object configObject) { @@ -91,7 +90,6 @@ public class Configuration { /** * register config properties * - * @param
[21/28] incubator-rocketmq git commit: ROCKETMQ-264 Fix ut's time-consuming problems closes apache/incubator-rocketmq#145
ROCKETMQ-264 Fix ut's time-consuming problems closes apache/incubator-rocketmq#145 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/76464ba6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/76464ba6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/76464ba6 Branch: refs/heads/master Commit: 76464ba657eca3ceb1755777ea4601fa630593f3 Parents: 629c3e9 Author: lindzhAuthored: Mon Aug 28 18:00:18 2017 +0800 Committer: vongosling Committed: Mon Aug 28 18:00:18 2017 +0800 -- .../rocketmq/broker/BrokerControllerTest.java | 18 +- .../filter/MessageStoreWithFilterTest.java | 256 +-- broker/src/test/resources/logback-test.xml | 1 - .../rocketmq/client/log/ClientLogger.java | 28 +- .../AllocateMessageQueueConsitentHashTest.java | 6 +- .../rocketmq/client/log/ClientLogTest.java | 72 -- .../rocketmq/client/log/ClientLoggerTest.java | 51 .../apache/rocketmq/filter/ExpressionTest.java | 68 +++-- .../rocketmq/namesrv/NamesrvControllerTest.java | 46 .../namesrv/kvconfig/KVConfigManagerTest.java | 1 - .../rocketmq/store/DefaultMessageStoreTest.java | 77 +++--- 11 files changed, 272 insertions(+), 352 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/76464ba6/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 90ef210..797e0d8 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java @@ -37,16 +37,14 @@ public class BrokerControllerTest { */ @Test public void testBrokerRestart() throws Exception { -for (int i = 0; i < 2; i++) { -BrokerController brokerController = new BrokerController( -new BrokerConfig(), -new NettyServerConfig(), -new NettyClientConfig(), -new MessageStoreConfig()); -assertThat(brokerController.initialize()); -brokerController.start(); -brokerController.shutdown(); -} +BrokerController brokerController = new BrokerController( +new BrokerConfig(), +new NettyServerConfig(), +new NettyClientConfig(), +new MessageStoreConfig()); +assertThat(brokerController.initialize()); +brokerController.start(); +brokerController.shutdown(); } @After http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/76464ba6/broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java -- diff --git a/broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java b/broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java index d3c973a..7978942 100644 --- a/broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java +++ b/broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java @@ -33,6 +33,8 @@ import org.apache.rocketmq.store.MessageExtBrokerInner; import org.apache.rocketmq.store.PutMessageResult; import org.apache.rocketmq.store.config.MessageStoreConfig; import org.apache.rocketmq.store.stats.BrokerStatsManager; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import java.io.File; @@ -63,6 +65,14 @@ public class MessageStoreWithFilterTest { private static SocketAddress StoreHost; +private DefaultMessageStore master; + +private ConsumerFilterManager filterManager; + +private int topicCount = 3; + +private int msgPerTopic = 30; + static { try { StoreHost = new InetSocketAddress(InetAddress.getLocalHost(), 8123); @@ -76,6 +86,24 @@ public class MessageStoreWithFilterTest { } } +@Before +public void init() { +filterManager = ConsumerFilterManagerTest.gen(topicCount, msgPerTopic); +try { +master = gen(filterManager); +} catch (Exception e) { +e.printStackTrace(); +assertThat(true).isFalse(); +} +} + +@After +public void destroy() { +master.shutdown(); +master.destroy(); +UtilAll.deleteFile(new File(storePath)); +} + public MessageExtBrokerInner buildMessage() {
[2/4] incubator-rocketmq git commit: Polish chapter 'Learn it & Contact us' in README
Polish chapter 'Learn it & Contact us' in README Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/2ddb744b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/2ddb744b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/2ddb744b Branch: refs/heads/develop Commit: 2ddb744b3157604ec87a82143c3100728589c6ec Parents: 421a22c Author: yukon <yu...@apache.org> Authored: Mon Aug 21 16:18:21 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Mon Aug 21 16:19:32 2017 +0800 -- README.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/2ddb744b/README.md -- diff --git a/README.md b/README.md index 0047c7d..cbf4629 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ It offers a variety of features: -- ## Learn it & Contact us -* Mailing Lists: <http://rocketmq.incubator.apache.org/about/contact/> +* Mailing Lists: <https://rocketmq.incubator.apache.org/about/contact/> * Home: <https://rocketmq.incubator.apache.org> -* Wiki: <https://cwiki.apache.org/confluence/display/ROCKETMQ/Apache+RocketMQ+Home> +* Docs: <https://rocketmq.incubator.apache.org/docs/quick-start/> * Issues: <https://issues.apache.org/jira/browse/RocketMQ> -* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* Ask: <https://stackoverflow.com/questions/tagged/rocketmq> -- @@ -41,7 +41,7 @@ It offers a variety of features: -- ## Contributing -We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards. more details see [here](CONTRIBUTING.md) +We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](CONTRIBUTING.md) -- ## License
[25/28] incubator-rocketmq git commit: Polish
Polish Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/38d70bd5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/38d70bd5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/38d70bd5 Branch: refs/heads/master Commit: 38d70bd54cdc4dfcd64943099ef61c87e57ba264 Parents: 23b7d7a Author: vongoslingAuthored: Tue Aug 29 15:41:30 2017 +0800 Committer: vongosling Committed: Tue Aug 29 15:41:30 2017 +0800 -- common/src/main/java/org/apache/rocketmq/common/MixAll.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/38d70bd5/common/src/main/java/org/apache/rocketmq/common/MixAll.java -- diff --git a/common/src/main/java/org/apache/rocketmq/common/MixAll.java b/common/src/main/java/org/apache/rocketmq/common/MixAll.java index e73aa61..c2a915a 100644 --- a/common/src/main/java/org/apache/rocketmq/common/MixAll.java +++ b/common/src/main/java/org/apache/rocketmq/common/MixAll.java @@ -379,7 +379,7 @@ public class MixAll { } } -//FIXME Reverse logic comparing to RemotingUtil method, consider refactor in RocketMQ 5.0 +//Reverse logic comparing to RemotingUtil method, consider refactor in RocketMQ 5.0 public static String getLocalhostByNetworkInterface() throws SocketException { List candidatesHost = new ArrayList(); Enumeration enumeration = NetworkInterface.getNetworkInterfaces();
incubator-rocketmq git commit: Close no response PRs, closes #161
Repository: incubator-rocketmq Updated Branches: refs/heads/master 4372eb919 -> db00885d5 Close no response PRs, closes #161 Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/db00885d Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/db00885d Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/db00885d Branch: refs/heads/master Commit: db00885d536993b32dadb9b4e26be86a32c740aa Parents: 4372eb9 Author: yukon <yu...@apache.org> Authored: Tue Sep 5 22:23:47 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Tue Sep 5 22:23:47 2017 +0800 -- --
incubator-rocketmq git commit: Polish merge script, use old title if input is null [Forced Update!]
Repository: incubator-rocketmq Updated Branches: refs/heads/develop ed4821ae0 -> 845830865 (forced update) Polish merge script, use old title if input is null Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/84583086 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/84583086 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/84583086 Branch: refs/heads/develop Commit: 845830865fc37d0364a19cbd89ceaf8a30b37e1c Parents: 1b853e8 Author: yukon <yu...@apache.org> Authored: Wed Aug 30 00:06:13 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Wed Aug 30 00:06:13 2017 +0800 -- dev/merge_rocketmq_pr.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/84583086/dev/merge_rocketmq_pr.py -- diff --git a/dev/merge_rocketmq_pr.py b/dev/merge_rocketmq_pr.py index 3a2388b..afc597a 100644 --- a/dev/merge_rocketmq_pr.py +++ b/dev/merge_rocketmq_pr.py @@ -146,8 +146,10 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc): merge_message_flags = [] -title = raw_input("Modify commit log [%s]: " % title) -merge_message_flags += ["-m", title] +modified_title = raw_input("Modify commit log [%s]: " % title) +if modified_title == "": +modified_title = title +merge_message_flags += ["-m", modified_title] authors = "\n".join(["Author: %s" % a for a in distinct_authors])
incubator-rocketmq git commit: Polish merge script, use old title if input is null
Repository: incubator-rocketmq Updated Branches: refs/heads/master 1b853e81a -> 4372eb919 Polish merge script, use old title if input is null Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/4372eb91 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/4372eb91 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/4372eb91 Branch: refs/heads/master Commit: 4372eb919713edf7a7401a326dce9a3ffcba6687 Parents: 1b853e8 Author: yukon <yu...@apache.org> Authored: Wed Aug 30 00:06:13 2017 +0800 Committer: yukon <yu...@apache.org> Committed: Wed Aug 30 00:18:07 2017 +0800 -- dev/merge_rocketmq_pr.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/4372eb91/dev/merge_rocketmq_pr.py -- diff --git a/dev/merge_rocketmq_pr.py b/dev/merge_rocketmq_pr.py index 3a2388b..afc597a 100644 --- a/dev/merge_rocketmq_pr.py +++ b/dev/merge_rocketmq_pr.py @@ -146,8 +146,10 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc): merge_message_flags = [] -title = raw_input("Modify commit log [%s]: " % title) -merge_message_flags += ["-m", title] +modified_title = raw_input("Modify commit log [%s]: " % title) +if modified_title == "": +modified_title = title +merge_message_flags += ["-m", modified_title] authors = "\n".join(["Author: %s" % a for a in distinct_authors])