AuthorizationException: hcat with root user

to create new topics or reply. | New User Registration

This topic contains 2 replies, has 2 voices, and was last updated by  tedr 1 year, 9 months ago.

  • Creator
    Topic
  • #29835

    Rupert Bailey
    Participant

    It seems the system root user can’t read sandbox user created table schemas from command line hcat commands. Why is this? Do user tables need to be fully qualified somehow?

    For example, a table schema I created through the web interface nyse_stocks cannot be read by:
    [root@sandbox ~]# hcat -e ‘describe nyse_stocks;’
    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
    Hive history file=/tmp/root/hive_job_log_root_201305190226_603099069.txt
    FAILED: AuthorizationException org.apache.hadoop.security.AccessControlException: action READ not permitted on path hdfs://sandbox:8020/apps/hive/warehouse/nyse_stocks for user root

    However a table I created on the command line as root, can be viewed by the sandbox user in the web interface:
    [root@sandbox ~]# hcat -e ‘create table mytable(a int);’
    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
    Hive history file=/tmp/root/hive_job_log_root_201305190224_889288293.txt
    OK
    ->can now be seen in the web interface on the HCAT page.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #29961

    tedr
    Moderator

    HI Rupert,

    The root user is God mode on the system level, not on the hadoop/hdfs level – the user that is the most godlike in hadoop/hdfs is ‘hdfs’.

    thanks,
    Ted.

    Collapse
    #29836

    Rupert Bailey
    Participant

    Okay I can answer that one myself:
    su – sandbox
    will place you as the other user and then you can view the HCAT script of that file. Strange that root is not “god mode” anymore :(

    Collapse
Viewing 2 replies - 1 through 2 (of 2 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.