org.elasticsearch.client.IndicesAdminClient.recoveries()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.elasticsearch.client.IndicesAdminClient.recoveries()方法的一些代码示例,展示了IndicesAdminClient.recoveries()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IndicesAdminClient.recoveries()方法的具体详情如下:
包路径:org.elasticsearch.client.IndicesAdminClient
类名称:IndicesAdminClient
方法名:recoveries

IndicesAdminClient.recoveries介绍

[英]Indices recoveries
[中]指数回收率

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
  final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
  recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
  recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
  recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
  return channel -> client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
    @Override
    public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
      return RestTable.buildResponse(buildRecoveryTable(request, response), channel);
    }
  });
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
  public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {

    final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
    recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
    recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
    recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
    return channel -> client.admin().indices().recoveries(recoveryRequest, new RestToXContentListener<>(channel));
  }
}

代码示例来源:origin: harbby/presto-connectors

@Override
public void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
  final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
  recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
  recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
  recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
  client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
    @Override
    public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
      return RestTable.buildResponse(buildRecoveryTable(request, response), channel);
    }
  });
}

代码示例来源:origin: harbby/presto-connectors

@Override
  public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {

    final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
    recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
    recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
    recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));

    client.admin().indices().recoveries(recoveryRequest, new RestBuilderListener<RecoveryResponse>(channel) {
      @Override
      public RestResponse buildResponse(RecoveryResponse response, XContentBuilder builder) throws Exception {
        response.detailed(recoveryRequest.detailed());
        builder.startObject();
        response.toXContent(builder, request);
        builder.endObject();
        return new BytesRestResponse(OK, builder);
      }
    });

  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
  final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
  recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
  recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
  recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
  return channel -> client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
    @Override
    public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
      return RestTable.buildResponse(buildRecoveryTable(request, response), channel);
    }
  });
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
  final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
  recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
  recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
  recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
  return channel -> client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
    @Override
    public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
      return RestTable.buildResponse(buildRecoveryTable(request, response), channel);
    }
  });
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
  final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
  recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
  recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
  recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
  return channel -> client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
    @Override
    public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
      return RestTable.buildResponse(buildRecoveryTable(request, response), channel);
    }
  });
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
  public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {

    final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
    recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
    recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
    recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
    return channel -> client.admin().indices().recoveries(recoveryRequest, new RestToXContentListener<>(channel));
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
  public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {

    final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
    recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
    recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
    recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));
    return channel -> client.admin().indices().recoveries(recoveryRequest, new RestToXContentListener<>(channel));
  }
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
  public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {

    final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
    recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
    recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
    recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));

    return channel -> client.admin().indices().recoveries(recoveryRequest, new RestBuilderListener<RecoveryResponse>(channel) {
      @Override
      public RestResponse buildResponse(RecoveryResponse response, XContentBuilder builder) throws Exception {
        response.detailed(recoveryRequest.detailed());
        builder.startObject();
        response.toXContent(builder, request);
        builder.endObject();
        return new BytesRestResponse(OK, builder);
      }
    });

  }
}

相关文章

微信公众号

最新文章

更多

IndicesAdminClient类方法