关于Hive调用Java类的方法,Hive的官方描述如下:
ReflectUDF
Reflect (Generic) UDF:
必须是静态方法
A Java class and method often exists to handle the exact function a user would like to use in Hive. Rather than having to write a wrapper UDF to call this method, the majority of these methods can be called using reflect UDF. Reflect uses Java reflection to instantiate and call methods of objects; it can also call static functions. The method must return a primitive type or a type that Hive knows how to serialize.