当通过'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> A = LOAD'testingData'使用PigStorage(':');转储A;
2013-05-06 19:42:04,146 [main] INFO org.apache.pig.tools。 pigstats.ScriptState - 脚本中使用的Pig特征:UNKNOWN
2013-05-06 19:42:04,147 [main] INFO
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer。 MRCompiler - 文件连接阈值:100乐观?假
...
...
---另一个像50行无用的上下文破坏垃圾......直到--- strong>
...
...
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 成功! p>
现在我喜欢4行信息寻找:
(守护进程,*,1,1,系统服务,/ var / root,/ usr / bin / false)
(uucp,* ,,, / var / spool / uucp,/ usr / sbin / uucico )
(taskgated,*,13,13,任务门守护进程,/ var / empty,/ usr / bin / false)
(networkd,*,24,24,Network Services,/ var / empty ,/ usr / bin / false)
(installassistant,*,25,25,/ usr / bin / false)
grunt>
--->很明显,如果它出现错误,很好的信息很有帮助,但不是当它基本上工作的很好。
您需要设置log4j属性。
例如:
$ PIG_HOME / conf / pig.properties:
启用:
#log4jconf = ./conf/log4j.properties
rename:log4j.properties.template - > log4j.properties
log4j.properties:
将信息设置为错误:
log4j.logger.org.apache.pig = info,A
$ c $您也可以设置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屋!