You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2022/12/12 01:15:53 UTC

[rocketmq] branch develop updated: [ISSUE #5673] Add the windows platform script as the controller quick start (#5674)

This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 178553eea [ISSUE #5673] Add the windows platform script as the controller quick start (#5674)
178553eea is described below

commit 178553eeac35f271c2e5fa7d0f6fec7a04cf8898
Author: mxsm <lj...@gmail.com>
AuthorDate: Mon Dec 12 09:15:33 2022 +0800

    [ISSUE #5673] Add the windows platform script as the controller quick start (#5674)
---
 .../controller/fast-try-independent-deployment.cmd | 36 +++++++++++++++++++++
 .../bin/controller/fast-try-namesrv-plugin.cmd     | 36 +++++++++++++++++++++
 distribution/bin/controller/fast-try.cmd           | 37 ++++++++++++++++++++++
 distribution/bin/runbroker.cmd                     |  2 +-
 distribution/bin/runserver.cmd                     |  2 +-
 5 files changed, 111 insertions(+), 2 deletions(-)

diff --git a/distribution/bin/controller/fast-try-independent-deployment.cmd b/distribution/bin/controller/fast-try-independent-deployment.cmd
new file mode 100644
index 000000000..debddef76
--- /dev/null
+++ b/distribution/bin/controller/fast-try-independent-deployment.cmd
@@ -0,0 +1,36 @@
+@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.
+
+set ROCKETMQ_HOME=%cd%
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf exists & EXIT /B 1
+
+set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
+timeout /T 3 /NOBREAK
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
+timeout /T 3 /NOBREAK
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
diff --git a/distribution/bin/controller/fast-try-namesrv-plugin.cmd b/distribution/bin/controller/fast-try-namesrv-plugin.cmd
new file mode 100644
index 000000000..6633d3ac4
--- /dev/null
+++ b/distribution/bin/controller/fast-try-namesrv-plugin.cmd
@@ -0,0 +1,36 @@
+@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.
+
+set ROCKETMQ_HOME=%cd%
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n2.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf exists & EXIT /B 1
+
+set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n0.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
+timeout /T 3 /NOBREAK
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n1.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
+timeout /T 3 /NOBREAK
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n2.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Controller start OK"
+)
\ No newline at end of file
diff --git a/distribution/bin/controller/fast-try.cmd b/distribution/bin/controller/fast-try.cmd
new file mode 100644
index 000000000..a32ed61ad
--- /dev/null
+++ b/distribution/bin/controller/fast-try.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.
+
+set ROCKETMQ_HOME=%cd%
+if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf exists & EXIT /B 1
+if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf exists & EXIT /B 1
+
+set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
+start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Namesrv start OK"
+)
+timeout /T 3 /NOBREAK
+
+set "JAVA_OPT_EXT= -server -Xms1g -Xmx1g"
+start call "%ROCKETMQ_HOME%\bin\runbroker.cmd" org.apache.rocketmq.broker.BrokerStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf
+timeout /T 1 /NOBREAK
+start call "%ROCKETMQ_HOME%\bin\runbroker.cmd" org.apache.rocketmq.broker.BrokerStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf
+timeout /T 1 /NOBREAK
+
+IF %ERRORLEVEL% EQU 0 (
+   ECHO "Broker starts OK"
+)
\ No newline at end of file
diff --git a/distribution/bin/runbroker.cmd b/distribution/bin/runbroker.cmd
index 8dfe95961..15f676aa8 100644
--- a/distribution/bin/runbroker.cmd
+++ b/distribution/bin/runbroker.cmd
@@ -37,6 +37,6 @@ 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% -Drocketmq.client.logUseSlf4j=true"
-set "JAVA_OPT=%JAVA_OPT% -cp %CLASSPATH%"
+set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp %CLASSPATH%"
 
 "%JAVA%" %JAVA_OPT% %*
\ No newline at end of file
diff --git a/distribution/bin/runserver.cmd b/distribution/bin/runserver.cmd
index 2bea8edd9..dc2e2b4e2 100644
--- a/distribution/bin/runserver.cmd
+++ b/distribution/bin/runserver.cmd
@@ -31,6 +31,6 @@ set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollect
 set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
 set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
 set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
-set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""
+set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp "%CLASSPATH%""
 
 "%JAVA%" %JAVA_OPT% %*
\ No newline at end of file