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:43 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.1 ee0ab7dd0 -> b1f8fc7b6


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

(cherry picked from commit 8d188c9110f7f2a6f9f16f1340d9d254bf583741)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.10.1
Commit: b1f8fc7b6e40f371ebf5617b5f7f8b7ca5693903
Parents: ee0ab7d
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:35 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/b1f8fc7b/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