kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1401782 - in /incubator/kafka/branches/0.8: ./ bin/windows/
Date Wed, 24 Oct 2012 16:57:57 GMT
Author: junrao
Date: Wed Oct 24 16:57:56 2012
New Revision: 1401782

URL: http://svn.apache.org/viewvc?rev=1401782&view=rev
Log:
provides windows batch script for starting Kafka/Zookeeper; patched by Antoine Vianey; reviewed
by Jun Rao; kafka-581

Added:
    incubator/kafka/branches/0.8/bin/windows/
    incubator/kafka/branches/0.8/bin/windows/kafka-console-consumer.bat
    incubator/kafka/branches/0.8/bin/windows/kafka-console-producer.bat
    incubator/kafka/branches/0.8/bin/windows/kafka-run-class.bat
    incubator/kafka/branches/0.8/bin/windows/kafka-server-start.bat
    incubator/kafka/branches/0.8/bin/windows/zookeeper-server-start.bat
    incubator/kafka/branches/0.8/sbt.bat

Added: incubator/kafka/branches/0.8/bin/windows/kafka-console-consumer.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/bin/windows/kafka-console-consumer.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/bin/windows/kafka-console-consumer.bat (added)
+++ incubator/kafka/branches/0.8/bin/windows/kafka-console-consumer.bat Wed Oct 24 16:57:56
2012
@@ -0,0 +1,20 @@
+@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.
+
+SetLocal
+set KAFKA_OPTS=-Xmx512M -server -Dcom.sun.management.jmxremote -Dlog4j.configuration=file:"%CD%\kafka-console-consumer-log4j.properties"
+kafka-run-class.bat kafka.consumer.ConsoleConsumer %*
+EndLocal

Added: incubator/kafka/branches/0.8/bin/windows/kafka-console-producer.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/bin/windows/kafka-console-producer.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/bin/windows/kafka-console-producer.bat (added)
+++ incubator/kafka/branches/0.8/bin/windows/kafka-console-producer.bat Wed Oct 24 16:57:56
2012
@@ -0,0 +1,17 @@
+@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.
+
+kafka-run-class.bat kafka.producer.ConsoleProducer %*

Added: incubator/kafka/branches/0.8/bin/windows/kafka-run-class.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/bin/windows/kafka-run-class.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/bin/windows/kafka-run-class.bat (added)
+++ incubator/kafka/branches/0.8/bin/windows/kafka-run-class.bat Wed Oct 24 16:57:56 2012
@@ -0,0 +1,77 @@
+@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.
+
+setlocal enabledelayedexpansion
+
+IF [%1] EQU [] (
+	echo "USAGE: $0 classname [opts]"
+	goto :eof
+)
+
+set BASE_DIR=%CD%\..
+set CLASSPATH=
+echo %BASE_DIR%
+
+for %%i in (%BASE_DIR%\project\boot\scala-2.8.0\lib\*.jar) do (
+	call :concat %%i
+)
+
+for %%i in (%BASE_DIR%\core\target\scala_2.8.0\*.jar) do (
+	call :concat %%i
+)
+
+for %%i in (%BASE_DIR%\core\lib\*.jar) do (
+	call :concat %%i
+)
+
+for %%i in (%BASE_DIR%\perf\target\scala_2.8.0/kafka*.jar) do (
+	call :concat %%i
+)
+
+for %%i in (%BASE_DIR%\core\lib_managed\scala_2.8.0\compile\*.jar) do (
+	call :concat %%i
+)
+
+IF ["%KAFKA_JMX_OPTS%"] EQU [""] (
+	set KAFKA_JMX_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
+)
+
+IF ["%KAFKA_OPTS%"] EQU [""] (
+	set KAFKA_OPTS=-Xmx512M -server -Dlog4j.configuration=file:"%BASE_DIR%\config\log4j.properties"
+)
+
+IF ["%JMX_PORT%"] NEQ [""] (
+	set KAFKA_JMX_OPTS=%KAFKA_JMX_OPTS% -Dcom.sun.management.jmxremote.port=%JMX_PORT%
+)
+
+IF ["%JAVA_HOME%"] EQU [""] (
+	set JAVA=java
+) ELSE (
+	set JAVA="%JAVA_HOME%/bin/java"
+)
+
+set SEARCHTEXT=\bin\..
+set REPLACETEXT=
+set CLASSPATH=!CLASSPATH:%SEARCHTEXT%=%REPLACETEXT%!
+set COMMAND= %JAVA% %KAFKA_OPTS% %KAFKA_JMX_OPTS% -cp %CLASSPATH% %*
+set SEARCHTEXT=-cp ;
+set REPLACETEXT=-cp 
+set COMMAND=!COMMAND:%SEARCHTEXT%=%REPLACETEXT%!
+
+%COMMAND%
+
+:concat
+set CLASSPATH=%CLASSPATH%;"%1"
\ No newline at end of file

Added: incubator/kafka/branches/0.8/bin/windows/kafka-server-start.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/bin/windows/kafka-server-start.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/bin/windows/kafka-server-start.bat (added)
+++ incubator/kafka/branches/0.8/bin/windows/kafka-server-start.bat Wed Oct 24 16:57:56 2012
@@ -0,0 +1,27 @@
+@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 [%1] EQU [] (
+	echo "USAGE: $0 server.properties [consumer.properties producer.properties]"
+	goto :eof
+)
+
+IF [%JMX_PORT%] EQU [] (
+	echo Set JMX_PORT to default value : 9999
+	set JMX_PORT=9999
+)
+
+kafka-run-class.bat kafka.Kafka %*
\ No newline at end of file

Added: incubator/kafka/branches/0.8/bin/windows/zookeeper-server-start.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/bin/windows/zookeeper-server-start.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/bin/windows/zookeeper-server-start.bat (added)
+++ incubator/kafka/branches/0.8/bin/windows/zookeeper-server-start.bat Wed Oct 24 16:57:56
2012
@@ -0,0 +1,22 @@
+@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 [%1] EQU [] (
+	echo "USAGE: $0 zookeeper.properties"
+	goto :eof
+)
+
+kafka-run-class.bat org.apache.zookeeper.server.quorum.QuorumPeerMain %*

Added: incubator/kafka/branches/0.8/sbt.bat
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/sbt.bat?rev=1401782&view=auto
==============================================================================
--- incubator/kafka/branches/0.8/sbt.bat (added)
+++ incubator/kafka/branches/0.8/sbt.bat Wed Oct 24 16:57:56 2012
@@ -0,0 +1,17 @@
+@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.
+
+java -Xmx1024M -XX:MaxPermSize=512m -jar lib\sbt-launch.jar "%1"
\ No newline at end of file



Mime
View raw message