一、安装 

1、        下载安装hive

hive-0.11.0.tar.gz(稳定版)

目录:/data

tar –zxvfhive-0.11.0.tar.gz

2、        配置

把所有的模板文件copy一份

cd /opt/hive-0.11.0/conf

cp hive-default.xml.template hive-site.xml

cp hive-env.sh.template hive-env.sh

cp hive-log4j.properties.template  hive-log4j.properties

cp hive-exec-log4j.properties.template hive-exec-log4j.properties

3、        修改hive-site.xml

<property>

 <name>javax.jdo.option.ConnectionURL</name>

 <value>jdbc:mysql://192.168.0.6:3306/hive?createDatabaseIfNotExist=true</value>

 <description>JDBC connect string for aJDBCmetastore</description>

</property>

 <property>

 <name>javax.jdo.option.ConnectionDriverName</name>

 <value>com.mysql.jdbc.Driver</value>

 <description>Driver class name for aJDBCmetastore</description>

</property>

<property>

 <name>javax.jdo.option.ConnectionUserName</name>

 <value>hive</value>

 <description>username to use againstmetastoredatabase</description>

</property>

<property>

 <name>javax.jdo.option.ConnectionPassword</name>

 <value>hive</value>

 <description>password to use againstmetastoredatabase</description>

</property>

<property>

 <name>hive.metastore.schema.verification</name>

 <value>false</value>

 <description>

Enforce metastore schema version consistency.

True: Verify that version information stored in metastore matcheswithone from Hive jars.  Alsodisableautomatic

schema migration attempt. Users are required to manully migrateschemaafter Hive upgrade which ensures

proper metastore schema migration. (Default)

False: Warn if the version information stored in metastore doesn'tmatchwith one from in Hive jars.

</description>

</property>

4、        修改hive-env.sh

# Set HADOOP_HOME to pointto a specific hadoop install directory

export  HADOOP_HOME=/usr/local/hadoop

#HiveConfiguration Directory can be controlled by:

export  HIVE_CONF_DIR=/usr/local/hive/conf

5、        安装mysql jdbc

hadoop@james-ubuntu32:~/tmp/tools$cp mysql-connector-java-5.1.28-bin.jar /usr/local/hive/lib

6、较验hive

1、启动hive:

Bin/hive

nohup hive --service hiveserver

2、测试sql:

show tables;

create table shark_test01(id int, namestring);

select * from shark_test01;

exit;

查看hive创建的文件:hadoop fs -ls -R /user/hive

7、        各项配置详解

http://blog.csdn.net/w13770269691/article/details/17232947

8、错误及解决

错误3:

MetaException(message:file:/user/hive/warehouse/xxxxis not a directory or unable to create one)

解决:

CLASSPATH中加入HADOOP_CONF_DIR

错误2:

Error in metadata:MetaException(message:Got exception:org.apache.hadoop.hive.metastore.api.MetaExceptionjavax.jdo.JDODataStoreException: An exception was thrown whileadding/validating class(es) : Specified key was too long; max
key length is 767bytes

解决:

只要修改MySQL中Hive元数据库MetaStore的字符集便可。

alter database dbname character set latin1;

错误1:

java.lang.RuntimeException: Unable toinstantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient。

解决:

在CLASSPATH中要有mysql的jdbc驱动。

hive-0.11.0安装的更多相关文章

  1. Windows下MySQL8.0.11.0安装教程

    1.mysql下载地址:https://dev.mysql.com/downloads/installer/ 2.下载安装MySQL 8.0.11.0 https://cdn.mysql.com//D ...

  2. kafka 0.11.0.3 源码编译

    首先下载 kafka 0.11.0.3 版本 源码: http://mirrors.hust.edu.cn/apache/kafka/0.11.0.3/ 下载源码 首先安装 gradle,不再说明 1 ...

  3. Kafka 0.11.0.0 实现 producer的Exactly-once 语义(官方DEMO)

    <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-clients&l ...

  4. 自己动手破解Z.EntityFramework.Extensions 4.0.11.0的方法

    因为项目中使用到Z.EntityFramework.Extensions 和 Z.EntityFramework.Plus(免费开源)两个类库,但是Z.EntityFramework.Extensio ...

  5. hive 0.11的安装配置

    一.上传hive 0.11解压后的文件到linux 1.用的版本是shark站点提供的,可能是针对shark修改了代码. 2.追加mysql.oracle两个jdbc驱动包到lib目录下. 二.配置相 ...

  6. redis(4.0.11)编译安装

    一: redis数据库安装 系统环境:linux系统(centos/redhat):Red Hat Enterprise Linux Server release 6.8 (Santiago) red ...

  7. MySQL 8.0.11(zip)安装及配置

    (1)下载MySQL8.0.11: (2)解压zip文件: 我解压到了D:/MySQL/mysql-8.0.11-winx64 (3)配置环境变量:   右键此电脑->属性 高级系统设置 环境变 ...

  8. Kafka 0.11.0.0 实现 producer的Exactly-once 语义(中文)

    很高兴地告诉大家,具备新的里程碑意义的功能的Kafka 0.11.x版本(对应 Confluent Platform 3.3)已经release,该版本引入了exactly-once语义,本文阐述的内 ...

  9. Kafka 0.11.0.0 实现 producer的Exactly-once 语义(英文)

    Exactly-once Semantics are Possible: Here’s How Kafka Does it I’m thrilled that we have hit an excit ...

随机推荐

  1. iOS 可选择的购物车

    最近看了淘宝的购物车,于是做了一个可选择的购物车模板. 如果有好的建议请提出,带我日后更新.

  2. c++编码习惯

    1 大驼峰命名法 类名和函数名由单词构成,每个单词的首字母大写. 2 函数命名 大驼峰命名法. 3 类命名 大驼峰命名,但是为了和函数名区分开,在前面加上一个大写的C.

  3. 操作符表示指针指向的底层值 切片 nill 清空 按值引用赋值 获取地址赋值

    package main import "fmt" var thisVisitedUrls [] string func tf() { p := &thisVisitedU ...

  4. django 设置静态文件,static 链接

    这篇文章讲的django 静态static 文件设置,还可以,供参考 http://blog.csdn.net/sinat_21302587/article/details/74059078

  5. 服务器安装tensorflow导入模块报错Illegal instruction (core dumped)

    在ubuntu上安装tensorflow后导入模块显示Illegal instruction (core dumped) 服务器的版本是Ubuntu 16.04.5 降低版本,成功导入模块 pip3 ...

  6. DLL中导出ANSI和UNICODE函数

    模仿window中的DLL导出ANSI和UNICODE版本的函数,使用UNICODE宏来控制使用哪个版本: 在函数实际的执行代码UNICODE版本中,在ANSI函数的版本中只做参数的转换,及ANSI字 ...

  7. 2018年东北农业大学春季校赛 E wyh的集合 【数学】

    题目链接 https://www.nowcoder.com/acm/contest/93/F 思路 其实容易知道在两个不同集合里 假设元素个数 分别为 a b 然后对于第一个集合里的每一个元素 都可以 ...

  8. Carthage的使用

    1.安装Carthage https://github.com/Carthage/Carthage/releases 2.进入Cartfile文件所在的目录地址 cd 拖入文件Cartfile,把最后 ...

  9. SQL语句性能优化操作

    1.对查询进行优化,应尽量避免全表扫描,首先应考虑在where及order by涉及的列上建立索引. 2.应尽量避免在where子句中对字段进行null值判断,创建表时NULL是默认值,但大多数时候应 ...

  10. 吴恩达机器学习笔记(二) —— Logistic回归

    主要内容: 一.回归与分类 二.Logistic模型即sigmoid function 三.decision boundary 决策边界 四.cost function 代价函数 五.梯度下降 六.自 ...