Re: Restoring configuration variables after issuing "set"

2011-03-12 Thread Edward Capriolo
On Sat, Mar 12, 2011 at 1:46 PM, Tim Robertson wrote: > Hi all > > Can someone please tell me how to achieve the following in a single hive > script? > > set original_value = mapred.reduce.tasks; > set mapred.reduce.tasks=1; > ... do stuff > set mapred.reduce.tasks=original_value; > > It is the f

Restoring configuration variables after issuing "set"

2011-03-12 Thread Tim Robertson
Hi all Can someone please tell me how to achieve the following in a single hive script? set original_value = mapred.reduce.tasks; set mapred.reduce.tasks=1; ... do stuff set mapred.reduce.tasks=original_value; It is the first and last lines that don't work - is it possible? Thanks, Tim

Restoring configuration variables after issuing "set"

2011-03-12 Thread Tim Robertson
Hi all Can someone please tell me how to achieve the following in a single hive script? set original_value = mapred.reduce.tasks; set mapred.reduce.tasks=1; ... do stuff set mapred.reduce.tasks=original_value; It is the first and last lines that don't work - is it possible? Thanks, Tim

Re: UDAF documentation

2011-03-12 Thread Aurora Skarra-Gallagher
No problem. Yeah, I called init first for each instance. -Aurora On Mar 11, 2011, at 11:35 PM, "Christopher, Pat" wrote: > Hey sorry, I was moving house all evening and driving around town :) > > I did not automate my unit tests, I created a small frame app to test each > function and make s

Syntax for using json_tuple() for accessing array elements in JSON

2011-03-12 Thread A A
Hi All, Iam using hive-0.7.0. I want to use some like : eg: select a.timestamp, b.* from log a lateral view json_tuple(a.appevent, 'eventid', 'eventname') b as f1, f2; For array elements in JSON. So I tried something like json_tuple(a.appevent, 'arr[0].property1', 'arr[1].property1'). Howev