在通过“pig -x local"使用 grunt 的同时使用 DUMP 命令时,如何抑制无用信息的膨胀? [英] How do I suppress the bloat of useless information when using the DUMP command while using grunt via 'pig -x local'?
问题描述
我正在使用 PigLatin 工作,使用 grunt,每次我转储"东西时,我的控制台都会被废话、废话、非信息所破坏,有没有办法压制这一切?
<前>grunt> A = LOAD 'testingData' USING PigStorage(':');转储 A;2013-05-06 19:42:04,146 [main] INFO org.apache.pig.tools.pigstats.ScriptState - 脚本中使用的 Pig 功能:未知
2013-05-06 19:42:04,147 [main] INFO
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - 文件连接阈值:100 乐观?错误的...
...
--- 这里还有 50 行无用的上下文破坏垃圾......直到---...
...
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 成功!
现在我想查找 4 行信息:
<前>(守护进程,*,1,1,系统服务,/var/root,/usr/bin/false)(uucp,*,,,/var/spool/uucp,/usr/sbin/uucico)(taskgated,*,13,13,Task Gate Daemon,/var/empty,/usr/bin/false)(networkd,*,24,24,网络服务,/var/empty,/usr/bin/false)(安装助手,*,25,25,/usr/bin/false)咕噜声>
---> 显然,如果它出错,很好的大量信息很有帮助,但当它基本上工作得很好时就不行了.
您需要设置 log4j 属性.例如:
$PIG_HOME/conf/pig.properties :使能够:# log4jconf=./conf/log4j.properties重命名:log4j.properties.template ->log4j.propertieslog4j.properties :将信息设置为错误:log4j.logger.org.apache.pig=信息,A
您也可以设置与 Hadoop 相关的日志级别:
log4j.logger.org.apache.hadoop = 错误,A
I'm working with PigLatin, using grunt, and every time I 'dump' stuffs, my console gets clobbered with blah blah, blah non-info, is there a way to surpress all that?
grunt> A = LOAD 'testingData' USING PigStorage(':'); dump A;
2013-05-06 19:42:04,146 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: UNKNOWN
2013-05-06 19:42:04,147 [main] INFO
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
...
...
--- another like 50 lines of useless context clobbering junk here... till ---
...
...
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!
now my like 4 lines of info looking for:
(daemon,*,1,1,System Services,/var/root,/usr/bin/false) (uucp,*,,,/var/spool/uucp,/usr/sbin/uucico) (taskgated,*,13,13,Task Gate Daemon,/var/empty,/usr/bin/false) (networkd,*,24,24,Network Services,/var/empty,/usr/bin/false) (installassistant,*,25,25,/usr/bin/false)
grunt>
---> obviously if it errors, fine lotsa info helpful, but not when it basically works great.
You need to set the log4j properties. For example:
$PIG_HOME/conf/pig.properties :
enable:
# log4jconf=./conf/log4j.properties
rename: log4j.properties.template -> log4j.properties
log4j.properties :
set info to error:
log4j.logger.org.apache.pig=info, A
You may also set the Hadoop related logging level as well:
log4j.logger.org.apache.hadoop = error, A
这篇关于在通过“pig -x local"使用 grunt 的同时使用 DUMP 命令时,如何抑制无用信息的膨胀?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!