Breaking changes - Remove option to configure custom config file via CONF_FILE or -Des.default.conf Deprecations - Deprecate index.analysis.analyzer.default_index in favor of index.analysis.analyzer.default. Enhancements - Make PerThreadIDAndVersionLookup per-segment - TransportNodesAction shouldn't hold on to cluster state - Packaging: change permissions/ownership of config dir - Release: Fix package repo path to only consist of major version - Plugin Cloud GCE: Add _gce_ network host setting - Check "plugin already installed" before jar hell check. - Plugin script to set proper plugin bin dir attributes - Plugin script to set proper plugin config dir attributes Bug fixes - CRUD: Send response for update request when it timed out - Engine: Never wrap searcher for internal engine operations - Fielddata: Add GeoPoint in StreamInput/StreamOutput - Properly bind ClassSet extensions as singletons - Streamline top level reader close listeners and forbid general usage - Settings in log config file should not overwrite custom parameters - Plugin cli tool should not create empty log files - Mappings: Enforce metadata fields are not passed in documents - Plugin Cloud AWS: Discovery-ec2 plugin should check discovery.type - Parse Java system properties in plugin.bat - PluginManager: Dont leave leftover files on unsuccessful installs - REST: Restore support for escaped '/' as part of document id - REST: Add missing REST spec for detect_noop - REST: Expose nodes operation timeout in REST API - REST: Ensure XContent is consistent across platforms - Shadow Replicas: Don't pull translog from shadow engine - Snapshot restore operations throttle more than specified Upgrades - Upgrade Netty to 3.10.5.final NOT CLASSIFIED - [DOCS] terminate_after is not experimental anymore - Remove unused clear(IndexReader) method from IndexFieldData - changed ben to been - move render search template methods to cluster admin client - Docs: Document ES_CLASSPATH removal in breaking changes - Rewrite native script documentation - Docs: Update repository docs with new major version structure - Add a note about shard failure in the api
69 lines
1.8 KiB
Bash
69 lines
1.8 KiB
Bash
#! @RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: elasticsearch.sh,v 1.3 2015/11/12 15:37:07 fhajny Exp $
|
|
#
|
|
# PROVIDE: elasticsearch
|
|
# REQUIRE: DAEMON
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="elasticsearch"
|
|
rcvar=$name
|
|
pidfile="@ES_PIDDIR@/elasticsearch.pid"
|
|
required_files="@PKG_SYSCONFDIR@/elasticsearch.yml"
|
|
start_precmd="elasticsearch_precmd"
|
|
|
|
: ${elasticsearch_user:=@ES_USER@}
|
|
: ${elasticsearch_group:=@ES_GROUP@}
|
|
: ${elasticsearch_config:="@PKG_SYSCONFDIR@/elasticsearch.yml"}
|
|
: ${elasticsearch_min_mem:="256m"}
|
|
: ${elasticsearch_max_mem:="1g"}
|
|
: ${elasticsearch_props:=""}
|
|
: ${elasticsearch_fdlimit:="768"}
|
|
|
|
ES_CLASSPATH="@ES_LIBDIR@/@DISTNAME@.jar:@ES_LIBDIR@/*"
|
|
|
|
command="@PKG_JAVA_HOME@/bin/java"
|
|
# flags taken from bin/elasticsearch and bin/elasticsearch.in.sh
|
|
command_args=" -Delasticsearch \
|
|
-Des.path.home=@PREFIX@ \
|
|
-Des.path.conf=@PKG_SYSCONFDIR@ \
|
|
-Des.pidfile=${pidfile} \
|
|
-Dfile.encoding=UTF-8 \
|
|
-Djava.awt.headless=true \
|
|
-Xms${elasticsearch_min_mem} \
|
|
-Xmx${elasticsearch_max_mem} \
|
|
-Xss256k \
|
|
-XX:+DisableExplicitGC \
|
|
-XX:+HeapDumpOnOutOfMemoryError \
|
|
-XX:+UseCMSInitiatingOccupancyOnly \
|
|
-XX:+UseCMSInitiatingOccupancyOnly \
|
|
-XX:+UseConcMarkSweepGC \
|
|
-XX:+UseParNewGC \
|
|
-XX:CMSInitiatingOccupancyFraction=75 \
|
|
-cp ${ES_CLASSPATH} \
|
|
${elasticsearch_props} \
|
|
org.elasticsearch.bootstrap.Elasticsearch \
|
|
start >/dev/null &"
|
|
|
|
# ElasticSearch is fd hungry, default limit leads to write locks
|
|
SOFT_FDLIMIT=`ulimit -S -n`
|
|
HARD_FDLIMIT=`ulimit -H -n`
|
|
|
|
if [ ${elasticsearch_fdlimit} -gt ${SOFT_FDLIMIT} ]; then
|
|
if [ ${elasticsearch_fdlimit} -le ${HARD_FDLIMIT} ]; then
|
|
ulimit -S -n ${elasticsearch_fdlimit}
|
|
else
|
|
ulimit -S -n ${HARD_FDLIMIT}
|
|
fi
|
|
fi
|
|
|
|
elasticsearch_precmd()
|
|
{
|
|
@TOUCH@ ${pidfile}
|
|
@CHOWN@ ${elasticsearch_user}:${elasticsearch_group} ${pidfile}
|
|
}
|
|
|
|
load_rc_config "$name"
|
|
run_rc_command "$1"
|