hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-13975) Hive import table fails if there is no write access to the source location
Date Thu, 09 Jun 2016 02:49:21 GMT
Chaoyu Tang created HIVE-13975:
----------------------------------

             Summary: Hive import table fails if there is no write access to the source location
                 Key: HIVE-13975
                 URL: https://issues.apache.org/jira/browse/HIVE-13975
             Project: Hive
          Issue Type: Bug
          Components: Import/Export
            Reporter: Chaoyu Tang
            Assignee: Chaoyu Tang


It seems not right that a write permission is needed on the source side for import table because
the CopyTask in import needs to create a staging directory under the imported source directory.
For a user who does not have the write permission to the source directory, you will get error
like following
{code}
Caused by: java.lang.RuntimeException: Cannot create staging directory 'hdfs://quickstart.cloudera:8020/user/hive/exp_t1/.hive-staging_hive_2016-05-26_16-38-29_453_8739265934924968327-1':
Permission denied: user=test1, access=WRITE, inode="/user/hive/exp_t1":anonymous:supergroup:drwxrwxr-x
 ...
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:952)
	at org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:945)
	at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1856)
	at org.apache.hadoop.hive.common.FileUtils.mkdir(FileUtils.java:518)
	at org.apache.hadoop.hive.ql.Context.getStagingDir(Context.java:234)
	... 23 more
{code}
There are three tasks involved in import table, CopyTask, DDLTask and MoveTask. I wonder if
the CopyTask is really needed?




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message