Reply
Champion Alumni
Posts: 196
Registered: ‎11-18-2014

Adding logs in PIG java UDF

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
Champion Alumni
Posts: 196
Registered: ‎11-18-2014

Re: Adding logs in PIG java UDF

[ Edited ]

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
Announcements