Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C6DC9E42 for ; Wed, 19 Oct 2011 10:57:10 +0000 (UTC) Received: (qmail 35724 invoked by uid 500); 19 Oct 2011 10:57:09 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 35693 invoked by uid 500); 19 Oct 2011 10:57:09 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 35685 invoked by uid 99); 19 Oct 2011 10:57:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 10:57:09 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chinnarao@huawei.com designates 206.16.17.211 as permitted sender) Received: from [206.16.17.211] (HELO usaga01-in.huawei.com) (206.16.17.211) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2011 10:57:01 +0000 Received: from huawei.com (usaml01-in [172.18.4.6]) by usaga01-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LTB00MIU7QFXR@usaga01-in.huawei.com> for user@hive.apache.org; Wed, 19 Oct 2011 05:56:39 -0500 (CDT) Received: from huawei.com ([172.17.1.188]) by usaga01-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LTB00MBE7QEZ6@usaga01-in.huawei.com> for user@hive.apache.org; Wed, 19 Oct 2011 05:56:39 -0500 (CDT) Received: from [172.24.1.33] (Forwarded-For: [10.18.1.36]) by szxmc01-in.huawei.com (mshttpd); Wed, 19 Oct 2011 15:56:38 +0500 Date: Wed, 19 Oct 2011 15:56:38 +0500 From: Chinna Rao Lalam 72745 Subject: Re: Accessing distributed cache in transform scripts In-reply-to: To: user@hive.apache.org Message-id: MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 2.14 (built Aug 8 2006) Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en Priority: normal References: X-Virus-Checked: Checked by ClamAV on apache.org Hi, Can u post some more details like for the "list file" what command u have used. ----- Original Message ----- From: Mohit Gupta Date: Wednesday, October 19, 2011 3:16 pm Subject: Re: Accessing distributed cache in transform scripts To: user@hive.apache.org > Plz help...Any pointers!! > > On 10/19/11, Mohit Gupta wrote: > > Hi All, > > > > I want some read-only data to be available at the reducers / > transform> scripts. I am trying to use distributed cache to > achieve this using > > the following steps: > > 1. add file s3://bucket_name/prefix/testfile > > then > > 2. "list file" to find out the location of local copy of testfile. > > it shows the locally file is stored at > > "/mnt/var/lib/hive_05/downloaded_resources/testfile" > > > > 3. reduce script code ( in php) > > #!/usr/bin/php > > > > $fin=fopen("/mnt/var/lib/hive_05/downloaded_resources/testfile","r");> $line=fgets($fin); > > ?> > > > > 4. the reduce script throws an error "no such file or directory > > /mnt/var/lib/hive_05/downloaded_resources/testfile ". > > > > 5. On ssh, I found that the file was indeed present at > > "/mnt/var/lib/hive_05/downloaded_resources/testfile". > > > > Plz help. Is this the right way to pass some info to the reduce > > scripts. If yes, what I could be missing here? Else, any other > > possible way(s)!! > > > > Thanks > > > > Mohit > > > > > -- > Best Regards, > > Mohit Gupta > Software Engineer at Vdopia Inc. >