summaryrefslogtreecommitdiff
path: root/MPE/zookeeper/conf
diff options
context:
space:
mode:
Diffstat (limited to 'MPE/zookeeper/conf')
-rw-r--r--MPE/zookeeper/conf/configuration.xsl24
-rw-r--r--MPE/zookeeper/conf/java.env6
-rw-r--r--MPE/zookeeper/conf/log4j.properties63
-rw-r--r--MPE/zookeeper/conf/zoo.cfg51
-rw-r--r--MPE/zookeeper/conf/zoo_sample.cfg28
5 files changed, 172 insertions, 0 deletions
diff --git a/MPE/zookeeper/conf/configuration.xsl b/MPE/zookeeper/conf/configuration.xsl
new file mode 100644
index 0000000..377cdbe
--- /dev/null
+++ b/MPE/zookeeper/conf/configuration.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html"/>
+<xsl:template match="configuration">
+<html>
+<body>
+<table border="1">
+<tr>
+ <td>name</td>
+ <td>value</td>
+ <td>description</td>
+</tr>
+<xsl:for-each select="property">
+<tr>
+ <td><a name="{name}"><xsl:value-of select="name"/></a></td>
+ <td><xsl:value-of select="value"/></td>
+ <td><xsl:value-of select="description"/></td>
+</tr>
+</xsl:for-each>
+</table>
+</body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/MPE/zookeeper/conf/java.env b/MPE/zookeeper/conf/java.env
new file mode 100644
index 0000000..4c70fdb
--- /dev/null
+++ b/MPE/zookeeper/conf/java.env
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_73
+# heap size MUST be modified according to cluster environment
+
+export JVMFLAGS="-Xmx4096m -Xms1024m $JVMFLAGS"
diff --git a/MPE/zookeeper/conf/log4j.properties b/MPE/zookeeper/conf/log4j.properties
new file mode 100644
index 0000000..30d6d7b
--- /dev/null
+++ b/MPE/zookeeper/conf/log4j.properties
@@ -0,0 +1,63 @@
+# Define some default values that can be overridden by system properties
+#zookeeper.root.logger=INFO, CONSOLE
+zookeeper.root.logger=ERROR, ROLLINGFILE
+zookeeper.console.threshold=ERROR
+zookeeper.log.dir=.
+zookeeper.log.file=zookeeper.log
+zookeeper.log.threshold=ERROR
+zookeeper.tracelog.dir=.
+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=DEBUG, 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{yyyy-MM-dd HH:mm:ssZ}{UTC} [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=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
+log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
+log4j.appender.ROLLINGFILE.DataPattern='.'yyyy-MM-dd-HH
+log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROLLINGFILE.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ssZ}{UTC}] %p %m (%c)%n
+
+# Max log file size of 10MB
+log4j.appender.ROLLINGFILE.MaxFileSize=10MB
+# 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{yyyy-MM-dd HH:mm:ssZ}{UTC} [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{yyyy-MM-dd HH:mm:ssZ}{UTC} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n
diff --git a/MPE/zookeeper/conf/zoo.cfg b/MPE/zookeeper/conf/zoo.cfg
new file mode 100644
index 0000000..36f1eb3
--- /dev/null
+++ b/MPE/zookeeper/conf/zoo.cfg
@@ -0,0 +1,51 @@
+# The number of milliseconds of each tick
+# Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就会发送一个心跳。tickTime以毫秒为单位。
+tickTime=9000
+
+# The number of ticks that the initial synchronization phase can take
+# 集群中的follower服务器(F)与leader服务器(L)之间初始连接时能容忍的最多心跳数(tickTime的数量)。
+initLimit=10
+
+# The number of ticks that can pass between sending a request and getting an acknowledgement
+# 集群中的follower服务器与leader服务器之间请求和应答之间能容忍的最多心跳数(tickTime的数量)。
+syncLimit=5
+
+#ZooKeeper将会对客户端进行限流,系统中未处理的请求数量不超过设置的值。(default:1000)
+globalOutstandingLimit=1000
+
+# the maximum number of client connections.increase this if you need to handle more clients
+# socket级别限制单个客户端到ZooKeeper集群中单台服务器的并发连接数量.(default:60)
+maxClientCnxns=5000
+
+#忽略ACL验证,可以减少权限验证的相关操作,提升性能
+skipACL=yes
+
+#yes:每次写请求的数据都要从pagecache中固化到磁盘上,才算成功返回.后续写请求会等待前面写请求.
+#no:数据写到pagecache后就返回,提升性能,但是机器断电的时候,pagecache中的数据有可能丢失。
+forceSync=yes
+
+#当事务日志(WAL)中的fsync时间超过此值时,将向日志输出警告消息,需要forceSync为yes。
+fsync.warningthresholdms=20
+
+# the directory where the snapshot is stored.
+# do not use /tmp for storage, /tmp here is just example sakes.
+# Zookeeper保存数据的目录,默认情况下,Zookeeper将写数据的日志文件也保存在这个目录里。
+dataDir=/data/tsg/olap/zookeeper-3.4.10/data
+
+#Zookeeper保存日志文件的目录。
+dataLogDir=/data/tsg/olap/zookeeper-3.4.10/logs
+
+# the port at which the clients will connect
+#客户端连接 Zookeeper 服务器的端口
+clientPort=2181
+
+#指定需要保留的文件数目(default:3)
+autopurge.snapRetainCount=3
+
+#指定清理频率,单位为小时(default:0 表示不开启自动清理)
+autopurge.purgeInterval=1
+
+#the servers
+server.1=192.168.20.221:2888:3888
+server.2=192.168.20.222:2888:3888
+server.3=192.168.20.223:2888:3888
diff --git a/MPE/zookeeper/conf/zoo_sample.cfg b/MPE/zookeeper/conf/zoo_sample.cfg
new file mode 100644
index 0000000..a5a2c0b
--- /dev/null
+++ b/MPE/zookeeper/conf/zoo_sample.cfg
@@ -0,0 +1,28 @@
+# The number of milliseconds of each tick
+tickTime=2000
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit=10
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit=5
+# the directory where the snapshot is stored.
+# do not use /tmp for storage, /tmp here is just
+# example sakes.
+dataDir=/tmp/zookeeper
+# the port at which the clients will connect
+clientPort=2181
+# the maximum number of client connections.
+# increase this if you need to handle more clients
+#maxClientCnxns=60
+#
+# Be sure to read the maintenance section of the
+# administrator guide before turning on autopurge.
+#
+# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
+#
+# The number of snapshots to retain in dataDir
+#autopurge.snapRetainCount=3
+# Purge task interval in hours
+# Set to "0" to disable auto purge feature
+#autopurge.purgeInterval=1