在PIG UDF中调试 [英] Debugging in PIG UDF

查看:111
本文介绍了在PIG UDF中调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Hadoop / PIG的新手。
我有一个基本问题。

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

我们在PIG UDF中有日志工具吗?我写了一个UDF,我需要验证
我需要记录某些语句来检查流。是否有可用的日志记录工具?如果是,猪日志在哪里?

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?

推荐答案

假设您的UDF扩展 EvalFunc ,可以使用从返回的记录器 EvalFunc.getLogger() 。日志输出应该在执行相关的Map / Reduce任务中可见(如果作业在多个阶段中执行,那么您必须通过它们来找到关联的日志条目)。

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).

这篇关于在PIG UDF中调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆