text
stringlengths 0
834k
|
|---|
:run_delete
|
IF NOT DEFINED DELETE_VERBOSE set ""DELETE_VERBOSE=""
|
IF ""!DELETE_NAME!""=="""" (
|
set ""SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%""
|
goto invalid_cmd_line
|
)
|
REM Find a port that Solr is running on
|
if ""!DELETE_PORT!""=="""" (
|
for /f ""usebackq"" %%i in (`dir /b ""%SOLR_TIP%\bin"" ^| findstr /i ""^solr-.*\.port$""`) do (
|
set SOME_SOLR_PORT=
|
For /F ""Delims="" %%J In ('type ""%SOLR_TIP%\bin\%%i""') do set SOME_SOLR_PORT=%%~J
|
if NOT ""!SOME_SOLR_PORT!""=="""" (
|
for /f ""tokens=2,5"" %%j in ('netstat -aon ^| find ""TCP "" ^| find "":0 "" ^| find "":!SOME_SOLR_PORT! ""') do (
|
IF NOT ""%%k""==""0"" set DELETE_PORT=!SOME_SOLR_PORT!
|
)
|
)
|
)
|
)
|
if ""!DELETE_PORT!""=="""" (
|
set ""SCRIPT_ERROR=Could not find a running Solr instance on this host! Please use the -p option to specify the port.""
|
goto err
|
)
|
if ""!DELETE_CONFIG!""=="""" (
|
set DELETE_CONFIG=true
|
)
|
""%JAVA%"" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir=""%SOLR_TIP%"" ^
|
-Dlog4j.configurationFile=""file:///%DEFAULT_SERVER_DIR%\resources\log4j2-console.xml"" ^
|
-classpath ""%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*"" ^
|
org.apache.solr.util.SolrCLI delete -name !DELETE_NAME! -deleteConfig !DELETE_CONFIG! ^
|
-solrUrl !SOLR_URL_SCHEME!://%SOLR_TOOL_HOST%:!DELETE_PORT!/solr %DELETE_VERBOSE%
|
goto done
|
REM Clumsy to do the state machine thing for -d and -n, but that's required for back-compat
|
:parse_zk_args
|
IF ""%1""==""-upconfig"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""-V"" (
|
goto set_zk_verbose
|
) ELSE IF ""%1""==""upconfig"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""-downconfig"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""downconfig"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""cp"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""mv"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""rm"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""ls"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""mkroot"" (
|
goto set_zk_op
|
) ELSE IF ""%1""==""-n"" (
|
goto set_config_name
|
) ELSE IF ""%1""==""-r"" (
|
goto set_zk_recurse
|
) ELSE IF ""%1""==""-configname"" (
|
goto set_config_name
|
) ELSE IF ""%1""==""-d"" (
|
goto set_configdir
|
) ELSE IF ""%1""==""-confdir"" (
|
goto set_configdir
|
) ELSE IF ""%1""==""-z"" (
|
goto set_config_zk
|
) ELSE IF ""%1""==""/?"" (
|
goto zk_usage
|
) ELSE IF ""%1""==""-h"" (
|
goto zk_usage
|
) ELSE IF ""%1""==""-help"" (
|
goto zk_usage
|
) ELSE IF ""!ZK_SRC!""=="""" (
|
if not ""%~1""=="""" (
|
goto set_zk_src
|
)
|
) ELSE IF ""!ZK_DST!""=="""" (
|
IF ""%ZK_OP%""==""cp"" (
|
goto set_zk_dst
|
)
|
IF ""%ZK_OP%""==""mv"" (
|
goto set_zk_dst
|
)
|
set ZK_DST=""_""
|
) ELSE IF NOT ""%1""=="""" (
|
set ERROR_MSG=""Unrecognized or misplaced zk argument %1%""
|
goto zk_short_usage
|
)
|
goto run_zk
|
:set_zk_op
|
set ZK_OP=%~1
|
SHIFT
|
goto parse_zk_args
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.