congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ClusterBlocks.indices
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.elasticsearch/elasticsearch

private Set<ClusterBlock> blocksForIndex(ClusterBlockLevel level, String index) {
  return indices(level).getOrDefault(index, emptySet());
}
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.elasticsearch/elasticsearch

@Override
public String toString() {
  if (global.isEmpty() && indices().isEmpty()) {
    return "";
  }
  StringBuilder sb = new StringBuilder();
  sb.append("blocks: \n");
  if (global.isEmpty() == false) {
    sb.append("   _global_:\n");
    for (ClusterBlock block : global) {
      sb.append("      ").append(block);
    }
  }
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : indices()) {
    sb.append("   ").append(entry.key).append(":\n");
    for (ClusterBlock block : entry.value) {
      sb.append("      ").append(block);
    }
  }
  sb.append("\n");
  return sb.toString();
}
origin: org.elasticsearch/elasticsearch

if (!blocks().indices().isEmpty()) {
  builder.startObject("indices");
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks().indices()) {
    builder.startObject(entry.key);
    for (ClusterBlock block : entry.value) {
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: com.strapdata.elasticsearch/elasticsearch

private Set<ClusterBlock> blocksForIndex(ClusterBlockLevel level, String index) {
  return indices(level).getOrDefault(index, emptySet());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private Set<ClusterBlock> blocksForIndex(ClusterBlockLevel level, String index) {
  return indices(level).getOrDefault(index, emptySet());
}
origin: apache/servicemix-bundles

private Set<ClusterBlock> blocksForIndex(ClusterBlockLevel level, String index) {
  return indices(level).getOrDefault(index, emptySet());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public String toString() {
  if (global.isEmpty() && indices().isEmpty()) {
    return "";
  }
  StringBuilder sb = new StringBuilder();
  sb.append("blocks: \n");
  if (global.isEmpty() == false) {
    sb.append("   _global_:\n");
    for (ClusterBlock block : global) {
      sb.append("      ").append(block);
    }
  }
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : indices()) {
    sb.append("   ").append(entry.key).append(":\n");
    for (ClusterBlock block : entry.value) {
      sb.append("      ").append(block);
    }
  }
  sb.append("\n");
  return sb.toString();
}
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: com.strapdata.elasticsearch/elasticsearch

@Override
public String toString() {
  if (global.isEmpty() && indices().isEmpty()) {
    return "";
  }
  StringBuilder sb = new StringBuilder();
  sb.append("blocks: \n");
  if (global.isEmpty() == false) {
    sb.append("   _global_:\n");
    for (ClusterBlock block : global) {
      sb.append("      ").append(block);
    }
  }
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : indices()) {
    sb.append("   ").append(entry.key).append(":\n");
    for (ClusterBlock block : entry.value) {
      sb.append("      ").append(block);
    }
  }
  sb.append("\n");
  return sb.toString();
}
origin: apache/servicemix-bundles

@Override
public String toString() {
  if (global.isEmpty() && indices().isEmpty()) {
    return "";
  }
  StringBuilder sb = new StringBuilder();
  sb.append("blocks: \n");
  if (global.isEmpty() == false) {
    sb.append("   _global_:\n");
    for (ClusterBlock block : global) {
      sb.append("      ").append(block);
    }
  }
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : indices()) {
    sb.append("   ").append(entry.key).append(":\n");
    for (ClusterBlock block : entry.value) {
      sb.append("      ").append(block);
    }
  }
  sb.append("\n");
  return sb.toString();
}
origin: harbby/presto-connectors

public String prettyPrint() {
  if (global.isEmpty() && indices().isEmpty()) {
    return "";
  }
  StringBuilder sb = new StringBuilder();
  sb.append("blocks: \n");
  if (global.isEmpty() == false) {
    sb.append("   _global_:\n");
    for (ClusterBlock block : global) {
      sb.append("      ").append(block);
    }
  }
  for (Map.Entry<String, ImmutableSet<ClusterBlock>> entry : indicesBlocks.entrySet()) {
    sb.append("   ").append(entry.getKey()).append(":\n");
    for (ClusterBlock block : entry.getValue()) {
      sb.append("      ").append(block);
    }
  }
  sb.append("\n");
  return sb.toString();
}
origin: harbby/presto-connectors

public boolean indexBlocked(ClusterBlockLevel level, String index) {
  if (globalBlocked(level)) {
    return true;
  }
  ImmutableSet<ClusterBlock> indexBlocks = indices(level).get(index);
  if (indexBlocks != null && !indexBlocks.isEmpty()) {
    return true;
  }
  return false;
}
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());
}
origin: harbby/presto-connectors

if (!blocks().indices().isEmpty()) {
  builder.startObject("indices");
  for (Map.Entry<String, ImmutableSet<ClusterBlock>> entry : blocks().indices().entrySet()) {
    builder.startObject(entry.getKey());
    for (ClusterBlock block : entry.getValue()) {
origin: apache/servicemix-bundles

if (!blocks().indices().isEmpty()) {
  builder.startObject("indices");
  for (ObjectObjectCursor<String, Set<ClusterBlock>> entry : blocks().indices()) {
    builder.startObject(entry.key);
    for (ClusterBlock block : entry.value) {
origin: harbby/presto-connectors

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;
  }
  ImmutableSet.Builder<ClusterBlock> builder = ImmutableSet.builder();
  builder.addAll(global(level));
  for (String index : indices) {
    ImmutableSet<ClusterBlock> indexBlocks = indices(level).get(index);
    if (indexBlocks != null) {
      builder.addAll(indexBlocks);
    }
  }
  return new ClusterBlockException(builder.build());
}
org.elasticsearch.cluster.blockClusterBlocksindices

Javadoc

Returns true iff non of the given have a ClusterBlockLevel#METADATA_WRITE in place where the ClusterBlock#isAllowReleaseResources() returns false. This is used in places where resources will be released like the deletion of an index to free up resources on nodes.

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JCheckBox (javax.swing)
  • Top 12 Jupyter Notebook Extensions
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