Remove outdated comment and cleanup RestVerifyRepositoryAction
This commit is contained in:
parent
e363e0c2aa
commit
5c5e02e0bf
|
@ -20,7 +20,6 @@
|
|||
package org.elasticsearch.rest.action.admin.cluster.repositories.verify;
|
||||
|
||||
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest;
|
||||
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -30,9 +29,6 @@ import org.elasticsearch.rest.action.support.RestToXContentListener;
|
|||
import static org.elasticsearch.client.Requests.verifyRepositoryRequest;
|
||||
import static org.elasticsearch.rest.RestRequest.Method.POST;
|
||||
|
||||
/**
|
||||
* Registers repositories
|
||||
*/
|
||||
public class RestVerifyRepositoryAction extends BaseRestHandler {
|
||||
|
||||
@Inject
|
||||
|
@ -41,12 +37,11 @@ public class RestVerifyRepositoryAction extends BaseRestHandler {
|
|||
controller.registerHandler(POST, "/_snapshot/{repository}/_verify", this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
|
||||
VerifyRepositoryRequest verifyRepositoryRequest = verifyRepositoryRequest(request.param("repository"));
|
||||
verifyRepositoryRequest.masterNodeTimeout(request.paramAsTime("master_timeout", verifyRepositoryRequest.masterNodeTimeout()));
|
||||
verifyRepositoryRequest.timeout(request.paramAsTime("timeout", verifyRepositoryRequest.timeout()));
|
||||
client.admin().cluster().verifyRepository(verifyRepositoryRequest, new RestToXContentListener<VerifyRepositoryResponse>(channel));
|
||||
client.admin().cluster().verifyRepository(verifyRepositoryRequest, new RestToXContentListener<>(channel));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue