Skip to content

Commit 2f5493d

Browse files
committed
Remove unused
1 parent 0e832d5 commit 2f5493d

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

solr/bin/solr

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -503,48 +503,6 @@ function run_tool() {
503503
return $?
504504
} # end run_tool function
505505

506-
# get status about any Solr nodes running on this host
507-
function get_status() {
508-
# first, see if Solr is running
509-
numSolrs=$(find "$SOLR_PID_DIR" -name "solr-*.pid" -type f | wc -l | tr -d ' ')
510-
if [ "$numSolrs" != "0" ]; then
511-
echo -e "\nFound $numSolrs Solr nodes: "
512-
while read PIDF
513-
do
514-
ID=$(cat "$PIDF")
515-
port=$(jetty_port "$ID")
516-
if [ "$port" != "" ]; then
517-
echo -e "\nSolr process $ID running on port $port"
518-
run_tool status --solr-url "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$port" "$@"
519-
echo ""
520-
else
521-
echo -e "\nSolr process $ID from $PIDF not found."
522-
fi
523-
done < <(find "$SOLR_PID_DIR" -name "solr-*.pid" -type f)
524-
else
525-
# no pid files but check using ps just to be sure
526-
numSolrs=$(ps auxww | grep start\.jar | grep solr\.solr\.home | grep -v grep | wc -l | sed -e 's/^[ \t]*//')
527-
if [ "$numSolrs" != "0" ]; then
528-
echo -e "\nFound $numSolrs Solr nodes: "
529-
PROCESSES=$(ps auxww | grep start\.jar | grep solr\.solr\.home | grep -v grep | awk '{print $2}' | sort -r)
530-
for ID in $PROCESSES
531-
do
532-
port=$(jetty_port "$ID")
533-
if [ "$port" != "" ]; then
534-
echo ""
535-
echo "Solr process $ID running on port $port"
536-
run_tool status --solr-url "$SOLR_URL_SCHEME://$SOLR_TOOL_HOST:$port" "$@"
537-
echo ""
538-
fi
539-
done
540-
else
541-
echo -e "\nNo Solr nodes are running.\n"
542-
run_tool status "$@"
543-
fi
544-
fi
545-
546-
} # end get_status
547-
548506
# tries to gracefully stop Solr using the Jetty
549507
# stop command and if that fails, then uses kill -9
550508
# (will attempt to thread dump before killing)

solr/core/src/java/org/apache/solr/cli/StatusTool.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,11 @@ public String getName() {
9797
@Override
9898
public List<Option> getOptions() {
9999
return List.of(
100-
// The solr-url option is not exposed to the end user, and is
101-
// created by the bin/solr script and passed into this command directly,
102-
// therefore we don't use the SolrCLI.OPTION_SOLRURL.
103100
OPTION_SOLRURL, OPTION_MAXWAITSECS, OPTION_PORT, OPTION_SHORT);
104101
}
105102

106103
@Override
107104
public void runImpl(CommandLine cli) throws Exception {
108-
int maxWaitSecs = Integer.parseInt(cli.getOptionValue("max-wait-secs", "0"));
109105
String solrUrl = cli.getOptionValue(OPTION_SOLRURL);
110106
Integer port =
111107
cli.hasOption(OPTION_PORT) ? Integer.parseInt(cli.getOptionValue(OPTION_PORT)) : null;

0 commit comments

Comments
 (0)