Tabnine Logo
ClusterBlocks.global
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.elasticsearch/elasticsearch

public ClusterBlockException globalBlockedException(ClusterBlockLevel level) {
  if (globalBlocked(level) == false) {
    return null;
  }
  return new ClusterBlockException(global(level));
}
origin: org.elasticsearch/elasticsearch

public boolean hasGlobalBlock(ClusterBlockLevel level) {
  return global(level).size() > 0;
}
origin: org.elasticsearch/elasticsearch

public ClusterBlockException indicesBlockedException(ClusterBlockLevel level, String[] indices) {
  boolean indexIsBlocked = false;
  for (String index : indices) {
    if (indexBlocked(level, index)) {
      indexIsBlocked = true;
    }
  }
  if (globalBlocked(level) == false && indexIsBlocked == false) {
    return null;
  }
  Function<String, Stream<ClusterBlock>> blocksForIndexAtLevel = index -> blocksForIndex(level, index).stream();
  Stream<ClusterBlock> blocks = concat(
      global(level).stream(),
      Stream.of(indices).flatMap(blocksForIndexAtLevel));
  return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
}
origin: org.elasticsearch/elasticsearch

private boolean globalBlocked(ClusterBlockLevel level) {
  return global(level).isEmpty() == false;
}
origin: com.strapdata.elasticsearch/elasticsearch

public ClusterBlockException globalBlockedException(ClusterBlockLevel level) {
  if (globalBlocked(level) == false) {
    return null;
  }
  return new ClusterBlockException(global(level));
}
origin: org.elasticsearch/elasticsearch

public Builder blocks(ClusterBlocks blocks) {
  global.addAll(blocks.global());
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks.indices()) {
    if (!indices.containsKey(entry.key)) {
      indices.put(entry.key, new HashSet<>());
    }
    indices.get(entry.key).addAll(entry.value);
  }
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public ClusterBlockException globalBlockedException(ClusterBlockLevel level) {
  if (globalBlocked(level) == false) {
    return null;
  }
  return new ClusterBlockException(global(level));
}
origin: org.elasticsearch/elasticsearch

public ClusterBlockException indexBlockedException(ClusterBlockLevel level, String index) {
  if (!indexBlocked(level, index)) {
    return null;
  }
  Stream<ClusterBlock> blocks = concat(
      global(level).stream(),
      blocksForIndex(level, index).stream());
  return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
}
origin: apache/servicemix-bundles

public ClusterBlockException globalBlockedException(ClusterBlockLevel level) {
  if (globalBlocked(level) == false) {
    return null;
  }
  return new ClusterBlockException(global(level));
}
origin: org.elasticsearch/elasticsearch

/**
 * Returns <code>true</code> iff non of the given have a {@link ClusterBlockLevel#METADATA_WRITE} in place where the
 * {@link ClusterBlock#isAllowReleaseResources()} returns <code>false</code>. This is used in places where resources will be released
 * like the deletion of an index to free up resources on nodes.
 * @param indices the indices to check
 */
public ClusterBlockException indicesAllowReleaseResources(String[] indices) {
  final Function<String, Stream<ClusterBlock>> blocksForIndexAtLevel = index ->
    blocksForIndex(ClusterBlockLevel.METADATA_WRITE, index).stream();
  Stream<ClusterBlock> blocks = concat(
    global(ClusterBlockLevel.METADATA_WRITE).stream(),
    Stream.of(indices).flatMap(blocksForIndexAtLevel)).filter(clusterBlock -> clusterBlock.isAllowReleaseResources() == false);
  Set<ClusterBlock> clusterBlocks = unmodifiableSet(blocks.collect(toSet()));
  if (clusterBlocks.isEmpty()) {
    return null;
  }
  return new ClusterBlockException(clusterBlocks);
}
origin: harbby/presto-connectors

public ClusterBlockException globalBlockedException(ClusterBlockLevel level) {
  if (globalBlocked(level) == false) {
    return null;
  }
  return new ClusterBlockException(ImmutableSet.copyOf(global(level)));
}
origin: org.elasticsearch/elasticsearch

builder.startObject("blocks");
if (!blocks().global().isEmpty()) {
  builder.startObject("global");
  for (ClusterBlock block : blocks().global()) {
    block.toXContent(builder, params);
origin: com.strapdata.elasticsearch/elasticsearch

public Builder blocks(ClusterBlocks blocks) {
  global.addAll(blocks.global());
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks.indices()) {
    if (!indices.containsKey(entry.key)) {
      indices.put(entry.key, new HashSet<>());
    }
    indices.get(entry.key).addAll(entry.value);
  }
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public Builder blocks(ClusterBlocks blocks) {
  global.addAll(blocks.global());
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks.indices()) {
    if (!indices.containsKey(entry.key)) {
      indices.put(entry.key, new HashSet<>());
    }
    indices.get(entry.key).addAll(entry.value);
  }
  return this;
}
origin: apache/servicemix-bundles

public Builder blocks(ClusterBlocks blocks) {
  global.addAll(blocks.global());
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks.indices()) {
    if (!indices.containsKey(entry.key)) {
      indices.put(entry.key, new HashSet<>());
    }
    indices.get(entry.key).addAll(entry.value);
  }
  return this;
}
origin: harbby/presto-connectors

public Builder blocks(ClusterBlocks blocks) {
  global.addAll(blocks.global());
  for (Map.Entry<String, ImmutableSet<ClusterBlock>> entry : blocks.indices().entrySet()) {
    if (!indices.containsKey(entry.getKey())) {
      indices.put(entry.getKey(), Sets.<ClusterBlock>newHashSet());
    }
    indices.get(entry.getKey()).addAll(entry.getValue());
  }
  return this;
}
origin: apache/servicemix-bundles

public ClusterBlockException indexBlockedException(ClusterBlockLevel level, String index) {
  if (!indexBlocked(level, index)) {
    return null;
  }
  Stream<ClusterBlock> blocks = concat(
      global(level).stream(),
      blocksForIndex(level, index).stream());
  return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
}
origin: com.strapdata.elasticsearch/elasticsearch

public ClusterBlockException indexBlockedException(ClusterBlockLevel level, String index) {
  if (!indexBlocked(level, index)) {
    return null;
  }
  Stream<ClusterBlock> blocks = concat(
      global(level).stream(),
      blocksForIndex(level, index).stream());
  return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public ClusterBlockException indexBlockedException(ClusterBlockLevel level, String index) {
  if (!indexBlocked(level, index)) {
    return null;
  }
  Stream<ClusterBlock> blocks = concat(
      global(level).stream(),
      blocksForIndex(level, index).stream());
  return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
}
origin: harbby/presto-connectors

public ClusterBlockException indexBlockedException(ClusterBlockLevel level, String index) {
  if (!indexBlocked(level, index)) {
    return null;
  }
  ImmutableSet.Builder<ClusterBlock> builder = ImmutableSet.builder();
  builder.addAll(global(level));
  ImmutableSet<ClusterBlock> indexBlocks = indices(level).get(index);
  if (indexBlocks != null) {
    builder.addAll(indexBlocks);
  }
  return new ClusterBlockException(builder.build());
}
org.elasticsearch.cluster.blockClusterBlocksglobal

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.
  • globalBlocked
  • hasGlobalBlock
    Is there a global block with the provided status?
  • indexBlocked
  • indexBlockedRaiseException
  • indexBlocked,
  • indexBlockedRaiseException,
  • indices,
  • readBlockSet,
  • readDiffFrom,
  • writeBlockSet,
  • writeTo,
  • blocksForIndex,
  • generateLevelHolders

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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