|
Shefali Vohra
2012-06-12, 17:47
Edward Capriolo
2012-06-12, 19:01
Shefali Vohra
2012-06-12, 19:24
Edward Capriolo
2012-06-12, 19:30
Shefali Vohra
2012-06-12, 19:34
Namit Jain
2012-06-12, 21:13
Kanna Karanam
2012-06-12, 21:19
Namit Jain
2012-06-12, 21:26
Shefali Vohra
2012-06-12, 21:53
|
-
Hive Unit Tests: Read-Only TableShefali Vohra 2012-06-12, 17:47
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. When I try to run it though, I get the error "Cannot overwrite read-only table." Does anybody have a solution for this? Thanks! Shefali
-
Re: Hive Unit Tests: Read-Only TableEdward Capriolo 2012-06-12, 19:01
It seems like your are running unit tests in a non-standard way. It
sounds like your are trying to write stand along j-unit tests. Hive uses velocity to turn .q scripts into test and the testing framework diffs the output. You should look at the .q files inside 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 <[EMAIL PROTECTED]> wrote: > 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. When I try to run it though, I get the error "Cannot overwrite read-only table." Does anybody have a solution for this? > > Thanks! > Shefali
-
RE: Hive Unit Tests: Read-Only TableShefali Vohra 2012-06-12, 19:24
Sorry I think my original message was a bit ambiguous and I think my error 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 solve this problem? Thank you! Shefali -----Original Message----- From: Edward Capriolo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2012 12:01 PM To: [EMAIL PROTECTED] Subject: Re: Hive Unit Tests: Read-Only Table It seems like your are running unit tests in a non-standard way. It sounds like your are trying to write stand along j-unit tests. Hive uses velocity to turn .q scripts into test and the testing framework diffs the output. You should look at the .q files inside 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 <[EMAIL PROTECTED]> wrote: > 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. When I try to run it though, I get the error "Cannot overwrite read-only table." Does anybody have a solution for this? > > Thanks! > Shefali
-
Re: Hive Unit Tests: Read-Only TableEdward Capriolo 2012-06-12, 19:30
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 <[EMAIL PROTECTED]> wrote: > Sorry I think my original message was a bit ambiguous and I think my error 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 solve this problem? > > Thank you! > Shefali > > -----Original Message----- > From: Edward Capriolo [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 12, 2012 12:01 PM > To: [EMAIL PROTECTED] > Subject: Re: Hive Unit Tests: Read-Only Table > > It seems like your are running unit tests in a non-standard way. It sounds like your are trying to write stand along j-unit tests. Hive uses velocity to turn .q scripts into test and the testing framework diffs the output. > > You should look at the .q files inside 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 <[EMAIL PROTECTED]> wrote: >> 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. When I try to run it though, I get the error "Cannot overwrite read-only table." Does anybody have a solution for this? >> >> Thanks! >> Shefali > >
-
RE: Hive Unit Tests: Read-Only TableShefali Vohra 2012-06-12, 19:34
Fair enough. So (just to make sure) if I need to create a table to run a test, I should do so within the .q file itself?
Thanks so much for your help!! Shefali -----Original Message----- From: Edward Capriolo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2012 12:30 PM To: [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote: > Sorry I think my original message was a bit ambiguous and I think my error 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 solve this problem? > > Thank you! > Shefali > > -----Original Message----- > From: Edward Capriolo [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 12, 2012 12:01 PM > To: [EMAIL PROTECTED] > Subject: Re: Hive Unit Tests: Read-Only Table > > It seems like your are running unit tests in a non-standard way. It sounds like your are trying to write stand along j-unit tests. Hive uses velocity to turn .q scripts into test and the testing framework diffs the output. > > You should look at the .q files inside > 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 <[EMAIL PROTECTED]> wrote: >> 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. When I try to run it though, I get the error "Cannot overwrite read-only table." Does anybody have a solution for this? >> >> Thanks! >> Shefali > >
-
Re: Hive Unit Tests: Read-Only TableNamit Jain 2012-06-12, 21:13
You cannot change tables which are created by QTestUtil (like src).
On 6/12/12 12:34 PM, "Shefali Vohra" <[EMAIL PROTECTED]> wrote: >Fair enough. So (just to make sure) if I need to create a table to run a >test, I should do so within the .q file itself? > >Thanks so much for your help!! >Shefali > >-----Original Message----- >From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, June 12, 2012 12:30 PM >To: [EMAIL PROTECTED] >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 <[EMAIL PROTECTED]> >wrote: >> Sorry I think my original message was a bit ambiguous and I think my >>error 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 solve this problem? >> >> Thank you! >> Shefali >> >> -----Original Message----- >> From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, June 12, 2012 12:01 PM >> To: [EMAIL PROTECTED] >> Subject: Re: Hive Unit Tests: Read-Only Table >> >> It seems like your are running unit tests in a non-standard way. It >>sounds like your are trying to write stand along j-unit tests. Hive uses >>velocity to turn .q scripts into test and the testing framework diffs >>the output. >> >> You should look at the .q files inside >> 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 <[EMAIL PROTECTED]> >>wrote: >>> 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. When I try >>>to run it though, I get the error "Cannot overwrite read-only table." >>>Does anybody have a solution for this? >>> >>> Thanks! >>> Shefali >> >> > >
-
RE: Hive Unit Tests: Read-Only TableKanna Karanam 2012-06-12, 21:19
Hi Namit, If I understand correctly, she wants to create a new table (Not modifying the existing tables) as part of the test setup to validate her new UDFs. Are there any guidelines on where to create new tables with different data to validate new UDFs?
Thanks, Kanna -----Original Message----- From: Namit Jain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2012 2:13 PM To: [EMAIL PROTECTED] Subject: Re: Hive Unit Tests: Read-Only Table You cannot change tables which are created by QTestUtil (like src). On 6/12/12 12:34 PM, "Shefali Vohra" <[EMAIL PROTECTED]> wrote: >Fair enough. So (just to make sure) if I need to create a table to run >a test, I should do so within the .q file itself? > >Thanks so much for your help!! >Shefali > >-----Original Message----- >From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, June 12, 2012 12:30 PM >To: [EMAIL PROTECTED] >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 <[EMAIL PROTECTED]> >wrote: >> Sorry I think my original message was a bit ambiguous and I think my >>error 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 solve this problem? >> >> Thank you! >> Shefali >> >> -----Original Message----- >> From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, June 12, 2012 12:01 PM >> To: [EMAIL PROTECTED] >> Subject: Re: Hive Unit Tests: Read-Only Table >> >> It seems like your are running unit tests in a non-standard way. It >>sounds like your are trying to write stand along j-unit tests. Hive >>uses velocity to turn .q scripts into test and the testing framework >>diffs the output. >> >> You should look at the .q files inside >> 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 >><[EMAIL PROTECTED]> >>wrote: >>> 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. When I >>>try to run it though, I get the error "Cannot overwrite read-only table." >>>Does anybody have a solution for this? >>> >>> Thanks! >>> Shefali >> >> > >
-
Re: Hive Unit Tests: Read-Only TableNamit Jain 2012-06-12, 21:26
You can create new tables in .q files and then modify them.
The .q file should be self-contained. On 6/12/12 2:19 PM, "Kanna Karanam" <[EMAIL PROTECTED]> wrote: >Hi Namit, If I understand correctly, she wants to create a new table (Not >modifying the existing tables) as part of the test setup to validate her >new UDFs. Are there any guidelines on where to create new tables with >different data to validate new UDFs? > >Thanks, >Kanna > > >-----Original Message----- >From: Namit Jain [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, June 12, 2012 2:13 PM >To: [EMAIL PROTECTED] >Subject: Re: Hive Unit Tests: Read-Only Table > >You cannot change tables which are created by QTestUtil (like src). > > >On 6/12/12 12:34 PM, "Shefali Vohra" <[EMAIL PROTECTED]> wrote: > >>Fair enough. So (just to make sure) if I need to create a table to run >>a test, I should do so within the .q file itself? >> >>Thanks so much for your help!! >>Shefali >> >>-----Original Message----- >>From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, June 12, 2012 12:30 PM >>To: [EMAIL PROTECTED] >>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 <[EMAIL PROTECTED]> >>wrote: >>> Sorry I think my original message was a bit ambiguous and I think my >>>error 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 solve this problem? >>> >>> Thank you! >>> Shefali >>> >>> -----Original Message----- >>> From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >>> Sent: Tuesday, June 12, 2012 12:01 PM >>> To: [EMAIL PROTECTED] >>> Subject: Re: Hive Unit Tests: Read-Only Table >>> >>> It seems like your are running unit tests in a non-standard way. It >>>sounds like your are trying to write stand along j-unit tests. Hive >>>uses velocity to turn .q scripts into test and the testing framework >>>diffs the output. >>> >>> You should look at the .q files inside >>> 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 >>><[EMAIL PROTECTED]> >>>wrote: >>>> 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. When I >>>>try to run it though, I get the error "Cannot overwrite read-only >>>>table." >>>>Does anybody have a solution for this? >>>> >>>> Thanks! >>>> Shefali >>> >>> >> >> > > >
-
RE: Hive Unit Tests: Read-Only TableShefali Vohra 2012-06-12, 21:53
Yep we solved our problem. Thank you so much!!
Shefali -----Original Message----- From: Namit Jain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2012 2:26 PM To: [EMAIL PROTECTED] Subject: Re: Hive Unit Tests: Read-Only Table You can create new tables in .q files and then modify them. The .q file should be self-contained. On 6/12/12 2:19 PM, "Kanna Karanam" <[EMAIL PROTECTED]> wrote: >Hi Namit, If I understand correctly, she wants to create a new table >(Not modifying the existing tables) as part of the test setup to >validate her new UDFs. Are there any guidelines on where to create new >tables with different data to validate new UDFs? > >Thanks, >Kanna > > >-----Original Message----- >From: Namit Jain [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, June 12, 2012 2:13 PM >To: [EMAIL PROTECTED] >Subject: Re: Hive Unit Tests: Read-Only Table > >You cannot change tables which are created by QTestUtil (like src). > > >On 6/12/12 12:34 PM, "Shefali Vohra" <[EMAIL PROTECTED]> wrote: > >>Fair enough. So (just to make sure) if I need to create a table to run >>a test, I should do so within the .q file itself? >> >>Thanks so much for your help!! >>Shefali >> >>-----Original Message----- >>From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >>Sent: Tuesday, June 12, 2012 12:30 PM >>To: [EMAIL PROTECTED] >>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 <[EMAIL PROTECTED]> >>wrote: >>> Sorry I think my original message was a bit ambiguous and I think my >>>error 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 solve this problem? >>> >>> Thank you! >>> Shefali >>> >>> -----Original Message----- >>> From: Edward Capriolo [mailto:[EMAIL PROTECTED]] >>> Sent: Tuesday, June 12, 2012 12:01 PM >>> To: [EMAIL PROTECTED] >>> Subject: Re: Hive Unit Tests: Read-Only Table >>> >>> It seems like your are running unit tests in a non-standard way. It >>>sounds like your are trying to write stand along j-unit tests. Hive >>>uses velocity to turn .q scripts into test and the testing framework >>>diffs the output. >>> >>> You should look at the .q files inside >>> 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 >>><[EMAIL PROTECTED]> >>>wrote: >>>> 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. When I >>>>try to run it though, I get the error "Cannot overwrite read-only >>>>table." >>>>Does anybody have a solution for this? >>>> >>>> Thanks! >>>> Shefali >>> >>> >> >> > > > |