Package org.elasticsearch.action.admin.indices.open

Examples of org.elasticsearch.action.admin.indices.open.OpenIndexRequest


        UpdateSettingsRequest settings = new UpdateSettingsRequest(index);
        settings.settings(Collections.<String, Object>singletonMap("graylog2_reopened", true));
        c.admin().indices().updateSettings(settings).actionGet();

        // Open index.
        c.admin().indices().open(new OpenIndexRequest(index)).actionGet();
    }
View Full Code Here


     * @param index The index to open
     * @return The delete index request
     * @see org.elasticsearch.client.IndicesAdminClient#open(org.elasticsearch.action.admin.indices.open.OpenIndexRequest)
     */
    public static OpenIndexRequest openIndexRequest(String index) {
        return new OpenIndexRequest(index);
    }
View Full Code Here

* @author kimchy (shay.banon)
*/
public class OpenIndexRequestBuilder extends BaseIndicesRequestBuilder<OpenIndexRequest, OpenIndexResponse> {

    public OpenIndexRequestBuilder(IndicesAdminClient indicesClient, String index) {
        super(indicesClient, new OpenIndexRequest(index));
    }
View Full Code Here

        super(settings, client);
        controller.registerHandler(RestRequest.Method.POST, "/{index}/_open", this);
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        OpenIndexRequest openIndexRequest = new OpenIndexRequest(request.param("index"));
        openIndexRequest.timeout(request.paramAsTime("timeout", timeValueSeconds(10)));
        client.admin().indices().open(openIndexRequest, new ActionListener<OpenIndexResponse>() {
            @Override public void onResponse(OpenIndexResponse response) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject()
View Full Code Here

*/
@SuppressWarnings("unused")
public class OpenIndexRequestBuilder<JsonInput, JsonOutput> extends AbstractRequestBuilderJsonOutput<OpenIndexRequest, OpenIndexResponse, JsonInput, JsonOutput> {

    public OpenIndexRequestBuilder(Client client, JsonToString<JsonInput> jsonToString, StringToJson<JsonOutput> stringToJson) {
        super(client, new OpenIndexRequest(null), jsonToString, stringToJson);
    }
View Full Code Here

     * @param index The index to open
     * @return The delete index request
     * @see org.elasticsearch.client.IndicesAdminClient#open(org.elasticsearch.action.admin.indices.open.OpenIndexRequest)
     */
    public static OpenIndexRequest openIndexRequest(String index) {
        return new OpenIndexRequest(index);
    }
View Full Code Here

        controller.registerHandler(RestRequest.Method.POST, "/{index}/_open", this);
    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        OpenIndexRequest openIndexRequest = new OpenIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
        openIndexRequest.listenerThreaded(false);
        openIndexRequest.timeout(request.paramAsTime("timeout", openIndexRequest.timeout()));
        openIndexRequest.masterNodeTimeout(request.paramAsTime("master_timeout", openIndexRequest.masterNodeTimeout()));
        openIndexRequest.indicesOptions(IndicesOptions.fromRequest(request, openIndexRequest.indicesOptions()));
        client.admin().indices().open(openIndexRequest, new AcknowledgedRestListener<OpenIndexResponse>(channel));
    }
View Full Code Here

    @Test
    public void testOpenIndex() {
        interceptTransportActions(OpenIndexAction.NAME);

        OpenIndexRequest openIndexRequest = new OpenIndexRequest(randomUniqueIndicesOrAliases());
        internalCluster().clientNodeClient().admin().indices().open(openIndexRequest).actionGet();

        clearInterceptedActions();
        assertSameIndices(openIndexRequest, OpenIndexAction.NAME);
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.open.OpenIndexRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.