Examples of ElasticsearchException


Examples of org.elasticsearch.ElasticsearchException

            byte[] buffer = new byte[1024];
            for (long cur = 0; cur < partToRead; cur += buffer.length) {
                try {
                    input.read(buffer, 0, (int) (partToRead - cur > buffer.length ? buffer.length : partToRead - cur));
                } catch (IOException ex) {
                    throw new ElasticsearchException("cannot read input stream", ex);
                }
            }
            AmazonS3Exception ex = new AmazonS3Exception("Random S3 exception");
            ex.setStatusCode(400);
            ex.setErrorCode("RequestTimeout");
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

            byte[] bytes = digest.digest(path.getBytes("UTF-8"));
            int i = 0;
            return ((bytes[i++] & 0xFF) << 24) | ((bytes[i++] & 0xFF) << 16)
                    | ((bytes[i++] & 0xFF) << 8) | (bytes[i++] & 0xFF);
        } catch (UnsupportedEncodingException ex) {
            throw new ElasticsearchException("cannot calculate hashcode", ex);
        } catch (NoSuchAlgorithmException ex) {
            throw new ElasticsearchException("cannot calculate hashcode", ex);
        }
    }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

        }
      }
      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.ElasticsearchException

    } else {
      logger.debug("River {} found on this node, go to call mgm operation on it {}", req.getRiverName(), req);
      try {
        return performOperationOnRiver(river, req, clusterService.localNode());
      } catch (Exception e) {
        throw new ElasticsearchException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

  @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());
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

    } else {
      logger.debug("JIRA River {} found on this node, go to call mgm operation on it {}", req.getRiverName(), req);
      try {
        return performOperationOnJiraRiver(river, req, clusterService.localNode());
      } catch (Exception e) {
        throw new ElasticsearchException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

  @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());
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

      logger.debug("Sysinfo River {} found on this node, go to call mgm operation on it {}", req.getRiverName(), req);
      try {
        return performOperationOnRiver(river, req, clusterService.localNode());
      } catch (Exception e) {
        logger.error("Exception from river management operation: {}", e, e.getMessage());
        throw new ElasticsearchException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

    } else {
      logger.debug("JIRA River {} found on this node, go to call mgm operation on it {}", req.getRiverName(), req);
      try {
        return performOperationOnJiraRiver(river, req, clusterService.localNode());
      } catch (Exception e) {
        throw new ElasticsearchException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

Examples of org.elasticsearch.ElasticsearchException

    private int getPortOfRunningNode() {
        TransportAddress transportAddress = internalCluster().getInstance(HttpServerTransport.class).boundAddress().boundAddress();
        if (transportAddress instanceof InetSocketTransportAddress) {
            return ((InetSocketTransportAddress) transportAddress).address().getPort();
        }
        throw new ElasticsearchException("Could not find running tcp port");
    }
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.