使用HBase shell时,我得到了大量的日志记录,包括INFO和DEBUG消息.虽然这在学习HBase内部方面很有意思,但它非常冗长并且可以掩盖输出.
我已尝试以多种不同的方式更改日志记录级别,包括此处所述,虽然一些警告确实消失,但我仍然会收到大量的INFO和DEBUG消息,即:
18:50:49.500 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
18:50:49.516 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:host.name=ip-10-234-8-223.ec2.internal
18:50:49.517 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.version=1.7.0_65
18:50:49.517 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.vendor=Oracle Corporation
Run Code Online (Sandbox Code Playgroud)
除了$ HBASE_HOME/conf/log4j.properties之外,我还尝试在$ HBASE_HOME/bin/hbase shell脚本之外运行shell.即使设置log4j.rootLogger = OFF也没有帮助.Logger.getRootLogger().setLevel(Level.WARN);根据上述链接,尝试使用也不起作用.
这些消息是由JRuby记录器发出的吗?它们是否被其他组件作为文本返回到shell?
我正在尝试使用DataKinds进行类型级编程,但是当我将这些结构中的一个嵌套在另一个中时遇到了困难.
{-# LANGUAGE DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses, FlexibleInstances #-}
module Temp where
data Prop1 = D | E
data Lower :: Prop1 -> * where
SubThing1 :: Lower D
SubThing2 :: Lower E
class ClassLower a where
somefunc2 :: a -> String
instance ClassLower (Lower D) where
somefunc2 a = "string3"
instance ClassLower (Lower E) where
somefunc2 a = "string4"
data Prop2 = A | B | C
data Upper :: Prop2 -> * where
Thing1 :: Upper A
Thing2 …Run Code Online (Sandbox Code Playgroud)