Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Adding logs in PIG java UDF

Adding logs in PIG java UDF

Champion Alumni

Hello,

 

I need to add some logs in a PIG java UDF that extends StoreFunc. 

I tried several solutions, however, I cannot manage to find my logs...

 

I tried:

  • System.out.println
  • System.err.println
  • log4j
  • StoreFunc function warn (super.warn(message,enum))

 

I cannot manage to find my logs. 

 

I searched: 

- hue: from the workflow --> clik on logs ---> click on stdout/stderr/syslog

- hue: from the workflow --> clik on logs ---> click on JOB number --> task --> attempt --> logs

- hue: from the workflow --> clik on logs ---> click on task --> attmpt --> logs

- hue: http://<hue ip>:8888/jobbrowser/jobs/job_1453187760999_0102/single_logs

- in HDFS: /tmp/logs/agherman/logs/application_1453187760999_0102

- on hadoop interface --> Finished Applications --> application_1453187760999_0102 -->logs 

- on hadoop interface --> Finished Applications --> application_1453187760999_0102 --> History -->logs 

 

 

Where should I search for my logs?

 

Thank you!

 

GHERMAN Alina
1 REPLY 1
Highlighted

Re: Adding logs in PIG java UDF

Champion Alumni

I also tried with no succes:

  • throw WrappedIOException.wrap("my string", new Exception());
  • warn("my string",PigWarning.UDF_WARNING_1)

 

However, I find my System.err.println logs when I run my script in the pigEditor and not in a job with oozie..(?)

GHERMAN Alina