Examples of blocks()


Examples of org.elasticsearch.cluster.ClusterState.blocks()

            ClusterState nodeState = getNodeClusterState(node);
            boolean success = true;
            if (nodeState.nodes().getMasterNode() == null) {
                success = false;
            }
            if (!nodeState.blocks().global().isEmpty()) {
                success = false;
            }
            if (!success) {
                fail("node [" + node + "] has no master or has blocks, despite of being on the right side of the partition. State dump:\n"
                        + nodeState.prettyPrint());
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState.blocks()

    }

    @Override
    protected void doExecute(final MultiPercolateRequest request, final ActionListener<MultiPercolateResponse> listener) {
        final ClusterState clusterState = clusterService.state();
        clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);

        final List<Object> percolateRequests = new ArrayList<>(request.requests().size());
        // Can have a mixture of percolate requests. (normal percolate requests & percolate existing doc),
        // so we need to keep track for what percolate request we had a get request
        final IntArrayList getRequestSlots = new IntArrayList();
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState.blocks()

    @Override
    protected void doExecute(final MultiTermVectorsRequest request, final ActionListener<MultiTermVectorsResponse> listener) {
        ClusterState clusterState = clusterService.state();

        clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);

        final AtomicArray<MultiTermVectorsItemResponse> responses = new AtomicArray<>(request.requests.size());

        Map<ShardId, MultiTermVectorsShardRequest> shardRequests = new HashMap<>();
        for (int i = 0; i < request.requests.size(); i++) {
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState.blocks()

    @Override
    protected void doExecute(final MultiGetRequest request, final ActionListener<MultiGetResponse> listener) {
        ClusterState clusterState = clusterService.state();

        clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);

        final AtomicArray<MultiGetItemResponse> responses = new AtomicArray<>(request.items.size());

        Map<ShardId, MultiGetShardRequest> shardRequests = new HashMap<>();
        for (int i = 0; i < request.items.size(); i++) {
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState.blocks()

    }

    private void executeBulk(final BulkRequest bulkRequest, final long startTime, final ActionListener<BulkResponse> listener, final AtomicArray<BulkItemResponse> responses ) {
        final ClusterState clusterState = clusterService.state();
        // TODO use timeout to wait here if its blocked...
        clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.WRITE);

        final ConcreteIndices concreteIndices = new ConcreteIndices(clusterState.metaData());
        MetaData metaData = clusterState.metaData();
        for (int i = 0; i < bulkRequest.requests.size(); i++) {
            ActionRequest request = bulkRequest.requests.get(i);
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState.blocks()

    }

    @Override
    protected void doExecute(final MultiSearchRequest request, final ActionListener<MultiSearchResponse> listener) {
        ClusterState clusterState = clusterService.state();
        clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);

        final AtomicArray<MultiSearchResponse.Item> responses = new AtomicArray<>(request.requests().size());
        final AtomicInteger counter = new AtomicInteger(responses.length());
        for (int i = 0; i < responses.length(); i++) {
            final int index = i;
View Full Code Here

Examples of org.sonar.duplications.block.FileBlocks.blocks()

    for (InputFile inputFile : sourceFiles) {
      LOG.debug("Populating index from {}", inputFile);
      String resourceEffectiveKey = ((DeprecatedDefaultInputFile) inputFile).key();
      FileBlocks fileBlocks = duplicationCache.byComponent(resourceEffectiveKey);
      if (fileBlocks != null) {
        index.insert(inputFile, fileBlocks.blocks());
      } else if (bridge != null) {
        List<Block> blocks2 = bridge.chunk(resourceEffectiveKey, inputFile.file());
        index.insert(inputFile, blocks2);
      }
    }
View Full Code Here

Examples of org.sonar.duplications.block.FileBlocks.blocks()

  @Override
  public void put(Value value, Object object, CoderContext context) {
    FileBlocks blocks = (FileBlocks) object;
    value.putUTF(blocks.resourceId());
    value.put(blocks.blocks().size());
    for (Block b : blocks.blocks()) {
      value.putByteArray(b.getBlockHash().getBytes());
      value.put(b.getIndexInFile());
      value.put(b.getStartLine());
      value.put(b.getEndLine());
View Full Code Here

Examples of org.sonar.duplications.block.FileBlocks.blocks()

  @Override
  public void put(Value value, Object object, CoderContext context) {
    FileBlocks blocks = (FileBlocks) object;
    value.putUTF(blocks.resourceId());
    value.put(blocks.blocks().size());
    for (Block b : blocks.blocks()) {
      value.putByteArray(b.getBlockHash().getBytes());
      value.put(b.getIndexInFile());
      value.put(b.getStartLine());
      value.put(b.getEndLine());
      value.put(b.getStartUnit());
View Full Code Here

Examples of wyil.lang.WyilFile.blocks()

      // we have to do the following basically because we don't load
      // modifiers properly out of jvm class files (at the moment).
      // return false;
      WyilFile w = builder.getModule(mid);
      List<WyilFile.Block> blocks = w.blocks();
      for (int i = 0; i != blocks.size(); ++i) {
        WyilFile.Block d = blocks.get(i);
        if (d instanceof WyilFile.Declaration) {
          WyilFile.Declaration nd = (WyilFile.Declaration) d;
          return nd != null && nd.hasModifier(modifier);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.