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 470AB9131 for ; Tue, 12 Jun 2012 19:35:04 +0000 (UTC) Received: (qmail 39776 invoked by uid 500); 12 Jun 2012 19:35:03 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 39727 invoked by uid 500); 12 Jun 2012 19:35:03 -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 39719 invoked by uid 99); 12 Jun 2012 19:35:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 19:35:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of t-shevo@microsoft.com designates 213.199.154.206 as permitted sender) Received: from [213.199.154.206] (HELO am1outboundpool.messaging.microsoft.com) (213.199.154.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 19:34:56 +0000 Received: from mail28-am1-R.bigfish.com (10.3.201.229) by AM1EHSOBE005.bigfish.com (10.3.204.25) with Microsoft SMTP Server id 14.1.225.23; Tue, 12 Jun 2012 19:33:32 +0000 Received: from mail28-am1 (localhost [127.0.0.1]) by mail28-am1-R.bigfish.com (Postfix) with ESMTP id 5988F20438 for ; Tue, 12 Jun 2012 19:33:32 +0000 (UTC) X-Forefront-Antispam-Report: CIP:131.107.125.8;KIP:(null);UIP:(null);IPV:NLI;H:TK5EX14HUBC107.redmond.corp.microsoft.com;RD:none;EFVD:NLI X-SpamScore: -8 X-BigFish: VS-8(zz98dI9371I103dK542M1432Izz1202h1082kzz8275bh8275dhz2fh2a8h668h839hd25hf0ah) Received-SPF: pass (mail28-am1: domain of microsoft.com designates 131.107.125.8 as permitted sender) client-ip=131.107.125.8; envelope-from=t-shevo@microsoft.com; helo=TK5EX14HUBC107.redmond.corp.microsoft.com ;icrosoft.com ; Received: from mail28-am1 (localhost.localdomain [127.0.0.1]) by mail28-am1 (MessageSwitch) id 1339529610642568_16629; Tue, 12 Jun 2012 19:33:30 +0000 (UTC) Received: from AM1EHSMHS005.bigfish.com (unknown [10.3.201.242]) by mail28-am1.bigfish.com (Postfix) with ESMTP id 9102D4C0047 for ; Tue, 12 Jun 2012 19:33:30 +0000 (UTC) Received: from TK5EX14HUBC107.redmond.corp.microsoft.com (131.107.125.8) by AM1EHSMHS005.bigfish.com (10.3.207.105) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 12 Jun 2012 19:33:29 +0000 Received: from TK5EX14MBXC252.redmond.corp.microsoft.com ([169.254.1.215]) by TK5EX14HUBC107.redmond.corp.microsoft.com ([157.54.80.67]) with mapi id 14.02.0309.003; Tue, 12 Jun 2012 19:34:28 +0000 From: Shefali Vohra To: "dev@hive.apache.org" Subject: RE: Hive Unit Tests: Read-Only Table Thread-Topic: Hive Unit Tests: Read-Only Table Thread-Index: Ac1IwpcO1YYXad9xSu261bchajJBMAACy2yAAACfpUAAAGEaAAAAGgXw Date: Tue, 12 Jun 2012 19:34:27 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.54.51.71] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-Virus-Checked: Checked by ClamAV on apache.org Fair enough. So (just to make sure) if I need to create a table to run a te= st, I should do so within the .q file itself?=20 Thanks so much for your help!! Shefali -----Original Message----- From: Edward Capriolo [mailto:edlinuxguru@gmail.com]=20 Sent: Tuesday, June 12, 2012 12:30 PM To: dev@hive.apache.org Subject: Re: Hive Unit Tests: Read-Only Table As mentioned we normally do not touch the QTestUtil.java and instead do all= the work in q files. The only thing I can thing of is that the table name = is bad or that you are overwriting and already existing table. It is hard to tell without any code. On Tue, Jun 12, 2012 at 3:24 PM, Shefali Vohra wrot= e: > Sorry I think my original message was a bit ambiguous and I think my erro= r is a little different than what it may have implied. > From what I understand, the *.q files contain Hive queries such as select= * from table, etc. I am creating that table within QTestUtil.java, however= I'm getting the read-only error I described earlier. Do you know how to so= lve this problem? > > Thank you! > Shefali > > -----Original Message----- > From: Edward Capriolo [mailto:edlinuxguru@gmail.com] > Sent: Tuesday, June 12, 2012 12:01 PM > To: dev@hive.apache.org > Subject: Re: Hive Unit Tests: Read-Only Table > > It seems like your are running unit tests in a non-standard way. It sound= s like your are trying to write stand along j-unit tests. Hive uses velocit= y to turn .q scripts into test and the testing framework diffs the output. > > You should look at the .q files inside=20 > src/ql/test/clientpositive/whatever.q > > Or give this a go (its a unit testing tool I wrote): > > https://github.com/edwardcapriolo/hive_test > > > On Tue, Jun 12, 2012 at 1:47 PM, Shefali Vohra wr= ote: >> Hi! >> I'm trying to add unit tests to a UDF I developed, and used the commands= runCreateTableCmd and runLoadCmd to create and load the table. I'm fairly = certain it is loading from the correct filepath. =A0When I try to run it th= ough, I get the error "Cannot overwrite read-only table." Does anybody have= a solution for this? >> >> Thanks! >> Shefali > >