congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ClusterBlocks.indexBlockedRaiseException
Code IndexAdd Tabnine to your IDE (free)

How to use
indexBlockedRaiseException
method
in
org.elasticsearch.cluster.block.ClusterBlocks

Best Java code snippets using org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException (Showing top 5 results out of 315)

origin: org.elasticsearch/elasticsearch

private Map<String, AliasFilter> buildPerIndexAliasFilter(SearchRequest request, ClusterState clusterState,
                             Index[] concreteIndices, Map<String, AliasFilter> remoteAliasMap) {
  final Map<String, AliasFilter> aliasFilterMap = new HashMap<>();
  for (Index index : concreteIndices) {
    clusterState.blocks().indexBlockedRaiseException(ClusterBlockLevel.READ, index.getName());
    AliasFilter aliasFilter = searchService.buildAliasFilter(clusterState, index.getName(), request.indices());
    assert aliasFilter != null;
    aliasFilterMap.put(index.getUUID(), aliasFilter);
  }
  aliasFilterMap.putAll(remoteAliasMap);
  return aliasFilterMap;
}
origin: com.strapdata.elasticsearch/elasticsearch

private Map<String, AliasFilter> buildPerIndexAliasFilter(SearchRequest request, ClusterState clusterState,
                             Index[] concreteIndices, Map<String, AliasFilter> remoteAliasMap) {
  final Map<String, AliasFilter> aliasFilterMap = new HashMap<>();
  for (Index index : concreteIndices) {
    clusterState.blocks().indexBlockedRaiseException(ClusterBlockLevel.READ, index.getName());
    AliasFilter aliasFilter = searchService.buildAliasFilter(clusterState, index.getName(), request.indices());
    assert aliasFilter != null;
    aliasFilterMap.put(index.getUUID(), aliasFilter);
  }
  aliasFilterMap.putAll(remoteAliasMap);
  return aliasFilterMap;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private Map<String, AliasFilter> buildPerIndexAliasFilter(SearchRequest request, ClusterState clusterState,
                             Index[] concreteIndices, Map<String, AliasFilter> remoteAliasMap) {
  final Map<String, AliasFilter> aliasFilterMap = new HashMap<>();
  for (Index index : concreteIndices) {
    clusterState.blocks().indexBlockedRaiseException(ClusterBlockLevel.READ, index.getName());
    AliasFilter aliasFilter = searchService.buildAliasFilter(clusterState, index.getName(), request.indices());
    assert aliasFilter != null;
    aliasFilterMap.put(index.getUUID(), aliasFilter);
  }
  aliasFilterMap.putAll(remoteAliasMap);
  return aliasFilterMap;
}
origin: apache/servicemix-bundles

private Map<String, AliasFilter> buildPerIndexAliasFilter(SearchRequest request, ClusterState clusterState,
                             Index[] concreteIndices, Map<String, AliasFilter> remoteAliasMap) {
  final Map<String, AliasFilter> aliasFilterMap = new HashMap<>();
  for (Index index : concreteIndices) {
    clusterState.blocks().indexBlockedRaiseException(ClusterBlockLevel.READ, index.getName());
    AliasFilter aliasFilter = searchService.buildAliasFilter(clusterState, index.getName(), request.indices());
    assert aliasFilter != null;
    aliasFilterMap.put(index.getUUID(), aliasFilter);
  }
  aliasFilterMap.putAll(remoteAliasMap);
  return aliasFilterMap;
}
origin: harbby/presto-connectors

protected AbstractSearchAsyncAction(ESLogger logger, SearchServiceTransportAction searchService, ClusterService clusterService,
                  IndexNameExpressionResolver indexNameExpressionResolver,
                  SearchPhaseController searchPhaseController, ThreadPool threadPool,
                  SearchRequest request, ActionListener<SearchResponse> listener) {
  this.logger = logger;
  this.searchService = searchService;
  this.indexNameExpressionResolver = indexNameExpressionResolver;
  this.searchPhaseController = searchPhaseController;
  this.threadPool = threadPool;
  this.request = request;
  this.listener = listener;
  this.clusterState = clusterService.state();
  nodes = clusterState.nodes();
  clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);
  // TODO: I think startTime() should become part of ActionRequest and that should be used both for index name
  // date math expressions and $now in scripts. This way all apis will deal with now in the same way instead
  // of just for the _search api
  String[] concreteIndices = indexNameExpressionResolver.concreteIndices(clusterState, request.indicesOptions(), startTime(), request.indices());
  for (String index : concreteIndices) {
    clusterState.blocks().indexBlockedRaiseException(ClusterBlockLevel.READ, index);
  }
  Map<String, Set<String>> routingMap = indexNameExpressionResolver.resolveSearchRouting(clusterState, request.routing(), request.indices());
  shardsIts = clusterService.operationRouting().searchShards(clusterState, concreteIndices, routingMap, request.preference());
  expectedSuccessfulOps = shardsIts.size();
  // we need to add 1 for non active partition, since we count it in the total!
  expectedTotalOps = shardsIts.totalSizeWith1ForEmpty();
  firstResults = new AtomicArray<>(shardsIts.size());
}
org.elasticsearch.cluster.blockClusterBlocksindexBlockedRaiseException

Popular methods of ClusterBlocks

  • globalBlockedException
  • indicesBlockedException
  • builder
  • globalBlockedRaiseException
  • indexBlockedException
  • <init>
  • diff
  • disableStatePersistence
    Returns true if one of the global blocks as its disable state persistence flag set.
  • global
  • globalBlocked
  • hasGlobalBlock
    Is there a global block with the provided status?
  • indexBlocked
  • hasGlobalBlock,
  • indexBlocked,
  • indices,
  • readBlockSet,
  • readDiffFrom,
  • writeBlockSet,
  • writeTo,
  • blocksForIndex,
  • generateLevelHolders

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Permission (java.security)
    Legacy security code; do not use.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now