一、安装 

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 UITextView(多行文本框)控件的用法详解(五5.8)

    本文转载至 http://wuchaorang.2008.blog.163.com/blog/static/48891852201232014813990/     1.创建并初始化 创建UIText ...

  2. drawable canvas使用

    /** * Drawable 就是一个可画的对象, * 其可能是一张位图(BitmapDrawable), * 也可能是一个图形(ShapeDrawable), * 还有可能是一个图层(LayerDr ...

  3. <密码学入门>关于DES加密算法解密算法相关问题

    题外话:个人觉得DES加密解密真的是一种过程冗长的方法,S盒,P盒还有各种各样的变换让人眼花缭乱. (一)Feistel密码结构 要先说Feistel密码结构的原因是DES加密过程是和Feistel密 ...

  4. 我所理解的RESTful Web API [Web标准篇]【转】

    原文:http://www.cnblogs.com/artech/p/restful-web-api-01.html REST不是一个标准,而是一种软件应用架构风格.基于SOAP的Web服务采用RPC ...

  5. findbugs规则

    FindBugs是基于Bug Patterns概念,查找javabytecode(.class文件)中的潜在bug,主要检查bytecode中的bug patterns,如NullPoint空指针检查 ...

  6. BaseServlet优化Servlet,实现类似struts2的一些简单效果

    package cn.itcast.web.servlet; import java.io.IOException; import javax.servlet.ServletException; im ...

  7. linux命令学习笔记(29):chgrp命令

    在lunix系统里,文件或目录的权限的掌控以拥有者及所诉群组来管理.可以使用chgrp指令取变更文件与目录所属群 组,这种方式采用群组名称或群组识别码都可以.Chgrp命令就是change group ...

  8. [算法]Trie树

    我是好文章的搬运工,原文来自博客园,博主一线码农,选自”6天通吃树结构“系列,地址:http://www.cnblogs.com/huangxincheng/archive/2012/11/25/27 ...

  9. 如何在asterisk中限制呼叫路数

      在asterisk中,对于呼叫个数是可以通过call-limit进行限制的.限制办法是通过修改asterisk.conf中maxcalls参数,设置允许的最大呼叫数.这里的最大呼叫数是包括所有的呼 ...

  10. java-02 for循环,while循环

    ###############获取一个数字的每位数字############### #############1-100奇数和偶数和############## public class Sum { ...