Package org.elasticsearch

Examples of org.elasticsearch.ElasticsearchException$WithRestHeaders


    } 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


    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

  @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

      boundAddress = new BoundTransportAddress(
          new InetSocketTransportAddress(bindAddress),
          new InetSocketTransportAddress(publishAddress));

    } catch (final Exception e) {
      throw new ElasticsearchException("Unable to start Tomcat", e);
    }

  }
View Full Code Here

      if (tomcat != null) {
        tomcat.stop();
      }

    } catch (final Exception e) {
      throw new ElasticsearchException("Unable to stop Tomcat", e);
    }

  }
View Full Code Here

  protected void doClose() throws ElasticsearchException {
    try {
      tomcat.destroy();
      tomcat = null;
    } catch (final LifecycleException e) {
      throw new ElasticsearchException("Unable to destroy Tomcat", e);
    }

  }
View Full Code Here

        // Fail if host address is a public IP but only on-site networking is allowed.
        if (onsiteonly) {
            if (hostAddress == null || (!hostAddress.isLoopbackAddress()
                    && !hostAddress.isLinkLocalAddress()
                    && !hostAddress.isSiteLocalAddress())) {
                throw new ElasticsearchException("Bind host " + bindHost
                        + (hostAddress != null ? "(address " + hostAddress + ") " : "")
                        + "is not on-site and not permitted by default. Check 'websocket.onsiteonly' setting in configuration.");
            }
        }
View Full Code Here

        Class<? extends TypeSelector> typeSelectorClass = settings.<TypeSelector>getAsClass("couchbase.typeSelector", DefaultTypeSelector.class);
        try {
            this.typeSelector = typeSelectorClass.newInstance();
        } catch (Exception e) {
            throw new ElasticsearchException("couchbase.typeSelector", e);
        }
        this.typeSelector.configure(settings);


        int defaultNumVbuckets = 1024;
View Full Code Here

    protected void doStop() throws ElasticsearchException {
        if(server != null) {
            try {
                server.stop();
            } catch (Exception e) {
                throw new ElasticsearchException("Error stopping jetty", e);
            }
        }
    }
View Full Code Here

            if (Version.CURRENT.before(Version.V_1_2_4)) {
                throw new Exception();
            }
        } catch (Throwable e) {
            String error = String.format(Locale.ROOT, "The elasticsearch suggest plugin needs a newer version of elasticsearch than %s", Version.CURRENT);
            throw new ElasticsearchException(error);
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.ElasticsearchException$WithRestHeaders

Copyright © 2018 www.massapicom. 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.