Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1A21DB8A for ; Sat, 29 Dec 2012 18:56:14 +0000 (UTC) Received: (qmail 29586 invoked by uid 500); 29 Dec 2012 18:56:13 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 29498 invoked by uid 500); 29 Dec 2012 18:56:13 -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 29437 invoked by uid 500); 29 Dec 2012 18:56:13 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 29416 invoked by uid 99); 29 Dec 2012 18:56:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Dec 2012 18:56:13 +0000 Date: Sat, 29 Dec 2012 18:56:13 +0000 (UTC) From: "Phabricator (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-3431) Resources on non-local file system should be downloaded to temporary directory sometimes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540967#comment-13540967 ] Phabricator commented on HIVE-3431: ----------------------------------- ashutoshc has requested changes to the revision "HIVE-3431 [jira] Resources on non-local file system should be downloaded to temporary directory sometimes". We should avoid special casing and be consistent regardless its a concurrent situation for hiveserver or a regular hive client. INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java:619 I think instead of File.createTempfile() in else block, we should always do this, along with specifying user-specified dir in the argument, i.e., File.createTempfile(destinationName, null, resourceDir). This will guarantee that we have file with unique name (without race conditions) in user specified resource dir. We don't have to worry about $temporary magic word etc. if we choose this route. REVISION DETAIL https://reviews.facebook.net/D5199 BRANCH DPAL-1872 To: JIRA, ashutoshc, navis Cc: mgrover > Resources on non-local file system should be downloaded to temporary directory sometimes > ---------------------------------------------------------------------------------------- > > Key: HIVE-3431 > URL: https://issues.apache.org/jira/browse/HIVE-3431 > Project: Hive > Issue Type: Improvement > Components: Configuration > Affects Versions: 0.10.0 > Reporter: Navis > Assignee: Navis > Priority: Trivial > Attachments: HIVE-3431.1.patch.txt, HIVE-3431.D5199.2.patch > > > "add resource " command downloads the resource file to location specified by conf "hive.downloaded.resources.dir" in local file system. But when the command above is executed concurrently to hive-server for same file, some client fails by VM crash, which is caused by overwritten file by other requests. > So there should be a configuration to provide per request location for add resource command, something like "set hiveconf:hive.downloaded.resources.dir=temporary" -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira