org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.setTimedOut()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(83)

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

ClusterHealthResponse.setTimedOut介绍

暂无

代码示例

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

private ClusterHealthResponse getResponse(final ClusterHealthRequest request, ClusterState clusterState,
                     final int waitFor, boolean timedOut) {
  ClusterHealthResponse response = clusterHealth(request, clusterState, clusterService.getMasterService().numberOfPendingTasks(),
      gatewayAllocator.getNumberOfInFlightFetch(), clusterService.getMasterService().getMaxTaskWaitTime());
  int readyCounter = prepareResponse(request, response, clusterState, indexNameExpressionResolver);
  boolean valid = (readyCounter == waitFor);
  assert valid || timedOut;
  // we check for a timeout here since this method might be called from the wait_for_events
  // response handler which might have timed out already.
  // if the state is sufficient for what we where waiting for we don't need to mark this as timedOut.
  // We spend too much time in waiting for events such that we might already reached a valid state.
  // this should not mark the request as timed out
  response.setTimedOut(timedOut && valid == false);
  return response;
}

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

private ClusterHealthResponse getResponse(final ClusterHealthRequest request, ClusterState clusterState, final int waitFor, boolean timedOut) {
  ClusterHealthResponse response = clusterHealth(request, clusterState, clusterService.numberOfPendingTasks(),
      0, clusterService.getMaxTaskWaitTime());
  boolean valid = prepareResponse(request, response, clusterState, waitFor);
  assert valid || timedOut;
  // we check for a timeout here since this method might be called from the wait_for_events
  // response handler which might have timed out already.
  // if the state is sufficient for what we where waiting for we don't need to mark this as timedOut.
  // We spend too much time in waiting for events such that we might already reached a valid state.
  // this should not mark the request as timed out
  response.setTimedOut(timedOut && valid == false);
  return response;
}

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

private ClusterHealthResponse getResponse(final ClusterHealthRequest request, ClusterState clusterState, final int waitFor, boolean timedOut) {
  ClusterHealthResponse response = clusterHealth(request, clusterState, clusterService.numberOfPendingTasks(),
      gatewayAllocator.getNumberOfInFlightFetch(), clusterService.getMaxTaskWaitTime());
  boolean valid = prepareResponse(request, response, clusterState, waitFor);
  assert valid || timedOut;
  // we check for a timeout here since this method might be called from the wait_for_events
  // response handler which might have timed out already.
  // if the state is sufficient for what we where waiting for we don't need to mark this as timedOut.
  // We spend too much time in waiting for events such that we might already reached a valid state.
  // this should not mark the request as timed out
  response.setTimedOut(timedOut && valid == false);
  return response;
}

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

private ClusterHealthResponse getResponse(final ClusterHealthRequest request, ClusterState clusterState, final int waitFor, boolean timedOut) {
  ClusterHealthResponse response = clusterHealth(request, clusterState, clusterService.getMasterService().numberOfPendingTasks(),
      gatewayAllocator.getNumberOfInFlightFetch(), clusterService.getMasterService().getMaxTaskWaitTime());
  int readyCounter = prepareResponse(request, response, clusterState, indexNameExpressionResolver);
  boolean valid = (readyCounter == waitFor);
  assert valid || timedOut;
  // we check for a timeout here since this method might be called from the wait_for_events
  // response handler which might have timed out already.
  // if the state is sufficient for what we where waiting for we don't need to mark this as timedOut.
  // We spend too much time in waiting for events such that we might already reached a valid state.
  // this should not mark the request as timed out
  response.setTimedOut(timedOut && valid == false);
  return response;
}

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

private ClusterHealthResponse getResponse(final ClusterHealthRequest request, ClusterState clusterState, final int waitFor, boolean timedOut) {
  ClusterHealthResponse response = clusterHealth(request, clusterState, clusterService.getMasterService().numberOfPendingTasks(),
      gatewayAllocator.getNumberOfInFlightFetch(), clusterService.getMasterService().getMaxTaskWaitTime());
  int readyCounter = prepareResponse(request, response, clusterState, indexNameExpressionResolver);
  boolean valid = (readyCounter == waitFor);
  assert valid || timedOut;
  // we check for a timeout here since this method might be called from the wait_for_events
  // response handler which might have timed out already.
  // if the state is sufficient for what we where waiting for we don't need to mark this as timedOut.
  // We spend too much time in waiting for events such that we might already reached a valid state.
  // this should not mark the request as timed out
  response.setTimedOut(timedOut && valid == false);
  return response;
}

相关文章

微信公众号

最新文章

更多