随笔分类 - Hive
摘要:http://hive.apache.org/ The Apache Hive ™ data warehouse software facilitates reading, writing, and managing large datasets residing in distributed st
阅读全文
摘要:hive-site.xml 1 接入ldap或ad域 <property> <name>hive.server2.authentication</name> <value>LDAP</value> </property> <property> <name>hive.server2.authentic
阅读全文
摘要:背景 2个节点分别升级spark版本,从2.4升级到3.1,升级后一个节点执行spark-sql正常,另一个节点执行报错,报错信息如下: spark-sql> select * from $table where dt = '$dt' limit 5; Error in query: org.apa
阅读全文
摘要:背景 hive读取纯文本数据,无论是:原始格式、gzip、bzip,都可以自动识别,不需要修改建表语句或修改setting。 但是使用gobblin开启gzip压缩之后保存文件使用hive读取发生乱码。 定位 首先怀疑是文件损坏 gobblin开启压缩之后写的文件为:*.txt.gzip,将该文件下
阅读全文
摘要:假如hive中table或者partition的location错误或者丢失,需要批量修复,可以参考如下步骤: 修复table的location hdfs dfs -ls /data/hive/warehouse/$db | awk '{print $8}' |sed '1d' | awk -F '
阅读全文
摘要:背景 在hive sql中执行添加临时udf的操作 add jar hdfs:///user/hive/lib/tools-1.0.jar; create temporary function decode as 'com.test.etl.Decoder'; 在定时任务重偶尔会报错,报错比较随机,
阅读全文
摘要:使用easyexcel实现excel导出功能,有时会报错 com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cgl
阅读全文
摘要:parquet文件中的时间字段,在hive和spark-sql中读取正常,在impala中读取会偏移8个小时(少),经测试结果如下: 一 不修改impala配置 1 由spark或hive写入parquet spark和hive读取正常 impala读取偏移8小时(少),需要手工偏移 from_un
阅读全文
摘要:首先要有HIVE_HOME环境变量, 如果是apache,直接配置为解压目录;如果是CDH,设置如下: # export HIVE_HOME=/opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/lib/hive 执行导入 # bin/import-hi
阅读全文
摘要:hive和mysql数据互导,首先想到的是sqoop,并且可以和调度框架(比如oozie等)配合配置定时任务,还有一种更简单的方式是通过spark-sql: CREATE OR REPLACE TEMPORARY VIEW tmp_tbl_test USING org.apache.spark.sq
阅读全文
摘要:spark 2.4 spark sql中执行 set hive.exec.max.dynamic.partitions=10000; 后再执行sql依然会报错: org.apache.hadoop.hive.ql.metadata.HiveException: Number of dynamic p
阅读全文
摘要:Hive或spark中执行sql字符常量包含;时会报错,比如 select instr('abc;abc', ';'); 报错 NoViableAltException(-1@[147:1: selectExpression : ( expression | tableAllColumns );])
阅读全文
摘要:spark 2.4.3 spark读取hive表,步骤: 1)hive-site.xml hive-site.xml放到$SPARK_HOME/conf下 2)enableHiveSupport SparkSession.builder.enableHiveSupport().getOrCreate
阅读全文
摘要:从impala中创建kudu表之后,如果想从hive或spark sql直接读取,会报错: Caused by: java.lang.ClassNotFoundException: com.cloudera.kudu.hive.KuduStorageHandler at java.net.URLCl
阅读全文
摘要:hive2.3.4 presto0.215 使用hive2.3.4的beeline连接presto报错 $ beeline -d com.facebook.presto.jdbc.PrestoDriver -u "jdbc:presto://localhost:8080/hive" Error: U
阅读全文
摘要:1 compress & mr hive默认的execution engine是mr hive> set hive.execution.engine;hive.execution.engine=mr 所以针对mr的优化就是hive的优化,比如压缩和临时目录 mapred-site.xml <prop
阅读全文
摘要:beeline连接hiveserver2报错 Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Failed to open new session: java.lang.Runti
阅读全文
摘要:tpc 官方:http://www.tpc.org/ 一 简介 The TPC is a non-profit corporation founded to define transaction processing and database benchmarks and to disseminat
阅读全文
摘要:hive 2.3.4 on spark 2.4.0 Hive on Spark provides Hive with the ability to utilize Apache Spark as its execution engine. set hive.execution.engine=spar
阅读全文
摘要:1 hive # kadmin.local -q 'ktadd -k /tmp/hive3.keytab -norandkey hive/server03@TEST.COM'# kinit -kt /tmp/hive3.keytab hive/server03@TEST.COM# klist # b
阅读全文