From ba89b217e5c784711fab7c7eb0cd3d04529520ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Letterer?= Date: Sun, 5 Apr 2020 00:11:21 +0200 Subject: [PATCH] tools convert to batch files (#11753) Fixes #11754 --- bin/benchmark.bat | 11 +++++++++++ bin/ingest-convert.bat | 10 ++++++++++ bin/pqcheck.bat | 29 +++++++++++++++++++++++++++++ bin/pqrepair.bat | 29 +++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 bin/benchmark.bat create mode 100644 bin/ingest-convert.bat create mode 100644 bin/pqcheck.bat create mode 100644 bin/pqrepair.bat diff --git a/bin/benchmark.bat b/bin/benchmark.bat new file mode 100644 index 000000000..6351d9fc6 --- /dev/null +++ b/bin/benchmark.bat @@ -0,0 +1,11 @@ +rem @echo off +setlocal enabledelayedexpansion + +cd /d "%~dp0.." +for /f %%i in ('cd') do set RESULT=%%i +echo !!RESULT!! + +java -cp "!!RESULT!!\tools\benchmark-cli\build\libs\benchmark-cli.jar;*" ^ + org.logstash.benchmark.cli.Main %* + +endlocal diff --git a/bin/ingest-convert.bat b/bin/ingest-convert.bat new file mode 100644 index 000000000..b11eba743 --- /dev/null +++ b/bin/ingest-convert.bat @@ -0,0 +1,10 @@ +@echo off +setlocal enabledelayedexpansion + +cd /d "%~dp0\.." +for /f %%i in ('cd') do set RESULT=%%i + +java -cp "!!RESULT!!\tools\ingest-converter\build\libs\ingest-converter.jar;*" ^ + org.logstash.ingest.Pipeline %* + +endlocal diff --git a/bin/pqcheck.bat b/bin/pqcheck.bat new file mode 100644 index 000000000..8fcfab09a --- /dev/null +++ b/bin/pqcheck.bat @@ -0,0 +1,29 @@ +@echo off +setlocal enabledelayedexpansion + +call "%~dp0setup.bat" || exit /b 1 +if errorlevel 1 ( + if not defined nopauseonerror ( + pause + ) + exit /B %ERRORLEVEL% +) + + +set JAVA_OPTS=%LS_JAVA_OPTS% + +for %%i in ("%LS_HOME%\logstash-core\lib\jars\*.jar") do ( + call :concat "%%i" +) + +%JAVA% %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.ackedqueue.PqCheck %* + +:concat +IF not defined CLASSPATH ( + set CLASSPATH="%~1" +) ELSE ( + set CLASSPATH=%CLASSPATH%;"%~1" +) +goto :eof + +endlocal \ No newline at end of file diff --git a/bin/pqrepair.bat b/bin/pqrepair.bat new file mode 100644 index 000000000..23a15acfb --- /dev/null +++ b/bin/pqrepair.bat @@ -0,0 +1,29 @@ +@echo off +setlocal enabledelayedexpansion + +call "%~dp0setup.bat" || exit /b 1 +if errorlevel 1 ( + if not defined nopauseonerror ( + pause + ) + exit /B %ERRORLEVEL% +) + + +set JAVA_OPTS=%LS_JAVA_OPTS% + +for %%i in ("%LS_HOME%\logstash-core\lib\jars\*.jar") do ( + call :concat "%%i" +) + +%JAVA% %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.ackedqueue.PqRepair %* + +:concat +IF not defined CLASSPATH ( + set CLASSPATH="%~1" +) ELSE ( + set CLASSPATH=%CLASSPATH%;"%~1" +) +goto :eof + +endlocal \ No newline at end of file