Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为一个文件添加 mapDB 以供猪 UDF 中的所有映射器使用。如何一次性设置此 mapDB 对象?当 pig udf 被实例化时,我们是否有任何函数只会被调用一次?
谢谢。
在 pig 中,必须扩展 EVALFUNC 才能为记录的每一行调用 udf。
扩展 evalfunc 的类可以通过在 pig-script 的开头定义它来实例化。
定义 ex_arg my.udfs.Extract('true');
这会导致类的实例化。