hive 安装、知识点
- hive 查询语句:
语句 | 含义 |
---|---|
show database; 或 show schemas; | 查看数据库 |
show tables; | hive显示所有表 |
set; | 查看hive配置信息 |
- 问题:load data local 后,表中字段值全是NULL
解决:创建表时,如果有如下语句:
FIELDS TERMINATED BY ‘\t’
LINES TERMINATED BY ‘\n’
将本地文件中的各字段用tab分割下,再导入后正常。
- hive 启动命令:
命令 | 含义 |
---|---|
schematool -initSchema -dbType derby | 创建schema(运行hive命令之前,需要先创建schema,再启动Metastore) |
hive --service metastore & | 启动Hive的Metastore Server服务进程(运行hive命令之前,需要先创建schema,再启动Metastore) |
- 运行hive查询之前,需要先:
- 创建schema(命令:schematool -initSchema -dbType derby)
- 启动Hive的Metastore Server服务进程(命令:hive --service metastore &)
- hive 安装
- hive 安装报错:
Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
解决:
1.查看hive-site.xml配置,会看到配置值含有"system:java.io.tmpdir"的配置项
2.新建文件夹/usr/local/hive/tmpdir
3.将所有的字符串:${system:java.io.tmpdir},修改为如上地址
启动hive,成功! - 报错:Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
原因:因为没有正常启动Hive 的 Metastore Server服务进程。
解决方法:启动Hive 的 Metastore Server服务进程,执行如下shell命令:
hive --service metastore &
报错:MetaException(message:Version information not found in metastore. )
解决:在hive-site.xml文件中,将hive.metastore.schema.verification设置成false就可以了。运行:schematool -initSchema -dbType derby,报错:Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)
原因:这可能是因为你的metastore_db文件夹已经存在;
解决:将metastore_db更名为:metastore_db.tmp(命令:mv metastore_db metastore_db.tmp),再次执行上面的命令,成功。Hive的架构:
Hive 和Hadoop之间的工作流程:
报错:hive insert 插入数据报错:
待解决。
一个答案(不知是否正确,待研究):http://blog.csdn.net/sparkexpert/article/details/51158575出处:http://www.yiibai.com/hive/hive_installation.html#article-start
hive 安装、知识点的更多相关文章
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- hive安装--设置mysql为远端metastore
作业任务:安装Hive,有条件的同学可考虑用mysql作为元数据库安装(有一定难度,可以获得老师极度赞赏),安装完成后做简单SQL操作测试.将安装过程和最后测试成功的界面抓图提交 . 已有的当前虚拟机 ...
- Hive安装与部署集成mysql
前提条件: 1.一台配置好hadoop环境的虚拟机.hadoop环境搭建教程:稍后补充 2.存在hadoop账户.不存在的可以新建hadoop账户安装配置hadoop. 安装教程: 一.Mysql安装 ...
- 【转】 hive安装配置及遇到的问题解决
原文来自: http://blog.csdn.net/songchunhong/article/details/51423823 1.下载Hive安装包apache-hive-1.2.1-bin.ta ...
- Hadoop之hive安装过程以及运行常见问题
Hive简介 1.数据仓库工具 2.支持一种与Sql类似的语言HiveQL 3.可以看成是从Sql到MapReduce的映射器 4.提供shall.Jdbc/odbc.Thrift.Web等接口 Hi ...
- Hive安装与配置详解
既然是详解,那么我们就不能只知道怎么安装hive了,下面从hive的基本说起,如果你了解了,那么请直接移步安装与配置 hive是什么 hive安装和配置 hive的测试 hive 这里简单说明一下,好 ...
- Hive中知识点
hive的最新学习资料:http://www.cnblogs.com/qingyunzong/p/8707885.html hive的参数设置大全:https://cwiki.apache.org/c ...
- hive安装详解
1.安装MYSQL simon@simon-Lenovo-G400:~$ sudo apt-get install mysql-server simon@simon-Lenovo-G400:~$ su ...
- macbook hive安装
1 原材料 1.1 已经安装好的伪分布式hadoop,版本2.8.3(参见链接https://www.cnblogs.com/wooluwalker/p/9128859.html) 1.2 apach ...
随机推荐
- ccf窗口
#include<iostream> #include<cstring> #include<algorithm> #include<vector> us ...
- C++中的赋值运算符重载函数(operator=)
MyStr& operator =(const MyStr& str)//赋值运算符 { cout << "operator =" << e ...
- windows下进程与线程剖析
进程与线程的解析 进程:一个正在运行的程序的实例,由两部分组成: 1.一个内核对象,操作系统用它来管理进程.内核对象也是系统保存进程统计信息的地方. 2.一个地址空间,其中包含所有可执行文件或DLL模 ...
- win10激活工具---KMSAutoNet
win10激活工具---KMSAutoNet 1> 2> 3> 4> 5> 6> 8>
- oracle11g中SQL优化(SQL TUNING)新特性之Adaptive Cursor Sharing (ACS)
1. ACS简介 Oracle Database 11g提供了Adaptive Cursor Sharing (ACS)功能,以克服以往不该共享的游标被共享的可能性.ACS使用两个新指标:sens ...
- js获取当前点击元素的索引
以ul下的li元素为例:获取li的索引,代码如下: <ul id="list"> <li></li> <li></li> ...
- pthread_cleanup_push与pthread_cleanup_pop与pthread_cancel与pthread_testcancel
参考: http://blog.csdn.net/zjc156m/article/details/9021343 http://blog.csdn.net/u010027547/article/det ...
- Elasticsearch在centos6中的安装
一安装, 在你可以从 elasticsearch.org\/download 下载最新版本的Elasticsearch.tar文件. 一.用户设置 如果已经是普通用户登录可跳过此步骤. Elastic ...
- scrapy-redis(七):部署scrapy
一般我们写好scrapy爬虫,如果需要启动的话,需要进入scrapy项目的根目录,然后运行以下命令: scrapy crawl {spidername} 这样我们就可以在终端查看到爬虫信息了.但爬虫运 ...
- Syntax error on token(s), misplaced construct(s)
Syntax error on token(s), misplaced construct(s)