Skip to content

Commit

Permalink
Move cli classes out of the server package (#725)
Browse files Browse the repository at this point in the history
Move cli classes out of the server package
  • Loading branch information
sarthakn7 authored Sep 20, 2024
1 parent 50e4766 commit b384268
Show file tree
Hide file tree
Showing 35 changed files with 41 additions and 40 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ task luceneServer(type: CreateStartScripts) {
}

task luceneServerClient(type: CreateStartScripts) {
mainClass = 'com.yelp.nrtsearch.server.cli.LuceneClientCommand'
mainClass = 'com.yelp.nrtsearch.tools.cli.LuceneClientCommand'
applicationName = 'lucene-client'
outputDir = new File(project.buildDir, 'tmp-app')
classpath = startScripts.classpath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import com.yelp.nrtsearch.server.plugins.PluginsService;
import com.yelp.nrtsearch.server.remote.RemoteBackend;
import com.yelp.nrtsearch.server.utils.ThreadPoolExecutorFactory;
import com.yelp.nrtsearch.tools.cli.VersionProvider;
import io.grpc.Context;
import io.grpc.Server;
import io.grpc.ServerBuilder;
Expand Down Expand Up @@ -244,7 +245,7 @@ public static void main(String[] args) {
@CommandLine.Command(
name = "lucene-server",
mixinStandardHelpOptions = true,
versionProvider = com.yelp.nrtsearch.server.cli.VersionProvider.class,
versionProvider = VersionProvider.class,
description = "Start NRT search server")
public static class LuceneServerCommand implements Callable<Integer> {
@CommandLine.Parameters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static com.yelp.nrtsearch.server.cli.AddDocumentsCommand.ADD_DOCUMENTS;
import static com.yelp.nrtsearch.tools.cli.AddDocumentsCommand.ADD_DOCUMENTS;

import com.google.gson.Gson;
import com.yelp.nrtsearch.server.grpc.AddDocumentRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.google.protobuf.Message;
import com.google.protobuf.util.JsonFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.FieldDefRequest;
import com.yelp.nrtsearch.server.grpc.IndexLiveSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.ForceMergeRequest;
import com.yelp.nrtsearch.server.grpc.ForceMergeResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.ForceMergeDeletesRequest;
import com.yelp.nrtsearch.server.grpc.ForceMergeDeletesResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static com.yelp.nrtsearch.server.cli.LuceneClientCommand.logger;
import static com.yelp.nrtsearch.tools.cli.LuceneClientCommand.logger;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import com.yelp.nrtsearch.server.grpc.ReplicationServerClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.google.protobuf.BoolValue;
import com.google.protobuf.DoubleValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.Version;
import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static com.yelp.nrtsearch.server.cli.StartIndexCommand.START_INDEX;
import static com.yelp.nrtsearch.tools.cli.StartIndexCommand.START_INDEX;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static com.yelp.nrtsearch.server.cli.StatusCommand.STATUS;
import static com.yelp.nrtsearch.tools.cli.StatusCommand.STATUS;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import com.yelp.nrtsearch.server.Version;
import picocli.CommandLine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static com.yelp.nrtsearch.server.cli.LuceneClientCommand.logger;
import static com.yelp.nrtsearch.tools.cli.LuceneClientCommand.logger;

import com.yelp.nrtsearch.server.grpc.LuceneServerClient;
import com.yelp.nrtsearch.server.grpc.ReplicationServerClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.assertEquals;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yelp.nrtsearch.server.cli;
package com.yelp.nrtsearch.tools.cli;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down

0 comments on commit b384268

Please sign in to comment.