forked from sonian/elasticsearch-jetty
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use onModule to inject http transport into http server module. Allow …
…usage of http.type and sonian.elasticsearch.http.type settings. No setting for any http.type will default to JettyHttpServerTransport. This means the plugin will use Jetty by default without any configuration. All you need is a jetty.xml in your config path. Adding a jetty.xml to the classpath so server works even if no jetty.xml is specified. Reorganize elasticsearch.yml.
- Loading branch information
Greg Butt
committed
Mar 21, 2015
1 parent
06614d8
commit 31e5000
Showing
10 changed files
with
300 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> | ||
|
||
<Configure id="ESServer" class="org.eclipse.jetty.server.Server"> | ||
|
||
<!-- ==================================================== --> | ||
<!-- ElasticSearch Handler. --> | ||
<!-- This handler redirects all requests to ElasticSearch --> | ||
<!-- ==================================================== --> | ||
<Set name="handler"> | ||
<New class="com.sonian.elasticsearch.http.jetty.handler.JettyHttpServerTransportHandler" | ||
id="HttpServerAdapterHandler"> | ||
<Set name="transport"><Ref id="ESServerTransport"/></Set> | ||
</New> | ||
</Set> | ||
|
||
<!-- ==================================================== --> | ||
<!-- Reduce verbosity of jetty default error handler --> | ||
<!-- ==================================================== --> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New class="com.sonian.elasticsearch.http.jetty.error.JettyHttpServerErrorHandler" | ||
id="HttpServerErrorHandler"> | ||
</New> | ||
</Arg> | ||
</Call> | ||
|
||
<!-- ======================================== --> | ||
<!-- Add HTTP connector --> | ||
<!-- ======================================== --> | ||
<Call name="addConnector"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> | ||
<Set name="host"><Property name="jetty.bind_host"/></Set> | ||
<Set name="port"><Property name="jetty.port"/></Set> | ||
<Set name="maxIdleTime">600000</Set> | ||
<Set name="Acceptors">2</Set> | ||
</New> | ||
</Arg> | ||
</Call> | ||
|
||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.