在配置单元中创建数据库时,权限被拒绝错误

编程入门 行业动态 更新时间:2024-10-19 02:15:16
本文介绍了在配置单元中创建数据库时,权限被拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图在配置单元中使用数据库,但是当我在HIVE中查询下面时:

CREATE DATABASE BIGDATA;

我收到以下错误消息:

FAILED:元数据错误:MetaException(消息:出现异常:org.apache.hadoop.security.AccessControlException org.apache.hadoop.security.AccessControlException:权限被拒绝:user = aseema,access = WRITE ,inode =:hduser:supergroup:rwxr-xr-x) FAILED:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1

导致这种情况的原因是什么? 这是因为在hdfs中缺少用户aseema的许可。请按照以下步骤操作。

以hduser身份登录并执行以下操作(从日志中看来,hduser是超级用户)

hadoop fs -mkdir -p / user / hive / warehouse hadoop fs -mkdir / tmp hadoop fs -chmod -R 777 / user / hive hadoop fs -chmod 777 / tmp

之后,尝试执行create database语句来自aseema用户。

I am trying to database in hive, but when I run below query in HIVE:

CREATE DATABASE BIGDATA;

I receive the following error message:

FAILED: Error in metadata: MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException org.apache.hadoop.security.AccessControlException: Permission denied: user=aseema, access=WRITE, inode="":hduser:supergroup:rwxr-xr-x) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

What is causing this?

解决方案

This is because of the lack of permission to the user aseema in hdfs. Follow the steps below.

Login as hduser and perform the following operations (from the logs, it seems hduser is a superuser)

hadoop fs -mkdir -p /user/hive/warehouse hadoop fs -mkdir /tmp hadoop fs -chmod -R 777 /user/hive hadoop fs -chmod 777 /tmp

After this, try executing the create database statement from aseema user.

更多推荐

在配置单元中创建数据库时,权限被拒绝错误

本文发布于:2023-10-15 03:07:12,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   权限   错误   数据库   单元中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!