Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread Sai Sai
Just wondering if anyone has any suggestions: This executes successfully: hive select * from twitter limit 5; This does not work: hive select tweet_id from twitter limit 5; // I have given the exception info below: Here is the output of this: hive select * from twitter limit 5; OK

Re: Error while table creation

2013-03-10 Thread Ramki Palle
Please use if not exists clause and let us know if it works. I am wondering if a table exists already in your database with the same name. -Ramki. On Sat, Mar 9, 2013 at 11:23 PM, Abhishek Gayakwad a.gayak...@gmail.comwrote: it is an old installation, we recently upgraded hive 0.7.0 to 0.9.0

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread john smith
Hi, It clearly is a classpath issue! When you do a select * from tab , it works because HIve just fetches the data from HDFS using a FetchTask and doesn't start any MR job (It probably uses json jar in your local hive lib directory to deserialize and limit the rows to 5 and hence not raising

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread Ramki Palle
When you execute the following query, hive select * from twitter limit 5; Hive runs it in local mode and not use MapReduce. For the query, hive select tweet_id from twitter limit 5; I think you need to add JSON jars to overcome this error. You might have added these in a previous session. If

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread Sai Sai
Ramki/John Many Thanks, that really helped. I have run the add jars in the new session and it appears to be running. However i was wondering about by passing MR, why would we do it and what is the use of it. Will appreciate any input. Thanks Sai From: Ramki

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread Ramki Palle
Well, you get the results faster. Please check this: https://cwiki.apache.org/Hive/gettingstarted.html#GettingStarted-Runtimeconfiguration Under section Hive, Map-Reduce and Local-Mode, it says This can be very useful to run queries over small data sets - in such cases local mode execution

Re: Error while table creation

2013-03-10 Thread Dean Wampler
If you upgrade Hive, you have to do a upgrade/migration on the metastore database. There are scripts that come with hive distributions for this. If you're starting from scratch, you could just drop the old database. On Sun, Mar 10, 2013 at 1:23 AM, Abhishek Gayakwad a.gayak...@gmail.comwrote:

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread bejoy_ks
Hi Sai Local mode is just for trials, for any pre prod/production environment you need MR jobs. Hive under the hood stores data in HDFS (mostly) and definitely we use hadoop/hive for larger data volumes. So MR should be in there to process them. Regards Bejoy KS Sent from remote device,

Hive Query how to : group by and UDTF on the resulting records

2013-03-10 Thread vivek thakre
Hello, I have a table with userid, movieId and some more columns say c1, c2, c3 I want to group the records by userId and then do some processing on those records (for each user) and output less number of records (or same number of records) based on some logic. The processing involves

UDFs and Thread Safety?

2013-03-10 Thread Shaun Clowes
Hi All, Could anyone describe what the required thread safety for a UDF is? I understand that one is instantiated for each use of the function in an expression, but can there be multiple threads executing the methods of a single UDF object at once? Thanks, Shaun

Re: java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathUtil

2013-03-10 Thread Sai Sai
Many Thanks Guys, you guys r really helpful. Really appreciate it. Thanks Sai From: bejoy...@yahoo.com bejoy...@yahoo.com To: user@hive.apache.org; Sai Sai saigr...@yahoo.in Sent: Sunday, 10 March 2013 12:06 PM Subject: Re: java.lang.NoClassDefFoundError:

Re: UDFs and Thread Safety?

2013-03-10 Thread Nagarjuna Kanamarlapudi
Yes , in a map only query your udf will be executed at the mapper side. I don't know how you can make your udf thread safe.  But what I do set the number of reducers to 1 and make sure that I write a query which has both map and reduce.  Then the udf will be executed at the reduce phase and

Re: UDFs and Thread Safety?

2013-03-10 Thread Dean Wampler
Hadoop tasks use a single thread, so there won't be multiple threads accessing the UDF. However, there's a flip side of thread safety if your UDF maintains state; is it receiving all the data it should or is the data being sharded over multiple processes in a way that defeats the UDF? My favorite

how to handle variable format data of text file?

2013-03-10 Thread 周梦想
I have files like this: 03/11/13 10:59:52 0ec0 1009 180538126 92041 2300 0 0 7 21|47|20|33|11 0:2775 03/11/13 10:59:52 0744 1010 178343610 92042 350 1 0 -1 NULL NULL 22 45 the format is separated by blank space: date time threadid gid userid [variable formated data grouped by fields

Re: hive issue with sub-directories

2013-03-10 Thread Suresh Krishnappa
Hi Mark, I am using external table in HIVE. This is how I am adding the partition alter table mytable add partition (pt=1) location '/test/a/'; I am able to run HIVE queries only if '/test/a/b' folder is deleted. How can I retain this folder structure and still issue queries? Thanks Suresh