0

我正在尝试在我的 Pig UDF 中使用 warn() 方法,如下所示:

public class MyUDF extends EvalFunc<Tuple> {

    public Tuple exec(Tuple input) throws IOException {

        boolean condition = true;         
        while(condition) {
            // Some business logic
            warn("There was a problem", PigWarning.UDF_WARNING_1);
        }
    }

}

当我在本地使用此 UDF 运行我的 pig 脚本时,我从未在作业结束时看到这些警告聚集。

如何配置 pig 以查看聚合警告?

4

1 回答 1

0

So I figured out that in local mode, you'll never see aggregated warnings. You need to be in MapReduce mode to see them!

于 2013-04-14T19:48:25.323 回答