文档首页> MapReduce服务 MRS> 用户指南(吉隆坡区域)> 常见问题> Kerberos使用> 开启Kerberos认证的集群如何访问Hive?
更新时间:2022-08-12 GMT+08:00

开启Kerberos认证的集群如何访问Hive?

  1. 用root用户登录集群Master节点。
  2. 配置环境变量。

    source /opt/client/bigdata_env

  3. 如果当前集群已启用Kerberos认证,执行以下命令认证当前用户,当前用户需要具有创建Hive表的权限。

    kinit MRS集群用户

    例如,kinit hiveuser

  4. 执行Hive组件的客户端命令。

    beeline

  5. 在beeline中运行Hive命令,例如:

    create table test_obs(a int, b string) row format delimited fields terminated by "," stored as textfile location "obs://test_obs";

  6. 使用“Ctrl + C”退出hive beeline。