新建数据库

最近更新时间: 2019-11-13 02:43:02

页面新建 步骤: 点击Database后加号; 输入数据库名称; 输入数据库描述; 点击Submit; 输入框输入语句 页面单击Query→Editor→Hive 在语句输入框中输入要执行语句;然后单击动作执行按钮执行建表操作 注意: 在新建数据库时,可能会出现一下错误: Execution Error, return code 1 from org.apache.Hadoop.hive.ql.exec.DDLTask. MetaException(message:java.security.AccessControlException: Permission denied: user=hive, access=WRITE, inode="/":hdfs:hdfs:drwxr-xr-x 出现错误原因如下: HDFS权限不够 错误使用了 root 用户运行 hive/hbase 第一次以xxx用户运行 hive/hbase 使用 root 用户进行 HDFS 操作/跑 HIVE 脚本 … 对于使用 root 用户进行 xxx 操作导致类似错误,我们不建议用户使用 root 用户进行类似操作,应切换到所使用服务对用的用户下进行操作,以减少不必要的问题。 对于第一次使用 Hive/HBase导致此错误,进行以下操作:

su  -hdfs
#If error come with Hive
hdfs dfs -mkdir -p /apps/hive
hdfs dfs -chown hive:hdfs /apps/hive
#If error come with HBase
hdfs dfs -mkdir -p /apps/hbase
hdfs dfs -chown hbase:hdfs /apps/hbase