Examples of buildFailureMessage()


Examples of com.dotcms.repackage.org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

        //    new ESMappingAPIImpl().toJson(c)));

      }
      BulkResponse bulkResponse = bulkRequest.execute().actionGet();
      if (bulkResponse.hasFailures()) {
        Logger.error(this.getClass(), bulkResponse.buildFailureMessage());
      }

   

    }
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

        sinkCounter.addToEventDrainAttemptCount(size);

        BulkResponse bulkResponse = bulkRequest.execute().actionGet();
        if (bulkResponse.hasFailures()) {
          throw new EventDeliveryException(bulkResponse.buildFailureMessage());
        }
      }
      txn.commit();
      sinkCounter.addToEventDrainSuccessCount(size);
      counterGroup.incrementAndGet("transaction.success");
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

  @Override
  public void execute() throws Exception {
    try {
      BulkResponse bulkResponse = bulkRequestBuilder.execute().actionGet();
      if (bulkResponse.hasFailures()) {
        throw new EventDeliveryException(bulkResponse.buildFailureMessage());
      }
    } finally {
      bulkRequestBuilder = client.prepareBulk();
    }
  }
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

            if (bulk.numberOfActions() > 0) {
                LOG.info("Executing {} bulk actions", bulk.numberOfActions());
                final BulkResponse bulkResponse = bulk.execute().actionGet();

                if (bulkResponse.hasFailures()) {
                    LOG.error("BULK ERROR {}", bulkResponse.buildFailureMessage());
                } else {
                    LOG.info("Bulk action took {}ms", bulkResponse.getTookInMillis());
                }
            } else {
                LOG.debug("No bulk actions to execute!");
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

        log.debug("Deflector index: Bulk indexed {} messages, took {} ms, failures: {}",
                  response.getItems().length, response.getTookInMillis(), response.hasFailures());

        if (response.hasFailures()) {
            propagateFailure(response.getItems(), messages, response.buildFailureMessage());
        }

        return !response.hasFailures();
    }
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

        } else {
          numOfFailures++;
        }
      }
      if (containsSuccess) {
        throw new BulkUpdatePartialFailureException(response.buildFailureMessage(), numOfFailures);
      } else {
        throw new ElasticsearchException("Failed to completely execute ES index bulk update for " + numOfFailures
            + " commands: " + response.buildFailureMessage());
      }
    }
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

      }
      if (containsSuccess) {
        throw new BulkUpdatePartialFailureException(response.buildFailureMessage(), numOfFailures);
      } else {
        throw new ElasticsearchException("Failed to completely execute ES index bulk update for " + numOfFailures
            + " commands: " + response.buildFailureMessage());
      }
    }
  }

  @Override
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

  @Override
  public void executeESBulkRequest(BulkRequestBuilder esBulk) throws Exception {
    BulkResponse response = esBulk.execute().actionGet();
    if (response.hasFailures()) {
      throw new ElasticsearchException("Failed to execute ES index bulk update: " + response.buildFailureMessage());
    }
  }

  @Override
  public Thread acquireIndexingThread(String threadName, Runnable runnable) {
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

  @Override
  public void executeESBulkRequest(BulkRequestBuilder esBulk) throws Exception {
    BulkResponse response = esBulk.execute().actionGet();
    if (response.hasFailures()) {
      throw new ElasticsearchException("Failed to execute ES index bulk update: " + response.buildFailureMessage());
    }
  }

  @Override
  public Thread acquireIndexingThread(String threadName, Runnable runnable) {
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.buildFailureMessage()

  public void execute() throws Exception {
    try {
      logger.info("Sending bulk to elasticsearch cluster");
      BulkResponse bulkResponse = bulkRequestBuilder.execute().actionGet();
      if (bulkResponse.hasFailures()) {
        throw new EventDeliveryException(bulkResponse.buildFailureMessage());
      }
    } finally {
      bulkRequestBuilder = client.prepareBulk();
    }
  }
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.