I use Apache Spark spark-shell with mesos and zookeeper, which seems to work fine, except that I get more logs from zookeeper than I would like, which is a little distracting:
Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 1.5.0 /_/ Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_60) Type in expressions to have them evaluated. Type :help for more information. 2015-03-26 20:08:22,115:15978(0x7f83a1fbc740): ZOO_INFO@log _env@712 : Client environment:zookeeper.version=zookeeper C client 3.4.6 2015-03-26 20:08:22,115:15978(0x7f83a1fbc740): ZOO_INFO@log _env@716 : Client environment:host.name=myhost 2015-03-26 20:08:22,115:15978(0x7f83a1fbc740): ZOO_INFO@log _env@723 : Client environment:os.name=Linux 2015-03-26 20:08:22,115:15978(0x7f83a1fbc740): ZOO_INFO@log _env@724 : Client environment:os.arch=3.2.0-34-generic 2015-03-26 20:08:22,115:15978(0x7f83a1fbc740): ZOO_INFO@log _env@725 : Client environment:os.version=
I tried changing $SPARK_CONF_DIR/log4j.properties
log4j.logger.org.apache.zookeeper=WARN
Which didn't work, but I'm not surprised, as the mesos documentation mentions that writing to zookeeper goes directly to stderr :
NOTE. Messages from third-party logs (for example, ZooKeeper) are recorded only in stderr!
Adding a jar for intrinsic safety classpath, which has a static block with an external function interface call for the zookeeper C api function to change the log level , it seems that it can but I'm not sure, and I have no experience with calling C code from the JVM.
source share