org.elasticsearch.cluster.metadata.MetaData.routingRequired()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(11.2k)|赞(0)|评价(0)|浏览(89)

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

MetaData.routingRequired介绍

暂无

代码示例

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

public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
  request.routing((metaData.resolveWriteIndexRouting(request.parent(), request.routing(), request.index())));
  // Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
  if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
    throw new RoutingMissingException(concreteIndex, request.type(), request.id());
  }
}

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

docWriteRequest.index()));
if (docWriteRequest.routing() == null && metaData.routingRequired(concreteIndex.getName(),
  docWriteRequest.type())) {
  throw new RoutingMissingException(concreteIndex.getName(), docWriteRequest.type(), docWriteRequest.id());

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

if ((item.routing() == null) && (clusterState.getMetaData().routingRequired(concreteSingleIndex, item.type()))) {
  responses.set(i, newItemFailure(concreteSingleIndex, item.type(), item.id(),
    new RoutingMissingException(concreteSingleIndex, item.type(), item.id())));

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  final AliasFilter aliasFilter = searchService.buildAliasFilter(state, request.concreteIndex(),
    request.request().index());
  request.request().filteringAlias(aliasFilter);
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

clusterState.getMetaData().routingRequired(concreteSingleIndex, termVectorsRequest.type())) {
responses.set(i, new MultiTermVectorsItemResponse(null,
  new MultiTermVectorsResponse.Failure(concreteSingleIndex, termVectorsRequest.type(), termVectorsRequest.id(),

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  // update the routing (request#index here is possibly an alias or a parent)
  request.request().routing(state.metaData()
    .resolveIndexRouting(request.request().parent(), request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  IndexMetaData indexMeta = state.getMetaData().index(request.concreteIndex());
  // update the routing (request#index here is possibly an alias)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().parent(), request.request().routing(),
    request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
  request.routing((metaData.resolveIndexRouting(request.routing(), request.index())));
  // Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
  if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
    throw new RoutingMissingException(concreteIndex, request.type(), request.id());
  }
}

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

public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
  request.routing((metaData.resolveWriteIndexRouting(request.parent(), request.routing(), request.index())));
  // Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
  if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
    throw new RoutingMissingException(concreteIndex, request.type(), request.id());
  }
}

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

public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
  request.routing((metaData.resolveIndexRouting(request.parent(), request.routing(), request.index())));
  // Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
  if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
    throw new RoutingMissingException(concreteIndex, request.type(), request.id());
  }
}

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

public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
  request.routing((metaData.resolveWriteIndexRouting(request.parent(), request.routing(), request.index())));
  // Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
  if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
    throw new RoutingMissingException(concreteIndex, request.type(), request.id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  final AliasFilter aliasFilter = searchService.buildAliasFilter(state, request.concreteIndex(),
    request.request().index());
  request.request().filteringAlias(aliasFilter);
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  final AliasFilter aliasFilter = searchService.buildAliasFilter(state, request.concreteIndex(),
    request.request().index());
  request.request().filteringAlias(aliasFilter);
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  request.request().filteringAlias(indexNameExpressionResolver.filteringAliases(state, request.concreteIndex(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  final AliasFilter aliasFilter = searchService.buildAliasFilter(state, request.concreteIndex(),
    request.request().index());
  request.request().filteringAlias(aliasFilter);
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  // update the routing (request#index here is possibly an alias)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  // update the routing (request#index here is possibly an alias or a parent)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().parent(), request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  // update the routing (request#index here is possibly an alias or a parent)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().parent(), request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  // update the routing (request#index here is possibly an alias or a parent)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().parent(), request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

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

@Override
protected void resolveRequest(ClusterState state, InternalRequest request) {
  IndexMetaData indexMeta = state.getMetaData().index(request.concreteIndex());
  // update the routing (request#index here is possibly an alias)
  request.request().routing(state.metaData().resolveIndexRouting(request.request().parent(), request.request().routing(), request.request().index()));
  // Fail fast on the node that received the request.
  if (request.request().routing() == null && state.getMetaData().routingRequired(request.concreteIndex(), request.request().type())) {
    throw new RoutingMissingException(request.concreteIndex(), request.request().type(), request.request().id());
  }
}

相关文章