You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by do...@apache.org on 2017/06/06 03:38:28 UTC
[08/51] [abbrv] incubator-rocketmq git commit: Aggregate packaging
specific files to a new sub-module: distribution
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/mqnamesrv.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/mqnamesrv.cmd b/distribution/bin/mqnamesrv.cmd
new file mode 100644
index 0000000..2828bdc
--- /dev/null
+++ b/distribution/bin/mqnamesrv.cmd
@@ -0,0 +1,23 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if not exist "%ROCKETMQ_HOME%\bin\runserver.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
+
+call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup %*
+
+IF %ERRORLEVEL% EQU 0 (
+ ECHO "Namesrv starts OK"
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/mqnamesrv.xml
----------------------------------------------------------------------
diff --git a/distribution/bin/mqnamesrv.xml b/distribution/bin/mqnamesrv.xml
new file mode 100644
index 0000000..dc5736a
--- /dev/null
+++ b/distribution/bin/mqnamesrv.xml
@@ -0,0 +1,43 @@
+<!--
+ 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.
+ -->
+
+<java>
+ <debug>false</debug>
+
+ <javahome>${JAVA_HOME}</javahome>
+
+ <jvmtype>server</jvmtype>
+
+ <mainclass>org.apache.rocketmq.namesrv.NamesrvStartup</mainclass>
+
+ <properties>
+ <java.ext.dirs>${cpd}/../lib</java.ext.dirs>
+ <rocketmq.home.dir>${cpd}/..</rocketmq.home.dir>
+ </properties>
+
+ <classpaths>
+ </classpaths>
+
+ <options>
+ <-Xms512m></-Xms512m>
+ <-Xmx1g></-Xmx1g>
+ <-XX:NewSize>256M</-XX:NewSize>
+ <-XX:MaxNewSize>512M</-XX:MaxNewSize>
+ <-XX:PermSize>128M</-XX:PermSize>
+ <-XX:MaxPermSize>128M</-XX:MaxPermSize>
+ </options>
+</java>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/mqshutdown
----------------------------------------------------------------------
diff --git a/distribution/bin/mqshutdown b/distribution/bin/mqshutdown
new file mode 100644
index 0000000..d2d51fc
--- /dev/null
+++ b/distribution/bin/mqshutdown
@@ -0,0 +1,49 @@
+#!/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.
+
+case $1 in
+ broker)
+
+ pid=`ps ax | grep -i 'org.apache.rocketmq.broker.BrokerStartup' |grep java | grep -v grep | awk '{print $1}'`
+ if [ -z "$pid" ] ; then
+ echo "No mqbroker running."
+ exit -1;
+ fi
+
+ echo "The mqbroker(${pid}) is running..."
+
+ kill ${pid}
+
+ echo "Send shutdown request to mqbroker(${pid}) OK"
+ ;;
+ namesrv)
+
+ pid=`ps ax | grep -i 'org.apache.rocketmq.namesrv.NamesrvStartup' |grep java | grep -v grep | awk '{print $1}'`
+ if [ -z "$pid" ] ; then
+ echo "No mqnamesrv running."
+ exit -1;
+ fi
+
+ echo "The mqnamesrv(${pid}) is running..."
+
+ kill ${pid}
+
+ echo "Send shutdown request to mqnamesrv(${pid}) OK"
+ ;;
+ *)
+ echo "Useage: mqshutdown broker | namesrv"
+esac
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/mqshutdown.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/mqshutdown.cmd b/distribution/bin/mqshutdown.cmd
new file mode 100644
index 0000000..50af026
--- /dev/null
+++ b/distribution/bin/mqshutdown.cmd
@@ -0,0 +1,35 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if not exist "%JAVA_HOME%\bin\jps.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
+
+setlocal
+
+set "PATH=%JAVA_HOME%\bin;%PATH%"
+
+if /I "%1" == "broker" (
+ echo killing broker
+ for /f "tokens=1" %%i in ('jps -m ^| find "BrokerStartup"') do ( taskkill /F /PID %%i )
+ echo Done!
+) else if /I "%1" == "namesrv" (
+ echo killing name server
+
+ for /f "tokens=1" %%i in ('jps -m ^| find "NamesrvStartup"') do ( taskkill /F /PID %%i )
+
+ echo Done!
+) else (
+ echo Unknown role to kill, please specify broker or namesrv
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/os.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/os.sh b/distribution/bin/os.sh
new file mode 100644
index 0000000..f620158
--- /dev/null
+++ b/distribution/bin/os.sh
@@ -0,0 +1,64 @@
+#!/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.
+
+export PATH=$PATH:/sbin
+
+# sudo sysctl -w vm.extra_free_kbytes=2000000
+# sudo sysctl -w vm.min_free_kbytes=1000000
+sudo sysctl -w vm.overcommit_memory=1
+sudo sysctl -w vm.drop_caches=1
+sudo sysctl -w vm.zone_reclaim_mode=0
+sudo sysctl -w vm.max_map_count=655360
+sudo sysctl -w vm.dirty_background_ratio=50
+sudo sysctl -w vm.dirty_ratio=50
+sudo sysctl -w vm.dirty_writeback_centisecs=360000
+sudo sysctl -w vm.page-cluster=3
+sudo sysctl -w vm.swappiness=1
+
+echo 'ulimit -n 655350' >> /etc/profile
+echo '* hard nofile 655350' >> /etc/security/limits.conf
+
+echo '* hard memlock unlimited' >> /etc/security/limits.conf
+echo '* soft memlock unlimited' >> /etc/security/limits.conf
+
+DISK=`df -k | sort -n -r -k 2 | awk -F/ 'NR==1 {gsub(/[0-9].*/,"",$3); print $3}'`
+[ "$DISK" = 'cciss' ] && DISK='cciss!c0d0'
+echo 'deadline' > /sys/block/${DISK}/queue/scheduler
+
+
+echo "---------------------------------------------------------------"
+sysctl vm.extra_free_kbytes
+sysctl vm.min_free_kbytes
+sysctl vm.overcommit_memory
+sysctl vm.drop_caches
+sysctl vm.zone_reclaim_mode
+sysctl vm.max_map_count
+sysctl vm.dirty_background_ratio
+sysctl vm.dirty_ratio
+sysctl vm.dirty_writeback_centisecs
+sysctl vm.page-cluster
+sysctl vm.swappiness
+
+su - admin -c 'ulimit -n'
+cat /sys/block/$DISK/queue/scheduler
+
+if [ -d ${HOME}/tmpfs ] ; then
+ echo "tmpfs exist, do nothing."
+else
+ ln -s /dev/shm tmpfs
+ echo "create tmpfs ok"
+fi
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/play.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/play.cmd b/distribution/bin/play.cmd
new file mode 100644
index 0000000..f1737d5
--- /dev/null
+++ b/distribution/bin/play.cmd
@@ -0,0 +1,30 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+START /B mqnamesrv > ns.log 2>&1
+IF %ERRORLEVEL% NEQ 0 (
+ echo "Failed to start name server. Please check ns.log"
+ EXIT /B 1
+)
+
+START /B mqbroker -n localhost:9876 > bk.log 2>&1
+
+IF %ERRORLEVEL% NEQ 0 (
+ ECHO "Failed to start broker. Please check bk.log"
+ EXIT /B 1
+)
+
+echo "Start Name Server and Broker Successfully."
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/play.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/play.sh b/distribution/bin/play.sh
new file mode 100644
index 0000000..359d18d
--- /dev/null
+++ b/distribution/bin/play.sh
@@ -0,0 +1,33 @@
+#!/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.
+
+#
+# Name Server
+#
+nohup sh mqnamesrv > ns.log 2>&1 &
+
+#
+# Service Addr
+#
+ADDR=`hostname -i`:9876
+
+#
+# Broker
+#
+nohup sh mqbroker -n ${ADDR} > bk.log 2>&1 &
+
+echo "Start Name Server and Broker Successfully, ${ADDR}"
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/runbroker
----------------------------------------------------------------------
diff --git a/distribution/bin/runbroker b/distribution/bin/runbroker
new file mode 100644
index 0000000..538f8e1
--- /dev/null
+++ b/distribution/bin/runbroker
@@ -0,0 +1,15 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/runbroker.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/runbroker.cmd b/distribution/bin/runbroker.cmd
new file mode 100644
index 0000000..033d822
--- /dev/null
+++ b/distribution/bin/runbroker.cmd
@@ -0,0 +1,42 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
+set "JAVA=%JAVA_HOME%\bin\java.exe"
+
+setlocal
+
+set BASE_DIR=%~dp0
+set BASE_DIR=%BASE_DIR:~0,-1%
+for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
+
+set CLASSPATH=.;%BASE_DIR%conf;%CLASSPATH%
+
+rem ===========================================================================================
+rem JVM Configuration
+rem ===========================================================================================
+set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g"
+set "JAVA_OPT=%JAVA_OPT% -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8 -XX:+DisableExplicitGC"
+set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:%USERPROFILE%\mq_gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
+set "JAVA_OPT=%JAVA_OPT% -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
+set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
+set "JAVA_OPT=%JAVA_OPT% -XX:+AlwaysPreTouch"
+set "JAVA_OPT=%JAVA_OPT% -XX:MaxDirectMemorySize=15g"
+set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages -XX:-UseBiasedLocking"
+set "JAVA_OPT=%JAVA_OPT% -Djava.ext.dirs=%BASE_DIR%lib"
+set "JAVA_OPT=%JAVA_OPT% -cp %CLASSPATH%"
+
+"%JAVA%" %JAVA_OPT% %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/runbroker.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/runbroker.sh b/distribution/bin/runbroker.sh
new file mode 100644
index 0000000..3405d39
--- /dev/null
+++ b/distribution/bin/runbroker.sh
@@ -0,0 +1,61 @@
+#!/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.
+
+#===========================================================================================
+# Java Environment Setting
+#===========================================================================================
+error_exit ()
+{
+ echo "ERROR: $1 !!"
+ exit 1
+}
+
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
+[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
+
+export JAVA_HOME
+export JAVA="$JAVA_HOME/bin/java"
+export BASE_DIR=$(dirname $0)/..
+export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
+
+#===========================================================================================
+# JVM Configuration
+#===========================================================================================
+JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"
+JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8 -XX:+DisableExplicitGC"
+JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/mq_gc_%p.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
+JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
+JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
+JAVA_OPT="${JAVA_OPT} -XX:+AlwaysPreTouch"
+JAVA_OPT="${JAVA_OPT} -XX:MaxDirectMemorySize=15g"
+JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages -XX:-UseBiasedLocking"
+JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib"
+#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
+JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
+
+numactl --interleave=all pwd > /dev/null 2>&1
+if [ $? -eq 0 ]
+then
+ if [ -z "$RMQ_NUMA_NODE" ] ; then
+ numactl --interleave=all $JAVA ${JAVA_OPT} $@
+ else
+ numactl --cpunodebind=$RMQ_NUMA_NODE --membind=$RMQ_NUMA_NODE $JAVA ${JAVA_OPT} $@
+ fi
+else
+ $JAVA ${JAVA_OPT} $@
+fi
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/runserver.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/runserver.cmd b/distribution/bin/runserver.cmd
new file mode 100644
index 0000000..e157d55
--- /dev/null
+++ b/distribution/bin/runserver.cmd
@@ -0,0 +1,37 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+
+if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
+set "JAVA=%JAVA_HOME%\bin\java.exe"
+
+setlocal
+
+set BASE_DIR=%~dp0
+set BASE_DIR=%BASE_DIR:~0,-1%
+for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
+
+set CLASSPATH=.;%BASE_DIR%conf;%CLASSPATH%
+
+set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:PermSize=128m -XX:MaxPermSize=320m"
+set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:+DisableExplicitGC -XX:-UseParNewGC"
+set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails"
+set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
+set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
+set "JAVA_OPT=%JAVA_OPT% -Djava.ext.dirs=%BASE_DIR%lib"
+set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""
+
+"%JAVA%" %JAVA_OPT% %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/runserver.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/runserver.sh b/distribution/bin/runserver.sh
new file mode 100644
index 0000000..e85991c
--- /dev/null
+++ b/distribution/bin/runserver.sh
@@ -0,0 +1,48 @@
+#!/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.
+
+#===========================================================================================
+# Java Environment Setting
+#===========================================================================================
+error_exit ()
+{
+ echo "ERROR: $1 !!"
+ exit 1
+}
+
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
+[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
+
+export JAVA_HOME
+export JAVA="$JAVA_HOME/bin/java"
+export BASE_DIR=$(dirname $0)/..
+export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
+
+#===========================================================================================
+# JVM Configuration
+#===========================================================================================
+JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g -XX:PermSize=128m -XX:MaxPermSize=320m"
+JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:+DisableExplicitGC -XX:-UseParNewGC"
+JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log -XX:+PrintGCDetails"
+JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
+JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages"
+JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib"
+#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
+JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
+
+$JAVA ${JAVA_OPT} $@
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/setcache.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/setcache.sh b/distribution/bin/setcache.sh
new file mode 100644
index 0000000..27633f3
--- /dev/null
+++ b/distribution/bin/setcache.sh
@@ -0,0 +1,40 @@
+#!/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.
+
+export PATH=$PATH:/sbin
+
+#
+# GB
+#
+function changeFreeCache()
+{
+ EXTRA=$1
+ MIN=$2
+ sysctl -w vm.extra_free_kbytes=${EXTRA}000000
+ sysctl -w vm.min_free_kbytes=${MIN}000000
+ sysctl -w vm.swappiness=0
+}
+
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: $0 extra_free_kbytes(GB) min_free_kbytes(GB)"
+ echo "Example: $0 3 1"
+ exit
+fi
+
+changeFreeCache $1 $2
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/startfsrv.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/startfsrv.sh b/distribution/bin/startfsrv.sh
new file mode 100644
index 0000000..f7ba188
--- /dev/null
+++ b/distribution/bin/startfsrv.sh
@@ -0,0 +1,45 @@
+#!/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 [ -z "$ROCKETMQ_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ ROCKETMQ_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
+
+ cd "$saveddir"
+fi
+
+export ROCKETMQ_HOME
+
+nohup sh ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.filtersrv.FiltersrvStartup $@ &
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/tools.cmd
----------------------------------------------------------------------
diff --git a/distribution/bin/tools.cmd b/distribution/bin/tools.cmd
new file mode 100644
index 0000000..28ce765
--- /dev/null
+++ b/distribution/bin/tools.cmd
@@ -0,0 +1,35 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
+
+set "JAVA=%JAVA_HOME%\bin\java.exe"
+
+setlocal
+set BASE_DIR=%~dp0
+set BASE_DIR=%BASE_DIR:~0,-1%
+for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
+
+set CLASSPATH=.;%BASE_DIR%conf;%CLASSPATH%
+
+rem ===========================================================================================
+rem JVM Configuration
+rem ===========================================================================================
+set "JAVA_OPT=%JAVA_OPT% -server -Xms1g -Xmx1g -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m"
+set "JAVA_OPT=%JAVA_OPT% -Djava.ext.dirs="%BASE_DIR%\lib";"%JAVA_HOME%\jre\lib\ext""
+set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""
+
+"%JAVA%" %JAVA_OPT% %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/bin/tools.sh
----------------------------------------------------------------------
diff --git a/distribution/bin/tools.sh b/distribution/bin/tools.sh
new file mode 100644
index 0000000..66862ca
--- /dev/null
+++ b/distribution/bin/tools.sh
@@ -0,0 +1,43 @@
+#!/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.
+
+#===========================================================================================
+# Java Environment Setting
+#===========================================================================================
+error_exit ()
+{
+ echo "ERROR: $1 !!"
+ exit 1
+}
+
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
+[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
+[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
+
+export JAVA_HOME
+export JAVA="$JAVA_HOME/bin/java"
+export BASE_DIR=$(dirname $0)/..
+export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
+
+#===========================================================================================
+# JVM Configuration
+#===========================================================================================
+JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m"
+JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext"
+JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
+
+$JAVA ${JAVA_OPT} $@
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-async/broker-a-s.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-async/broker-a-s.properties b/distribution/conf/2m-2s-async/broker-a-s.properties
new file mode 100644
index 0000000..10d1555
--- /dev/null
+++ b/distribution/conf/2m-2s-async/broker-a-s.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-a
+brokerId=1
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SLAVE
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-async/broker-a.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-async/broker-a.properties b/distribution/conf/2m-2s-async/broker-a.properties
new file mode 100644
index 0000000..da6fc5f
--- /dev/null
+++ b/distribution/conf/2m-2s-async/broker-a.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-a
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=ASYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-async/broker-b-s.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-async/broker-b-s.properties b/distribution/conf/2m-2s-async/broker-b-s.properties
new file mode 100644
index 0000000..9fbe088
--- /dev/null
+++ b/distribution/conf/2m-2s-async/broker-b-s.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-b
+brokerId=1
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SLAVE
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-async/broker-b.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-async/broker-b.properties b/distribution/conf/2m-2s-async/broker-b.properties
new file mode 100644
index 0000000..cb09f9d
--- /dev/null
+++ b/distribution/conf/2m-2s-async/broker-b.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-b
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=ASYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-sync/broker-a-s.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-sync/broker-a-s.properties b/distribution/conf/2m-2s-sync/broker-a-s.properties
new file mode 100644
index 0000000..10d1555
--- /dev/null
+++ b/distribution/conf/2m-2s-sync/broker-a-s.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-a
+brokerId=1
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SLAVE
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-sync/broker-a.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-sync/broker-a.properties b/distribution/conf/2m-2s-sync/broker-a.properties
new file mode 100644
index 0000000..82c4631
--- /dev/null
+++ b/distribution/conf/2m-2s-sync/broker-a.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-a
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-sync/broker-b-s.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-sync/broker-b-s.properties b/distribution/conf/2m-2s-sync/broker-b-s.properties
new file mode 100644
index 0000000..9fbe088
--- /dev/null
+++ b/distribution/conf/2m-2s-sync/broker-b-s.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-b
+brokerId=1
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SLAVE
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-2s-sync/broker-b.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-2s-sync/broker-b.properties b/distribution/conf/2m-2s-sync/broker-b.properties
new file mode 100644
index 0000000..29a4264
--- /dev/null
+++ b/distribution/conf/2m-2s-sync/broker-b.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-b
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=SYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-noslave/broker-a.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-noslave/broker-a.properties b/distribution/conf/2m-noslave/broker-a.properties
new file mode 100644
index 0000000..da6fc5f
--- /dev/null
+++ b/distribution/conf/2m-noslave/broker-a.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-a
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=ASYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/2m-noslave/broker-b.properties
----------------------------------------------------------------------
diff --git a/distribution/conf/2m-noslave/broker-b.properties b/distribution/conf/2m-noslave/broker-b.properties
new file mode 100644
index 0000000..cb09f9d
--- /dev/null
+++ b/distribution/conf/2m-noslave/broker-b.properties
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName=DefaultCluster
+brokerName=broker-b
+brokerId=0
+deleteWhen=04
+fileReservedTime=48
+brokerRole=ASYNC_MASTER
+flushDiskType=ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/broker.conf
----------------------------------------------------------------------
diff --git a/distribution/conf/broker.conf b/distribution/conf/broker.conf
new file mode 100644
index 0000000..0c0b28b
--- /dev/null
+++ b/distribution/conf/broker.conf
@@ -0,0 +1,22 @@
+# 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.
+
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/logback_broker.xml
----------------------------------------------------------------------
diff --git a/distribution/conf/logback_broker.xml b/distribution/conf/logback_broker.xml
new file mode 100644
index 0000000..05c0ee4
--- /dev/null
+++ b/distribution/conf/logback_broker.xml
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<configuration>
+ <appender name="DefaultAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/broker_default.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/broker_default.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="RocketmqBrokerAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/broker.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/broker.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>20</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>128MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqBrokerAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqBrokerAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqProtectionAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/protection.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/protection.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqProtectionAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqProtectionAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqWaterMarkAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/watermark.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/watermark.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqWaterMarkAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqWaterMarkAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqStoreAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/store.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/store.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>128MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqStoreAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqStoreAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqRemotingAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/remoting.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/remoting.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqRemotingAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqRemotingAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqStoreErrorAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/storeerror.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/storeerror.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqStoreErrorAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqStoreErrorAppender_inner"/>
+ </appender>
+
+
+ <appender name="RocketmqTransactionAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/transaction.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/transaction.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqTransactionAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqTransactionAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqRebalanceLockAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/lock.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/lock.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqRebalanceLockAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqRebalanceLockAppender_inner"/>
+ </appender>
+
+ <appender name="RocketmqStatsAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/stats.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/stats.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="RocketmqCommercialAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/commercial.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/commercial.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>500MB</maxFileSize>
+ </triggeringPolicy>
+ </appender>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <append>true</append>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH\:mm\:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="RocketmqBroker" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqBrokerAppender"/>
+ </logger>
+
+ <logger name="RocketmqProtection" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqProtectionAppender"/>
+ </logger>
+
+ <logger name="RocketmqWaterMark" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqWaterMarkAppender"/>
+ </logger>
+
+ <logger name="RocketmqCommon" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqBrokerAppender"/>
+ </logger>
+
+ <logger name="RocketmqStore" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqStoreAppender"/>
+ </logger>
+
+ <logger name="RocketmqStoreError" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqStoreErrorAppender"/>
+ </logger>
+
+ <logger name="RocketmqTransaction" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqTransactionAppender"/>
+ </logger>
+
+ <logger name="RocketmqRebalanceLock" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqRebalanceLockAppender"/>
+ </logger>
+
+ <logger name="RocketmqRemoting" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqRemotingAppender"/>
+ </logger>
+
+ <logger name="RocketmqStats" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqStatsAppender"/>
+ </logger>
+
+ <logger name="RocketmqCommercial" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqCommercialAppender"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="DefaultAppender"/>
+ </root>
+</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/logback_filtersrv.xml
----------------------------------------------------------------------
diff --git a/distribution/conf/logback_filtersrv.xml b/distribution/conf/logback_filtersrv.xml
new file mode 100644
index 0000000..1e6ba43
--- /dev/null
+++ b/distribution/conf/logback_filtersrv.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<configuration>
+ <appender name="DefaultAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/filtersrv_default.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/filtersrv_default.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="RocketmqFiltersrvAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/filtersrv.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/filtersrv.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqFiltersrvAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqFiltersrvAppender_inner"/>
+ <discardingThreshold>0</discardingThreshold>
+ </appender>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <append>true</append>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH\:mm\:ss,SSS} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="RocketmqFiltersrv" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqFiltersrvAppender"/>
+ </logger>
+
+ <logger name="RocketmqCommon" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqFiltersrvAppender"/>
+ </logger>
+
+ <logger name="RocketmqRemoting" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqFiltersrvAppender"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="DefaultAppender"/>
+ </root>
+</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/logback_namesrv.xml
----------------------------------------------------------------------
diff --git a/distribution/conf/logback_namesrv.xml b/distribution/conf/logback_namesrv.xml
new file mode 100644
index 0000000..648e7f5
--- /dev/null
+++ b/distribution/conf/logback_namesrv.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<configuration>
+ <appender name="DefaultAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/namesrv_default.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/namesrv_default.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="RocketmqNamesrvAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/namesrv.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/namesrv.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqNamesrvAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqNamesrvAppender_inner"/>
+ <discardingThreshold>0</discardingThreshold>
+ </appender>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <append>true</append>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH\:mm\:ss,SSS} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="RocketmqNamesrv" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqNamesrvAppender"/>
+ </logger>
+
+ <logger name="RocketmqCommon" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqNamesrvAppender"/>
+ </logger>
+
+ <logger name="RocketmqRemoting" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqNamesrvAppender"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="DefaultAppender"/>
+ </root>
+</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/conf/logback_tools.xml
----------------------------------------------------------------------
diff --git a/distribution/conf/logback_tools.xml b/distribution/conf/logback_tools.xml
new file mode 100644
index 0000000..1dd4e50
--- /dev/null
+++ b/distribution/conf/logback_tools.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<configuration>
+ <appender name="DefaultAppender"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/tools_default.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/tools_default.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <appender name="RocketmqToolsAppender_inner"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${user.home}/logs/rocketmqlogs/tools.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/tools.%i.log
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>5</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>100MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+ <appender name="RocketmqToolsAppender" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="RocketmqToolsAppender_inner"/>
+ </appender>
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <append>true</append>
+ <encoder>
+ <pattern>%d{yyy-MM-dd HH\:mm\:ss,GMT+8} %p %t - %m%n</pattern>
+ <charset class="java.nio.charset.Charset">UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="RocketmqTools" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqToolsAppender"/>
+ </logger>
+
+ <logger name="RocketmqCommon" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqBrokerAppender"/>
+ </logger>
+
+ <logger name="RocketmqStore" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqBrokerAppender"/>
+ </logger>
+
+ <logger name="RocketmqRemoting" additivity="false">
+ <level value="INFO"/>
+ <appender-ref ref="RocketmqBrokerAppender"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="DefaultAppender"/>
+ </root>
+</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
new file mode 100644
index 0000000..41f36dc
--- /dev/null
+++ b/distribution/pom.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-all</artifactId>
+ <version>4.1.0-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>rocketmq-distribution</artifactId>
+ <name>rocketmq-distribution ${project.version}</name>
+ <packaging>pom</packaging>
+
+ <profiles>
+
+ <profile>
+ <id>release-all</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-broker</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-filtersrv</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-tools</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-example</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>release-all</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>release.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <finalName>apache-rocketmq</finalName>
+ </build>
+ </profile>
+
+ <profile>
+ <id>release-client</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>release-client</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>release-client.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <finalName>apache-rocketmq</finalName>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/release-client.xml
----------------------------------------------------------------------
diff --git a/distribution/release-client.xml b/distribution/release-client.xml
new file mode 100644
index 0000000..46563eb
--- /dev/null
+++ b/distribution/release-client.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<assembly>
+ <id>client</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <fileSet>
+ <directory>../</directory>
+ <includes>
+ <include>DISCLAIMER</include>
+ <include>README.md</include>
+ </includes>
+ </fileSet>
+
+ <files>
+ <file>
+ <source>LICENSE-BIN</source>
+ <destName>LICENSE</destName>
+ </file>
+ <file>
+ <source>NOTICE-BIN</source>
+ <destName>NOTICE</destName>
+ </file>
+ </files>
+
+ <moduleSets>
+ <moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
+ <includes>
+ <include>org.apache.rocketmq:rocketmq-client</include>
+ </includes>
+ <binaries>
+ <outputDirectory>./</outputDirectory>
+ <unpack>false</unpack>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>./</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/distribution/release.xml
----------------------------------------------------------------------
diff --git a/distribution/release.xml b/distribution/release.xml
new file mode 100644
index 0000000..2d3ec1e
--- /dev/null
+++ b/distribution/release.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<assembly>
+ <id>all</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ <format>tar.gz</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>../</directory>
+ <includes>
+ <include>DISCLAIMER</include>
+ <include>README.md</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <includes>
+ <include>conf/**</include>
+ <include>benchmark/*</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <includes>
+ <include>bin/*</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <files>
+ <file>
+ <source>LICENSE-BIN</source>
+ <destName>LICENSE</destName>
+ </file>
+ <file>
+ <source>NOTICE-BIN</source>
+ <destName>NOTICE</destName>
+ </file>
+ </files>
+
+ <moduleSets>
+ <moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
+ <includes>
+ <include>org.apache.rocketmq:rocketmq-broker</include>
+ <include>org.apache.rocketmq:rocketmq-tools</include>
+ <include>org.apache.rocketmq:rocketmq-client</include>
+ <include>org.apache.rocketmq:rocketmq-namesrv</include>
+ <include>org.apache.rocketmq:rocketmq-filtersrv</include>
+ <include>org.apache.rocketmq:rocketmq-example</include>
+ </includes>
+ <binaries>
+ <outputDirectory>lib/</outputDirectory>
+ <unpack>false</unpack>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib/</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/e0d4a507/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ce6a7f1..47df84d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -179,6 +179,7 @@
<module>filtersrv</module>
<module>srvutil</module>
<module>test</module>
+ <module>distribution</module>
</modules>
<build>
@@ -380,6 +381,14 @@
<version>3.0.2</version>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<profiles>
@@ -439,40 +448,6 @@
</build>
</profile>
<profile>
- <id>release-all</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <finalName>apache-rocketmq</finalName>
- <descriptors>
- <descriptor>release.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>release-client</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <finalName>apache-rocketmq</finalName>
- <descriptors>
- <descriptor>release-client.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>it-test</id>
<build>
<plugins>
@@ -579,6 +554,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>rocketmq-example</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>