本文共 1019 字,大约阅读时间需要 3 分钟。
// 1. 继承udf// 2. 实现evaluate方法import org.apache.hadoop.hive.ql.exec.UDF;import org.apache.hadoop.io.Text;public class UDFTest extents UDF { public Text evaluate(Text input){ return new Text("hello:" + input.toString()); }}
2.6.0 1.1.0 org.apache.hadoop hadoop-common ${hadoop.version} org.apache.hive hive-exec ${hive.version} junit junit 4.12
function | 用法 |
---|---|
UDF | |
genericUDF | |
UDAF | 多进一出 |
UDTF | 一进多出 |
https://blog.csdn.net/Gavin_chun/article/details/78169317
https://blog.csdn.net/qq_34319644/article/details/95668820