Hortonworks中修改Hive使用postgresql数据库

栏目: 数据库 · PostgreSQL · 发布时间: 7年前

内容简介:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kongxx/article/details/82991360

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kongxx/article/details/82991360

首先停止Hive服务

从Ambari管理界面上停止Hive服务

修改Hive配置

在Hive -> Configs -> Advanced中,将数据库改为使用已存在的postgresql数据库,然后修改数据库用户,密码和数据库名称。

创建用户和数据库

使用postgres用户连接postgresql数据库

> psql -U postgres
postgres=# CREATE USER hive WITH PASSWORD 'hive';
postgres=# CREATE DATABASE hive OWNER hive ENCODING 'UTF8';

安装驱动

sudo yum install postgresql-jdbc*

cp /usr/share/java/postgresql-jdbc.jar /usr/hdp/2.6.3.0-235/hive/lib

修改/var/lib/pgsql/data/pg_hba.conf文件

将
local  all  ambari,mapred md5
host  all   ambari,mapred 0.0.0.0/0  md5
host  all   ambari,mapred ::/0 md5

改为
local  all  ambari,mapred,hive md5
host  all   ambari,mapred,hive 0.0.0.0/0  md5
host  all   ambari,mapred.hive ::/0 md5

修改后,重新启动postgresql

sudo systemctl restart postgresql.service

启动Hive服务

从Ambari管理界面上启动Hive服务


以上所述就是小编给大家介绍的《Hortonworks中修改Hive使用postgresql数据库》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Distributed Algorithms: An Intuitive Approach

Distributed Algorithms: An Intuitive Approach

Wan Fokkink / MIT Press / 2018-2-2 / USD 48.00

The new edition of a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. This book offers students and researchers a guide to ......一起来看看 《Distributed Algorithms: An Intuitive Approach》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

URL 编码/解码
URL 编码/解码

URL 编码/解码