kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-4271: Fix the server start script for Windows 32-bit OS
Date Wed, 30 Nov 2016 20:19:27 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 497e669dd -> 8d188c911


KAFKA-4271: Fix the server start script for Windows 32-bit OS

Without this fix the new consumer fails to run on a 32-bit Windows OS.

Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Jason Gustafson, Guozhang Wang

Closes #2189 from vahidhashemian/KAFKA-4271


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/8d188c91
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/8d188c91
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/8d188c91

Branch: refs/heads/trunk
Commit: 8d188c9110f7f2a6f9f16f1340d9d254bf583741
Parents: 497e669
Author: Vahid Hashemian <vahidhashemian@us.ibm.com>
Authored: Wed Nov 30 12:19:23 2016 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Nov 30 12:19:23 2016 -0800

----------------------------------------------------------------------
 bin/windows/kafka-server-start.bat | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/8d188c91/bin/windows/kafka-server-start.bat
----------------------------------------------------------------------
diff --git a/bin/windows/kafka-server-start.bat b/bin/windows/kafka-server-start.bat
index 315507e..1aa859c 100644
--- a/bin/windows/kafka-server-start.bat
+++ b/bin/windows/kafka-server-start.bat
@@ -24,7 +24,15 @@ IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
     set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../config/log4j.properties
 )
 IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
-    set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
+    rem detect OS architecture
+    wmic os get osarchitecture | find /i "32-bit" >nul 2>&1
+    IF NOT ERRORLEVEL 1 (
+        rem 32-bit OS
+        set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M
+    ) ELSE (
+        rem 64-bit OS
+        set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
+    )
 )
 %~dp0kafka-run-class.bat kafka.Kafka %*
 EndLocal


Mime
View raw message