summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-09-26 14:05:42 +0200
committerPatrick Lauer <patrick@gentoo.org>2016-09-26 14:14:49 +0200
commitbb99eceeb46b154b21dfb82c5e5d8fb6b0de9c4c (patch)
tree514d5cd965b6fd8c728056510534a7ab87a67734 /sys-cluster/zookeeper-bin/files
parentsci-libs/opencascade: USE=vtk needs vtkInteractionStyle, bug 557602. (diff)
downloadgentoo-bb99eceeb46b154b21dfb82c5e5d8fb6b0de9c4c.tar.gz
gentoo-bb99eceeb46b154b21dfb82c5e5d8fb6b0de9c4c.tar.bz2
gentoo-bb99eceeb46b154b21dfb82c5e5d8fb6b0de9c4c.zip
sys-cluster/zookeeper-bin: Initial import.
Based on ebuilds by Ultrabug, with modifications tested in the adjust overlay. Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-cluster/zookeeper-bin/files')
-rw-r--r--sys-cluster/zookeeper-bin/files/log4j.properties58
-rw-r--r--sys-cluster/zookeeper-bin/files/zookeeper.confd18
-rw-r--r--sys-cluster/zookeeper-bin/files/zookeeper.initd15
3 files changed, 91 insertions, 0 deletions
diff --git a/sys-cluster/zookeeper-bin/files/log4j.properties b/sys-cluster/zookeeper-bin/files/log4j.properties
new file mode 100644
index 00000000000..c462993d96a
--- /dev/null
+++ b/sys-cluster/zookeeper-bin/files/log4j.properties
@@ -0,0 +1,58 @@
+# Define some default values that can be overridden by system properties
+zookeeper.root.logger=INFO, CONSOLE
+zookeeper.console.threshold=INFO
+zookeeper.log.dir=/var/log/zookeeper/
+zookeeper.log.file=zookeeper.log
+zookeeper.log.threshold=DEBUG
+zookeeper.tracelog.dir=/var/log/zookeeper/
+zookeeper.tracelog.file=zookeeper_trace.log
+
+#
+# ZooKeeper Logging Configuration
+#
+
+# Format is "<default threshold> (, <appender>)+
+
+# DEFAULT: console appender only
+#log4j.rootLogger=${zookeeper.root.logger}
+
+# Example with rolling log file
+log4j.rootLogger=CONSOLE, ROLLINGFILE
+
+# Example with rolling log file and tracing
+#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
+
+#
+# Log INFO level and above messages to the console
+#
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
+
+#
+# Add ROLLINGFILE to rootLogger to get log file output
+# Log DEBUG level and above messages to a log file
+log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
+log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
+log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
+
+# Max log file size of 256MB
+log4j.appender.ROLLINGFILE.MaxFileSize=256MB
+# uncomment the next line to limit number of backup files
+log4j.appender.ROLLINGFILE.MaxBackupIndex=10
+
+log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
+
+
+#
+# Add TRACEFILE to rootLogger to get log file output
+# Log DEBUG level and above messages to a log file
+log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
+log4j.appender.TRACEFILE.Threshold=TRACE
+log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}
+
+log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
+### Notice we are including log4j's NDC here (%x)
+log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n
diff --git a/sys-cluster/zookeeper-bin/files/zookeeper.confd b/sys-cluster/zookeeper-bin/files/zookeeper.confd
new file mode 100644
index 00000000000..c6c6f0a6d92
--- /dev/null
+++ b/sys-cluster/zookeeper-bin/files/zookeeper.confd
@@ -0,0 +1,18 @@
+# JVM options
+JVM_OPTS=""
+
+# zookeeper files
+MAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
+CONFIG="/opt/zookeeper-bin/conf/zoo.cfg"
+
+# build the classpath
+INSTALL_DIR=/opt/zookeeper-bin
+CLASSPATH="${INSTALL_DIR}/conf:${CLASSPATH}"
+
+for i in ${INSTALL_DIR}/zookeeper-*.jar; do
+ CLASSPATH="${i}:${CLASSPATH}"
+done
+
+for i in ${INSTALL_DIR}/lib/*.jar; do
+ CLASSPATH="${i}:${CLASSPATH}"
+done
diff --git a/sys-cluster/zookeeper-bin/files/zookeeper.initd b/sys-cluster/zookeeper-bin/files/zookeeper.initd
new file mode 100644
index 00000000000..a760ce7296d
--- /dev/null
+++ b/sys-cluster/zookeeper-bin/files/zookeeper.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+name="zookeeper"
+command="/usr/bin/java"
+command_args="${JVM_OPTS} -cp ${CLASSPATH} ${MAIN} ${CONFIG}"
+command_background="true"
+start_stop_daemon_args="--user zookeeper --group zookeeper"
+pidfile="/var/run/zookeeper.pid"
+
+depend() {
+ need net
+}