Uno
Uno

Reputation: 543

Debugging in PIG UDF

I am new to Hadoop/PIG. I have a basic question.

Do we have a Logging facility in PIG UDF? I have written a UDF which I need to verify I need to log certain statements to check the flow. Is there a Logging facility available? If yes where are the Pig logs present?

Upvotes: 7

Views: 6945

Answers (2)

ihadanny
ihadanny

Reputation: 4483

perhaps obvious, but I advise debugging your UDF in local mode before deploying on a cluster/pseudocluster. This way, you can debug it right inside your IDE (eclipse in my case) which is easier than log-debugging.

Upvotes: 2

Chris White
Chris White

Reputation: 30089

Assuming your UDF extends EvalFunc, you can use the Logger returned from EvalFunc.getLogger(). The log output should be visible in the associated Map / Reduce task that pig executes (if the job executes in more than a single stage then you'll have to pick through them to find the associated log entries).

Upvotes: 6

Related Questions