use of com.yelp.nrtsearch.server.grpc.LuceneServerClient in project nrtsearch by Yelp.
the class WriteNRTPointCommand method call.
@Override
public Integer call() throws Exception {
LuceneServerClient client = baseCmd.getClient();
try {
ReplicationServerClient replicationServerClient = new ReplicationServerClient(getHostName(), getPort());
SearcherVersion searcherVersion = replicationServerClient.writeNRTPoint(getIndexName());
logger.info("didRefresh: " + searcherVersion.getDidRefresh());
logger.info("searcherVersion: " + searcherVersion.getVersion());
} finally {
client.shutdown();
}
return 0;
}
use of com.yelp.nrtsearch.server.grpc.LuceneServerClient in project nrtsearch by Yelp.
the class GetCurrentSearcherVersion method call.
@Override
public Integer call() throws Exception {
LuceneServerClient client = baseCmd.getClient();
try {
ReplicationServerClient replServerClient = new ReplicationServerClient(getHostName(), getPort());
SearcherVersion searcherVersion = replServerClient.getCurrentSearcherVersion(getIndexName());
logger.info("searcherVersion: " + searcherVersion.getVersion());
} finally {
client.shutdown();
}
return 0;
}
use of com.yelp.nrtsearch.server.grpc.LuceneServerClient in project nrtsearch by Yelp.
the class RegisterFieldsCommand method call.
@Override
public Integer call() throws Exception {
LuceneServerClient client = baseCmd.getClient();
try {
String jsonStr = Files.readString(Paths.get(getFileName()));
client.registerFields(jsonStr);
} finally {
client.shutdown();
}
return 0;
}
use of com.yelp.nrtsearch.server.grpc.LuceneServerClient in project nrtsearch by Yelp.
the class SettingsCommand method call.
@Override
public Integer call() throws Exception {
LuceneServerClient client = baseCmd.getClient();
try {
Path filePath = Paths.get(getFileName());
client.settings(filePath);
} finally {
client.shutdown();
}
return 0;
}
use of com.yelp.nrtsearch.server.grpc.LuceneServerClient in project nrtsearch by Yelp.
the class ForceMergeCommand method call.
@Override
public Integer call() throws Exception {
LuceneServerClient client = baseCmd.getClient();
try {
ForceMergeResponse response = client.getBlockingStub().forceMerge(ForceMergeRequest.newBuilder().setIndexName(getIndexName()).setMaxNumSegments(getMaxNumSegments()).setDoWait(getDoWait()).build());
logger.info("Force merge response: {}", response.getStatus());
} finally {
client.shutdown();
}
return 0;
}
Aggregations