简体   繁体   English

从HUE使用JAR

[英]Using JAR from HUE

I have jar file that get IP as param and return csv: 我有将IP作为参数并返回csv的jar文件:

Country,Organization

Ie myjar.jar 8.8.8.8 will return myjar.jar 8.8.8.8将返回

Country,Organization
United States,Google

I have Hadoop table with IP address, I want to call to my JAR with IP from my table and to get the results from my JAR, Is is possible? 我有具有IP地址的Hadoop表,我想从表中使用IP调用我的JAR,并从我的JAR中获取结果,可以吗?

I'm using HUE with Hive/Impala editor and did: 我正在将HUE与Hive / Impala编辑器结合使用,并做到了:

add jar HDFS:///PATH/TO/MY/JAR.JAR

And now I don't know how to use my jar 现在我不知道如何使用我的罐子

Any suggestions? 有什么建议么?

You need to say which class within the JAR to use by defining a function. 您需要通过定义函数来说明要在JAR中使用哪个类。

CREATE TEMPORARY FUNCTION name AS 'com.example.full.class.name'

Then use name() as a SQL function 然后使用name()作为SQL函数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM