Hadoop Hive: How to allow regular user continuously write data and create tables in warehouse directory? Hadoop Hive: How to allow regular user continuously write data and create tables in warehouse directory? hadoop hadoop

Hadoop Hive: How to allow regular user continuously write data and create tables in warehouse directory?


If you maintain the table from outside Hive, then declare the table as external:

An EXTERNAL table points to any HDFS location for its storage, rather than being stored in a folder specified by the configuration property hive.metastore.warehouse.dir.

A Hive administrator can create the table and it can point it toward your own user owned HDFS storage location and you grant Hive permission to read from there.

As a general comment, there are no ways for an unprivileged user to do an unauthorized privileged action. Any such way is technically an exploit and you should never rely on it: even if is possible today, it will likely be closed soon. Hive Authorization (and HCatalog authorization) is orthogonal to HDFS authorization.

Your application is also incorrect, irrelevant of authorization issues. You are trying to write 'twice' in the same table which means your application does not handle partitions correctly. Start from An Introduction to Hive’s Partitioning.


You can configure for hdfs-site.xml such as:

<property>  <name>dfs.permissions</name>  <value>false</value></property>

This configure will disable permissions on HDFS. So, a regular user can do the operations on HDFS.

I hope this solve will help you.