{"id":2082,"date":"2022-08-30T15:21:54","date_gmt":"2022-08-30T15:21:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/25\/how-do-i-suppress-the-bloat-of-useless-information-when-using-the-dump-command-while-using-grunt-via-pig-x-local-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:21:54","modified_gmt":"2022-08-30T15:21:54","slug":"how-do-i-suppress-the-bloat-of-useless-information-when-using-the-dump-command-while-using-grunt-via-pig-x-local-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/how-do-i-suppress-the-bloat-of-useless-information-when-using-the-dump-command-while-using-grunt-via-pig-x-local-collection-of-common-programming-errors\/","title":{"rendered":"How do I suppress the bloat of useless information when using the DUMP command while using grunt via &#39;pig -x local&#39;?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m working with PigLatin, using grunt, and every time I &#8216;dump&#8217; stuffs, my console gets clobbered with blah blah, blah non-info, is there a way to surpress all that?<\/p>\n<pre>\ngrunt&gt; A = LOAD 'testingData' USING PigStorage(':'); dump A; <br \/>\n<\/pre>\n<p><em>2013-05-06 19:42:04,146 [main] INFO org.apache.pig.tools.pigstats.ScriptState &#8211; Pig features used in the script: UNKNOWN 2013-05-06 19:42:04,147 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler &#8211; File concatenation threshold: 100 optimistic? false &#8230; &#8230;<\/em><\/p>\n<p><em><strong>&#8212; another like 50 lines of useless context clobbering junk here&#8230; till &#8212;<\/strong> &#8230;<\/em><\/p>\n<p><em>&#8230;<\/em><\/p>\n<p><em>org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher &#8211; Success!<\/em><\/p>\n<p><strong>now my like 4 lines of info looking for:<\/strong><\/p>\n<pre>\n(daemon,*,1,1,System Services,\/var\/root,\/usr\/bin\/false)\n(uucp,*,,,\/var\/spool\/uucp,\/usr\/sbin\/uucico)\n(taskgated,*,13,13,Task Gate Daemon,\/var\/empty,\/usr\/bin\/false)\n(networkd,*,24,24,Network Services,\/var\/empty,\/usr\/bin\/false)\n(installassistant,*,25,25,\/usr\/bin\/false)<br \/>\ngrunt&gt;                                                                                       \n<\/pre>\n<p>&#8212;&gt; obviously if it errors, fine lotsa info helpful, but not when it basically works great.<\/p>\n<ol>\n<li>\n<p>You need to set the log4j properties. For example:<\/p>\n<pre><code>$PIG_HOME\/conf\/pig.properties :\nenable:\n# log4jconf=.\/conf\/log4j.properties\n\nrename: log4j.properties.template -&gt; log4j.properties\n\nlog4j.properties :\nset info to error:\nlog4j.logger.org.apache.pig=info, A\n<\/code><\/pre>\n<p>You may also set the Hadoop related logging level as well:<\/p>\n<pre><code>log4j.logger.org.apache.hadoop = error, A\n<\/code><\/pre>\n<\/li>\n<li>\n<p>When you start pig, pass it a log4j.properties file with <code>pig -4<\/code> .<\/p>\n<p>In my case there was a log4j.properties in the <code>conf<\/code> directory and setting the level of the logger named <code>org.apache.pig<\/code> to <code>ERROR<\/code> is sufficient to make the logger less verbose.<\/p>\n<pre><code>log4j.logger.org.apache.pig=ERROR, A\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-12-25 10:55:14. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working with PigLatin, using grunt, and every time I &#8216;dump&#8217; stuffs, my console gets clobbered with blah blah, blah non-info, is there a way to surpress all that? grunt&gt; A = LOAD &#8216;testingData&#8217; USING PigStorage(&#8216;:&#8217;); dump A; 2013-05-06 19:42:04,146 [main] INFO org.apache.pig.tools.pigstats.ScriptState &#8211; Pig features used in the script: UNKNOWN 2013-05-06 19:42:04,147 [main] INFO [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2082","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2082"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2082\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}