启动hive报错no hbase in
•
大数据
启动hive报错no hbase in
将hdfs和yarn都启动成功之后,启动hive,如下所示:
[atguigu@hadoop102 conf]$ cd /opt/module/hive/ [atguigu@hadoop102 hive]$ bin/hive
报错信息如下
which: no hbase in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/module/jdk/bin:/opt/module/hadoop/bin:/opt/module/hadoop/sbin:/opt/module/jdk/bin:/home/atguigu/.local/bin:/home/atguigu/bin:/opt/module/jdk/bin:/opt/module/hadoop/bin:/opt/module/hadoop/sbin:/opt/module/hive/bin:/opt/module/jdk/bin)
没有安装hbase,通过finals hell把hbase-2.0.5-bin.tar.gz上传到/opt/software目录下并解压到/opt/module/目录下进行安装
解决方法:安装hbase
安装hbase前提1)Zookeeper集群正常部署,并启动; 2)Hadoop集群正常部署,并启动
1) Zookeeper正常部署
首先保证Zookeeper集群的正常部署,并启动之:
[atguigu@hadoop102 zookeeper-3.5.7]$ bin/zkServer.sh start [atguigu@hadoop103 zookeeper-3.5.7]$ bin/zkServer.sh start [atguigu@hadoop104 zookeeper-3.5.7]$ bin/zkServer.sh star
2) Hadoop正常部署
Hadoop集群的正常部署并启动:
[atguigu@hadoop102 hadoop-3.1.3]$ sbin/start-dfs.sh [atguigu@hadoop103 hadoop-3.1.3]$ sbin/start-yarn.sh [atguigu@hadoop102 software]$ tar -zxvf hbase-2.0.5-bin.tar.gz -C/opt/module
安装Hbase
解压Hbase到指定目录:
[atguigu@hadoop102 software]$ tar -zxvf hbase-2.0.5-bin.tar.gz -C/opt/module [atguigu@hadoop102 software]$ mv /opt/module/hbase-2.0.5/opt/module/hbase
配置环境变量
[atguigu@hadoop102 ~]$ sudo vim /etc/profile.d/my_env.sh 添加 #HBASE_HOME export HBASE_HOME=/opt/module/hbase export PATH=$PATH:$HBASE_HOME/bin
环境变量配置完成最好source一下(集群环境,在所有机器上source或者在Hadoop102
上source然后同步分发),让其生效
[atguigu@hadoop102 module]$ source /etc/profile.d/my_env.sh [atguigu@hadoop103 module]$ source /etc/profile.d/my_env.sh [atguigu@hadoop104 module]$ source /etc/profile.d/my_env.sh
HBase的配置文件
修改HBase对应的配置文件。
1. 修改conf/hbase-env.sh修改内容:
export HBASE_MANAGES_ZK=false# HBase启动后,为了避免HBase启动ZooKeeper export HBASE_PID_DIR=/opt/module/hbase/pids #修改hbase的进程PID存储目录
-
修改conf/hbase-site.xml修改内容:
hbase.rootdir
hdfs://hadoop102:8020/hbase
hbase.cluster.distributed
true
hbase.zookeeper.quorum
hadoop102,hadoop103,hadoop104
hbase.wal.provider
filesystem
#控制HBase是否检查流功能(hflush / hsync)如果您打算在rootdir表示的LocalFileSystem上运行,那就禁用此选项
hbase.unsafe.stream.capability.enforce
false
3.修改conf下regionservers文件:
hadoop102 hadoop103 hadoop104
HBase远程发送到其他集群
[atguigu@hadoop102 module]$ xsync hbase/
HBase服务的启动
1.单点启动
[atguigu@hadoop102 hbase]$ bin/hbase-daemon.sh start master [atguigu@hadoop102 hbase]$ bin/hbase-daemon.sh start regionserver
2.群启
[atguigu@hadoop102 hbase]$ bin/start-hbase.sh
对应的停止服务:
[atguigu@hadoop102 hbase]$ bin/stop-hbase.sh
再次启动hive无报错
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/1a7277a931.html
