
hive
文章平均质量分 79
JavaShooter
Hello,everybody.
人生短暂,做自己,去成就!
展开
-
hive自定义函数注意异常捕获
在hive sql中如果有自定义的函数,注意捕获异常,否则hiveserver进程会被干掉。原创 2012-10-10 12:54:51 · 2106 阅读 · 0 评论 -
hive java.io.IOException: Cannot initialize Cluster
环境:cdh4,hive-0.10问题:启动hive,报 java.io.IOException: Cannot initialize Cluster,Please check your configuration for mapreduce.framework.name and the correspond server addresses.解决:修改$HIVE_HOME/conf/hi原创 2013-11-12 15:54:52 · 4453 阅读 · 0 评论 -
hive lzo 乱码问题
测试集群配置lzo,无问题。生产环境上通过hive查询数据时,出现乱码(多出几行),应该是在解压时出现了其它的字符,通过lzop解压无问题。解决方案:待....原创 2013-10-11 10:03:42 · 2100 阅读 · 1 评论 -
hive-0.11错误
安装hive-0.11,执行ql,报如下错误:2013-08-09 10:23:08,854 ERROR metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(134)) - NoSuchObjectException(message:partition values=[2013-08-03]) at org原创 2013-08-09 10:27:10 · 2722 阅读 · 1 评论 -
编译hive错误
编译hive时,出现了以下异常: You probably access the destination server through a proxy server that is not well configured!原因:可能是网络配置原因,无法访问目标网站,解决方法:待定!!!原创 2013-07-25 17:29:37 · 3173 阅读 · 5 评论 -
FAILED: Error in semantic analysis: No matching method for class org.apache.hadoop.hive.ql.udf.GetEx
hive 自定义UDAF报FAILED: Error in semantic analysis: No matching method for class org.apache.hadoop.hive.ql.udf.GetExitPageUDAF with (string, string, bigint). Possible choices:写了很多udf,udaf,居然遇到这样的原创 2013-07-24 11:33:53 · 11053 阅读 · 1 评论 -
java.sql.SQLException: Field 'IS_STOREDASSUBDIRECTORIES' doesn't have a default value
今天在添加表分区遇到如下的异常:ALTER TABLE s_search_log ADD IF NOT EXISTS PARTITION (day_id =20130428, PLAT_TYPE=3) LOCATION '/data/stg/s_search_log/20130428/3/';异常:FAILED: Error in metadata: javax.jdo.JDODa原创 2013-04-29 11:32:16 · 2514 阅读 · 1 评论 -
hive表乱码问题
1.导入到hdfs的文件是gbk编码2.创建hive的外表部,引用gbk编码文件.hive数据utf-8编码。3.cli查询出中文为乱码由于数据入hive表中已为乱码,此时再进行转码已无效。原创 2013-04-10 09:58:42 · 4325 阅读 · 0 评论 -
hive Timestamp类型慎用
java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Error evaluating regexp_replace(_col3, ':| |-', '') at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java原创 2013-01-10 08:52:42 · 11125 阅读 · 1 评论 -
hive reduce任务太多问题
最近有几个处理大数据的计算,占用reduce为999,直接占满slot,导致其它任务无法够取资源。现在尝试修改 hive.exec.reducers.max 27 max number of reducers will be used. If the one specified in the c原创 2012-12-19 09:28:49 · 873 阅读 · 0 评论 -
hive sort by|order by
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SortBy原创 2012-12-27 10:18:22 · 703 阅读 · 0 评论 -
hive left outer join on注意点
注意:A left outer join B on (..),如果A表中有日期分区,要将日期条件放到where中,B表中的日期分区放到on条件中。昨天将两个表中日期分区都放到on中,出现错误结果。原创 2012-12-25 13:05:13 · 986 阅读 · 0 评论 -
hive MapJoin优化
https://cwiki.apache.org/confluence/display/Hive/MapJoinOptimization不错!原创 2012-11-16 12:03:00 · 702 阅读 · 0 评论 -
hivesql错误1:java.lang.Throwable: Child Error, status:255
java.lang.Throwable: Child Error at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)Caused by: java.io.IOException: Task process exit with nonzero status of 255. at org.apache.hadoop.ma原创 2012-10-27 18:26:14 · 2260 阅读 · 2 评论 -
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
执行hsql :select user_id, prod_id, size(sw_prod) as item_cntfrom i_order_prod_log lateral view explode(sw_prod) prodTable as prod_id;发生下面的错误:java.lang.RuntimeException: org.apache.hadoop.h原创 2012-10-17 17:07:57 · 8847 阅读 · 0 评论 -
写hive RowNumUDF注意点
写了一个hive的UDF函数 rownum,用于记录行号,后发现一个问题,就是rownum有重复。原因在于产生的多个map都会调用rownum,解决的方法要求你的hive sql中必须有sort by,不过这也意味着数据是在单内机器上排序。原创 2012-10-10 09:09:34 · 1797 阅读 · 0 评论 -
Missing Hive Builtins Jar: /data/hive-0.11.0/lib/hive-builtins-*.jar
问题:编译hive-0.11,执行hive报这个错,发现$HIVE_HOME/lib下面没有hive-builtins-*.jar。待解:原创 2013-11-09 10:24:11 · 1627 阅读 · 0 评论