随笔分类 - Hive
摘要:建表语句 CREATE EXTERNAL TABLE `my_lzo_table`(`something` string)ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS INPUTFORMAT 'com.hadoop.mapred.D
阅读全文
摘要:在hive中查看表结构时中文注释乱码,分为两种情况,一种是desc $table,一种是show create table $table 1 数据库字符集 检查 mysql> show variables like '%char%';mysql> show create table COLUMNS_
阅读全文
摘要:hive建表后直接将数据文件拷贝到table目录下,select * 可以查到数据,但是select count(1) 一直返回0,这个是因为hive中有个配置 hive.stats.autogather=true Enables automated gathering of table-level
阅读全文
摘要:hadoop部署参考:https://www.cnblogs.com/barneywill/p/10428098.html 1 拷贝到所有服务器上并解压 # ansible all-servers -m copy -a 'src=/src/path/to/apache-hive-2.3.4-bin.
阅读全文
摘要:CM金丝雀Canary报错 1 HDFS 金丝雀Canary 测试无法为 /tmp/.cloudera_health_monitoring_canary_files 创建父目录。 2 Hive Metastore CanaryHive Metastore canary 创建 hue hdfs 主目录
阅读全文
摘要:hive metastore在建表时报错 [pool-5-thread-2]: MetaException(message:Got exception: java.net.ConnectException Call From server2 to server1:8020 failed on con
阅读全文
摘要:cdh5.16.1使用的hive版本是hive-1.1.0+cdh5.16.1+1431,详见:https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_vd_cdh_package_tarball_516.
阅读全文
摘要:hive通过外部表读写elasticsearch数据,和读写hbase数据差不多,差别是需要下载elasticsearch-hadoop-hive-6.6.2.jar,然后使用其中的EsStorageHandler; Connect the massive data storage and deep
阅读全文
摘要:在hive中创建外部表: CREATE EXTERNAL TABLE hive_hbase_table(key string, name string,desc string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
阅读全文
摘要:hive及其他组件(比如spark、impala等)都会依赖hive metastore,依赖的配置文件位于hive-site.xml hive metastore重要配置 hive.metastore.warehouse.dirhive2及之前版本默认为/user/hive/warehouse/,
阅读全文
摘要:Hive SQL解析过程 SQL->AST(Abstract Syntax Tree)->Task(MapRedTask,FetchTask)->QueryPlan(Task集合)->Job(Yarn) SQL解析会在两个地方进行: 一个是SQL执行前compile,具体在Driver.compil
阅读全文
摘要:一 问题 在hive1.2中使用hive或者beeline执行sql都有进度信息,但是升级到hive2.0以后,只有hive执行sql还有进度信息,beeline执行sql完全silence,在等待结果的过程中完全不知道执行到哪了 1 hive执行sql过程(有进度信息) hive> select
阅读全文
摘要:hive 2.1 一 问题 最近有一个场景,要向一个表的多个分区写数据,为了缩短执行时间,采用并发的方式,多个sql同时执行,分别写不同的分区,同时开启动态分区: set hive.exec.dynamic.partition=true insert overwrite table test_tab
阅读全文
摘要:hive 2.1 hive执行sql有两种方式: 执行hive命令,又细分为hive -e,hive -f,hive交互式; 执行beeline命令,beeline会连接远程thrift server; 下面分别看这些场景下sql是怎样被执行的: 1 hive命令 启动命令 启动hive客户端命令
阅读全文
摘要:最近把一些sql执行从hive改到spark,发现执行更慢,sql主要是一些insert overwrite操作,从执行计划看到,用到InsertIntoHiveTable spark-sql> explain insert overwrite table test2 select * from t
阅读全文
摘要:spark查orc格式的数据有时会报这个错 Caused by: java.lang.NullPointerException at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat$BISplitStrategy.getSplits(OrcInputF
阅读全文
摘要:spark 2.1.1 spark在写数据到hive外部表(底层数据在hbase中)时会报错 Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.hbase.HiveHBaseTableOutputFormat cannot
阅读全文
摘要:spark 2.1.1 一 启动命令 启动spark thrift命令 $SPARK_HOME/sbin/start-thriftserver.sh 然后会执行 org.apache.spark.deploy.SparkSubmit --class org.apache.spark.sql.hive
阅读全文
摘要:问题现象:hive执行sql报错 select count(*) from test_hive_table; 报错 Error: java.io.IOException: org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed
阅读全文
摘要:问题 Drill最新版本是1.14,从1.13开始Drill支持hive的版本升级到2.3.2,详见1.13的release notes The Hive client for Drill is updated to version 2.3.2. With the update, Drill sup
阅读全文