apache pig - Pig Batch mode: how to set logging level to hide INFO log messages? -


using apache pig version 0.10.1.21 (rexported). when execute pig script, there lots of info logging lines looks that:

2013-05-18 14:30:12,810 [thread-28] info  org.apache.hadoop.mapred.task - task 'attempt_local_0005_r_000000_0' done. 2013-05-18 14:30:18,064 [main] warn  org.apache.pig.tools.pigstats.pigstatsutil - failed runningjob job job_local_0005 2013-05-18 14:30:18,094 [thread-31] warn  org.apache.hadoop.mapred.jobclient - no job jar file set.  user classes may not found. see jobconf(class) or jobconf#setjar(string). 2013-05-18 14:30:18,114 [thread-31] info  org.apache.hadoop.mapreduce.lib.input.fileinputformat - total input paths process : 1 2013-05-18 14:30:18,254 [thread-32] info  org.apache.hadoop.mapred.task -  using resourcecalculatorplugin : org.apache.hadoop.util.linuxresourcecalculatorplugin@3fcb2dd1 2013-05-18 14:30:18,265 [thread-32] info  org.apache.hadoop.mapred.maptask - io.sort.mb = 10 

is there set command within pig script or command line flag allow logging level? hide [thread-xx] info messages. showing warning , error. have tried command line debug flag. unfortunately, info messages still show up:

pig -x local -d warn myscript.pig 

hope there solution. in advance help.

solved: answer by loran bendig, set log4j.properties. summarized here convenience

step1: copy log4j config file folder pig scripts located.

cp /etc/pig/conf.dist/log4j.properties log4j_warn 

step2: edit log4j_warn file , make sure these 2 lines present

log4j.logger.org.apache.pig=warn, log4j.logger.org.apache.hadoop = warn, 

step3: run pig script , instruct use custom log4j

pig -x local -4 log4j_warn myscript.pig 

another setting this:

create file named nolog.conf, following content

log4j.rootlogger=fatal 

and run pig follows

pig -x local -4 nolog.conf 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -