如何添加SerDe jar [英] How to add SerDe jar
问题描述
hiveserde-1.0.jar中的serder类 myserde.TestDeserializer
在命令行中,我使用以下命令添加jar文件:
添加JAR hiveserde-1.0.jar
然后我创建一个表,文件加载成功。
但现在我想运行它并通过使用mysql jdbc在客户端上创建一个表。
错误是:
SerDe:myserde.TestDeserializer不存在。
如何运行它?谢谢
解决方案所以,有几个选项。在所有这些jar中,需要在安装了Hive的群集上存在该jar。当然,JDBC客户端代码可以在集群内部或外部的任何地方运行。
选项1:发出HQL查询在运行任何其他HQL命令之前:
添加JAR hiveserde-1.0.jar
选项2:您可以更新您的hive-site.xml以使
hive.aux.jars.path
属性设置为jar的完整路径hiveserde-1.0.jar
I use Hive to create table store sequencefile. Row format is serder class myserde.TestDeserializer
in hiveserde-1.0.jar
In the command line I use this command to add the jar file:
hive ADD JAR hiveserde-1.0.jar
Then I create a table, the file loads successfully.
But now I want to run it and create a table on the client by using mysql jdbc.
The error is :
SerDe: myserde.TestDeserializer does not exist.
How to run it ? Thanks
解决方案 So, there are a few options. In all of them the jar needs to be present on your cluster with Hive installed. The JDBC client code, of course, can be run from anywhere within or outside of the cluster.
Option 1: You issue a HQL query before you run any of your other HQL commands:
ADD JAR hiveserde-1.0.jar
Option 2: You can update your hive-site.xml to have the
hive.aux.jars.path
property set to the complete path to your jar hiveserde-1.0.jar
这篇关于如何添加SerDe jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!