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

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

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

origin: org.elasticsearch/elasticsearch

public boolean indexBlocked(ClusterBlockLevel level, String index) {
  return globalBlocked(level) || blocksForIndex(level, index).isEmpty() == false;
}
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: 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: 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.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public boolean indexBlocked(ClusterBlockLevel level, String index) {
  return globalBlocked(level) || blocksForIndex(level, index).isEmpty() == false;
}
origin: apache/servicemix-bundles

public boolean indexBlocked(ClusterBlockLevel level, String index) {
  return globalBlocked(level) || blocksForIndex(level, index).isEmpty() == false;
}
origin: com.strapdata.elasticsearch/elasticsearch

public boolean indexBlocked(ClusterBlockLevel level, String index) {
  return globalBlocked(level) || blocksForIndex(level, index).isEmpty() == false;
}
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: 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: 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: com.strapdata.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: apache/servicemix-bundles

/**
 * 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: org.apache.servicemix.bundles/org.apache.servicemix.bundles.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: apache/servicemix-bundles

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: com.strapdata.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.apache.servicemix.bundles/org.apache.servicemix.bundles.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())));
}
org.elasticsearch.cluster.blockClusterBlocksblocksForIndex

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,
  • indexBlockedRaiseException,
  • indices,
  • readBlockSet,
  • readDiffFrom,
  • writeBlockSet,
  • writeTo,
  • generateLevelHolders

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • JFileChooser (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
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