Hi,

I understand that, to create a new table in Hive with an external data source, 
you don't need to have write permissions to the files themselves (only the 
metastore). However, I receive the following error when I try to create the 
table with only read rights to the files.

DROP TABLE IF EXISTS raw_product_logs;
CREATE EXTERNAL TABLE IF NOT EXISTS  raw_product_logs (
    kcid STRING,
    ip_address STRING,
    partner STRING,
)
STORED AS TEXTFILE
LOCATION '/data/raw/product_logs/*';

FAILED: Error in metadata: MetaException(message:Got exception: 
org.apache.hadoop.security.AccessControlException 
org.apache.hadoop.security.AccessControlException: Permission denied: 
user=product, access=WRITE, 
inode="/data/raw/product_logs":logsync:hadoop:drwxr-xr-x)
FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask

Is it because Hive "just in case" checks the permissions even if I never intend 
to manipulate these files via Hive?

I have found this issue which would imply that Hive surely doesn't need 
permissions for external tabled that are created as "READONLY", however, is 
doesn't seem to be attended.
https://issues.apache.org/jira/browse/HIVE-335

Is there any workaround for this?

Thanks!

Reply via email to