Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D0BA0200B32 for ; Thu, 9 Jun 2016 04:49:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CF443160A5C; Thu, 9 Jun 2016 02:49:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 497D1160A2E for ; Thu, 9 Jun 2016 04:49:22 +0200 (CEST) Received: (qmail 51060 invoked by uid 500); 9 Jun 2016 02:49:21 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 51015 invoked by uid 99); 9 Jun 2016 02:49:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2016 02:49:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 19DA82C1F5C for ; Thu, 9 Jun 2016 02:49:21 +0000 (UTC) Date: Thu, 9 Jun 2016 02:49:21 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-13975) Hive import table fails if there is no write access to the source location MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Jun 2016 02:49:23 -0000 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)