hive-1.2.1的安装步骤
发表于:2024-10-27 作者:千家信息网编辑
千家信息网最后更新 2024年10月27日,本篇内容主要讲解"hive-1.2.1的安装步骤",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"hive-1.2.1的安装步骤"吧!环境介绍IP主机名部署1
千家信息网最后更新 2024年10月27日hive-1.2.1的安装步骤
Hive配置
启动metastore service
测试
本篇内容主要讲解"hive-1.2.1的安装步骤",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"hive-1.2.1的安装步骤"吧!
环境介绍
IP | 主机名 | 部署 |
192.168.2.10 | bi10 | hadoop-2.6.2,hive-1.2.1,hive metastore |
192.168.2.12 | bi12 | hadoop-2.6.2,hive-1.2.1,hive metastore |
192.168.2.13 | bi13 | hadoop-2.6.2,hive-1.2.1 |
mysql配置
新建用户hive,密码hive,然后授权。数据库IP:192.168.2.11 端口:3306
CREATE USER 'hive'@'%' IDENTIFIED BY 'hive';GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%' WITH GRANT OPTION;FLUSH PRIVILEGES;CREATE DATABASE hive;alter database hive character set latin1;
Hive配置
解压hive-1.2.1到/home/hadoop/work/hive-1.2.1目录下,然后修改配置文件
修改hive-site.xml,进入hive的conf目录下
[hadoop@bi13 conf]$ mv hive-env.sh.template hive-site.xml[hadoop@bi13 conf]$ vim hive-site.xml
hive-site.xml,参数说明:
hive.metastore.warehouse.dir | hive数据仓库在hdfs中的位置,由于hadoop集群采用了ha的方式,所以在这里使用hdfs://masters/user/hive/warehouse,而没有具体的namenode主机+端口 |
hive.metastore.uris | 这个使用hive使用metastore server的端口配置,我们使用默认的9083端口 |
hive.exec.scratchdir | 同样,由于ha的配置,我们使用hdfs://masters/user/hive/tmp |
javax.jdo.option.ConnectionPassword | mysql数据库密码 |
javax.jdo.option.ConnectionDriverName | mysql数据库驱动 |
javax.jdo.option.ConnectionURL | mysql数据库URL |
javax.jdo.option.ConnectionUserName | mysql数据库用户名 |
hive.querylog.location hive.server2.logging.operation.log.location hive.exec.local.scratchdir hive.downloaded.resources.dir | 这些配置项的value值必须写成具体的路径,否在会出现问题 |
hive.metastore.warehouse.dir hdfs://masters/user/hive/warehouse location of default database for the warehouse hive.metastore.uris thrift://bi10:9083,thrift://bi12:9083 Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore. hive.exec.scratchdir hdfs://masters/user/hive/tmp HDFS root scratch dir for Hive jobs which gets created with write all (733) permission. For each connecting user, an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created, with ${hive.scratch.dir.permission}. javax.jdo.option.ConnectionPassword hive password to use against metastore database javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver Driver class name for a JDBC metastore javax.jdo.option.ConnectionURL jdbc:mysql://192.168.2.11:3306/hive?createDatabaseIfNotExist=true JDBC connect string for a JDBC metastore javax.jdo.option.ConnectionUserName hive Username to use against metastore database hive.querylog.location /home/hadoop/work/hive-1.2.1/tmp/iotmp Location of Hive run time structured log file hive.server2.logging.operation.log.location /home/hadoop/work/hive-1.2.1/tmp/operation_logs Top level directory where operation logs are stored if logging functionality is enabled hive.exec.local.scratchdir /home/hadoop/work/hive-1.2.1/tmp/${system:user.name} Local scratch space for Hive jobs hive.downloaded.resources.dir /home/hadoop/work/hive-1.2.1/tmp/${hive.session.id}_resources Temporary local directory for added resources in the remote file system.
使用hive下面的jline-2.12.jar替代hadoop下面的jline-0.9.94.jar
mv hive-1.2.1/lib/jline-2.12.jar hadoop-2.6.2/share/hadoop/yarn/lib/mv hadoop-2.6.2/share/hadoop/yarn/lib/jline-0.9.94.jar hadoop-2.6.2/share/hadoop/yarn/lib/jline-0.9.94.jar.bak
把以上操作复制到所有部署hive的机器上
启动metastore service
分别在bi10和bi12下面启动metastore service
nohup hive --service metastore > null 2>&1 &
测试
进入hive,看是否有问题。如果存在问题是用hive --hiveconf hive.root.logger=DEBUG,console启动,可以看到具体的日志。
[hadoop@bi13 work]$ hiveSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/home/hadoop/work/hadoop-2.6.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/home/hadoop/work/spark-1.5.1/lib/spark-assembly-1.5.1-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/home/hadoop/work/hadoop-2.6.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/home/hadoop/work/spark-1.5.1/lib/spark-assembly-1.5.1-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]Logging initialized using configuration in jar:file:/home/hadoop/work/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.propertieshive>
到此,相信大家对"hive-1.2.1的安装步骤"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
数据
配置
数据库
端口
步骤
问题
主机
内容
密码
用户
目录
面的
学习
实用
更深
仓库
位置
兴趣
参数
实用性
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全的威胁ppt
湖南长沙服务器托管云主机服务器
腾讯贵州服务器是风冷吗
晋江量虐网络技术有限公司
数据库怎么删除外键约束
云服务器一个月多少流量够用
mysql多租户数据库设计
宇泰串口服务器和组态王
上传视频到自己的服务器
网络安全工作报告工会
增强网络安全防范意识的通知
网络安全监管工作规定
打印机服务器属性安全
如何使用wind金融数据库
检察院进行网络安全检查
it外包服务器管理
lpl合同数据库gcd
涞水支行网络安全
软件开发 进销存
淄博哪里有联想服务器总代理
高校网络技术名师培育计划
开展网络安全的自查方案
数据库的查看权限是什么
软件开发外包大单
linux看服务器在线的命令
数据库要怎么样安全
奥特曼传奇英雄服务器教程
服务器安全域
网络安全战略专家秦安
联通公司后台服务器运营中心