janhoy commented on code in PR #5286: URL: https://github.com/apache/solr/pull/5286#discussion_r4486751796
########## solr/core/src/java/org/apache/solr/cli/RestartCommand.java: ########## @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.cli; + +import picocli.CommandLine; + +/** + * This class is currently only used for printing CLI usage. The restart logic is currently handled + * in the start script, which parses the same options as {@code start} plus the stop key. + */ [email protected]( + name = "restart", + description = "Restarts Solr.", + footerHeading = "%nExamples:%n", + footer = { + " # Restart Solr running on the default port", + " bin/solr restart", + "", + " # Restart Solr running on a custom port with 2g heap", + " bin/solr restart -p 8984 -m 2g" + }) +public class RestartCommand extends StartCommand { Review Comment: In picocli, they are called `Command`. And for start, restart, stop, we don't do anything in Java land except for wiring in the help, the action is done by the shell script. So while they could have been called tools, they are just container classes for the annotations and help print. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
