Support Questions

Find answers, ask questions, and share your expertise

I have created simple Pig UDF in java on Hortonworks Sandbox and trying to log the message.It's not showing any log messages in stdout.

New Contributor

public class TestUdf extends EvalFunc<String>{

@Override public String exec(Tuple input) throws IOException

{"My message*********************");

String inputData = (String)input.get(0);

return inputData;



Please check my pig log Properties file in screenshot which is being used by my pig script as shown below.

REGISTER hdfs:///user/maria_dev/test.jar;
aa = LOAD 'mydoc' USING PigStorage('\t') as (email: chararray) ;
finaloutput =FOREACH aa GENERATE  test.TestUdf(email)  as email;
dump finaloutput;



Seems like you are adding these properties directly in the pig properties. Have you tried configuring the actual file that pig uses (I believe under /etc/pig/conf)?

New Contributor

I am adding pig from ambari gui .Thanks

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.