Remove outdated comment and cleanup RestVerifyRepositoryAction

This commit is contained in:
Jason Tedor 2015-11-26 19:11:01 -05:00
parent e363e0c2aa
commit 5c5e02e0bf
1 changed files with 1 additions and 6 deletions

View File

@ -20,7 +20,6 @@
package org.elasticsearch.rest.action.admin.cluster.repositories.verify; 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.VerifyRepositoryRequest;
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
import org.elasticsearch.client.Client; import org.elasticsearch.client.Client;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings; 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.client.Requests.verifyRepositoryRequest;
import static org.elasticsearch.rest.RestRequest.Method.POST; import static org.elasticsearch.rest.RestRequest.Method.POST;
/**
* Registers repositories
*/
public class RestVerifyRepositoryAction extends BaseRestHandler { public class RestVerifyRepositoryAction extends BaseRestHandler {
@Inject @Inject
@ -41,12 +37,11 @@ public class RestVerifyRepositoryAction extends BaseRestHandler {
controller.registerHandler(POST, "/_snapshot/{repository}/_verify", this); controller.registerHandler(POST, "/_snapshot/{repository}/_verify", this);
} }
@Override @Override
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) { public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
VerifyRepositoryRequest verifyRepositoryRequest = verifyRepositoryRequest(request.param("repository")); VerifyRepositoryRequest verifyRepositoryRequest = verifyRepositoryRequest(request.param("repository"));
verifyRepositoryRequest.masterNodeTimeout(request.paramAsTime("master_timeout", verifyRepositoryRequest.masterNodeTimeout())); verifyRepositoryRequest.masterNodeTimeout(request.paramAsTime("master_timeout", verifyRepositoryRequest.masterNodeTimeout()));
verifyRepositoryRequest.timeout(request.paramAsTime("timeout", verifyRepositoryRequest.timeout())); verifyRepositoryRequest.timeout(request.paramAsTime("timeout", verifyRepositoryRequest.timeout()));
client.admin().cluster().verifyRepository(verifyRepositoryRequest, new RestToXContentListener<VerifyRepositoryResponse>(channel)); client.admin().cluster().verifyRepository(verifyRepositoryRequest, new RestToXContentListener<>(channel));
} }
} }