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 ...
随机推荐
- OAF在打开的新页面中添加按钮,功能是关闭当前页面
OAF在打开的新页面中添加按钮,功能是关闭当前页面 javascript:close()
- 37. Sudoku Solver *HARD*
Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by th ...
- 33. 81. Search in Rotated Sorted Array *HARD*
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh ...
- quartz---的Scheduler
quartz---的Scheduler 从这副图中可以很直观的看出来quartz的关系: 调度:Scheduler任务调度器,是实际执行任务调度的控制器.在spring中通过SchedulerFact ...
- Windows各种各种消息投递函数
1.SendMessage:发送消息给指定的窗口过程:直到窗口过程处理了消息才返回. 2.PostMessage:将消息放入消息队列(与指定窗口创建的线程相关)中:无需等待消息处理,立即返回. 不 ...
- mongodb的capped Collection集合
db.createCollection(name, {capped: true, autoIndexId: true, size: 1000, max :100} ) name:集合的名字 cappe ...
- bzoj1613
题解: 简单dp 然而我还是错了7次 代码: #include<bits/stdc++.h> using namespace std; ,M=; int n,m,a[N],dp[N][M] ...
- hdu 1013 过山车 匈牙利算法(代码+详细注释)
过山车 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submis ...
- L217
China has announced that it will further simplify the approval procedures for the private sector to ...
- Python mode_r
f = open("例子.txt",mode="r",encoding="utf-8") print(f.read(5)) # 读取5个字符 ...