Re: Lag function in Hive

2012-04-10 Thread Nitin Pawar
does your table have column called "rownum"? I think From Philip's mail, it was just an example On Wed, Apr 11, 2012 at 11:13 AM, wrote: > > When I try using rownum in my Hive QL query, I get: "Invalid column > reference rownum". Am I missing something here? > > Regards, > Karan > > > -Orig

Re: Graph/Plotting in Hive/Hadoop

2012-04-10 Thread Nitin Pawar
No. Hive is a query language which provides results in columnar fashion. You can use pentaho, microstrategy , tableu like tools or you can write your own graphing apis using google apis. Thanks, Nitin On Wed, Apr 11, 2012 at 11:20 AM, wrote: > Hi, > > Is there some way I can do graph, plotti

Graph/Plotting in Hive/Hadoop

2012-04-10 Thread karanveer.singh
Hi, Is there some way I can do graph, plotting, etc. within Hive? Are there any UDF's for same? Regards, Karan This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the

RE: Lag function in Hive

2012-04-10 Thread karanveer.singh
When I try using rownum in my Hive QL query, I get: "Invalid column reference rownum". Am I missing something here? Regards, Karan -Original Message- From: David Kulp [mailto:dk...@fiksu.com] Sent: 10 April 2012 20:15 To: user@hive.apache.org Subject: Re: Lag function in Hive New he

RE: Re: cannot start the thrift server

2012-04-10 Thread binhnt22
By default, hive will use derby as a embedded database for metastore. Your command fail because of incorrect metastore configuration. I highly recommend you use mysql as metastore. The detail information will be found at: http://www.mazsoft.com/blog/post/2010/02/01/Setting-up-HadoopHive-to-use-

Re: Re: cannot start the thrift server

2012-04-10 Thread Ashwanth Kumar
Hey ylyy, You are using the default Derby based metastore in your hive configuration. So when you have your HIVE Thrift Server running it locks the metastore_db and hence HIVE CLI cannot connect to it. Quick Fix - Close the Hive Thrift Server and open Hive CLI Long Term Fix - If you have a requi

回复: Re: cannot start the thrift server

2012-04-10 Thread ylyy-1985
thank you very much. now that it's running, I use it to test the sample code first. According to my operation,(with the server is running) I type "./hive" to enter hive console, but when I use "show tables;" the console print out some info: FAILED: Error in metadata: javax.jdo.JDOFatalDataStor

Re: cannot start the thrift server

2012-04-10 Thread binhnt22
IMHO, you should use bridge, so that any other computer in LAN can connect to 192.168.164.128 without problem When the thrift server is running, it’s not like the hive command disable. The console will only produce output when you have a job running through thrift server. If you want to use CL

RE: RE: Re: cannot start the thrift server

2012-04-10 Thread binhnt22
Hi ylyy, What’s OS in your VM? Which network configuration is used in your VM: NAT, bridge, host-only or LAN segment? Answer this may give clue to solve: No route to host. BTW: default username and password is “empty” Connection con = DriverManager.getConnection("jdbc:hive://hiveserverip:1000

回复: RE: Re: cannot start the thrift server

2012-04-10 Thread ylyy-1985
yeah, great,thanks binhnt22. what a fool I am. Hah!! but I get this then. Unable to create log directory /tmp/Administrator 2012-04-11 10:23:15,359 ERROR [main] session.SessionState$LogHelper(277): Unable to create log directory /tmp/Administrator Exception in thread "main" java.sql.SQLException

RE: Re: cannot start the thrift server

2012-04-10 Thread binhnt22
Hi ylyy You should add hadoop-core-*.jar file in hadoop distribution directory into your project Best regards Nguyen Thanh Binh (Mr) From: ylyy-1985 [mailto:ylyy-1...@163.com] Sent: Wednesday, April 11, 2012 9:04 AM To: user Subject: 回复: Re: cannot start the thrift server thanks Bhavesh,

Re: Install hive-jars to local maven repository

2012-04-10 Thread Sam William
Oops. sorry .. . Found multiple repos with hive jars. Thanks Sam On Apr 10, 2012, at 12:37 PM, Edward Capriolo wrote: > Yes hive is in maven. > Is a great site with a search form: > http://mvnrepository.com/artifact/org.apache.hive/hive-common > > On Tue, Apr 10, 2012 at 3:34 PM, Sam William wro

Re: Install hive-jars to local maven repository

2012-04-10 Thread Edward Capriolo
Yes hive is in maven. Is a great site with a search form: http://mvnrepository.com/artifact/org.apache.hive/hive-common On Tue, Apr 10, 2012 at 3:34 PM, Sam William wrote: > Are hive jars available on any public maven repos ? If not, is there a way to > ask ant to install the built jars to my lo

Install hive-jars to local maven repository

2012-04-10 Thread Sam William
Are hive jars available on any public maven repos ? If not, is there a way to ask ant to install the built jars to my local ~/.m2/repository ? Sam William sa...@stumbleupon.com

Re: Web Log Analysis

2012-04-10 Thread Nitin Pawar
as per my knowledge there are no such in build udf, cause log files come as their own formats as required by the organization etc In our case, we just have a log processor system which converts the log file into flat file tabular format which we load later in hive also you can have a mapred job wh

Web Log Analysis

2012-04-10 Thread karanveer.singh
Hi, Are there some UDF's in hive which will allow us to do quick analysis of web logs like click stream, unique visits, etc. Rgds, Karan This e-mail and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable la

RE: Lag function in Hive

2012-04-10 Thread Butani, Harish
Hi Karan, SQL Windowing with Hive(https://github.com/hbutani/SQLWindowing/wiki) maybe a good fit for your use case. We have a lag function and you can say something like From table Partition by col1, col2... Order by col1, col2,... Select colX, (there is a lag example on the wiki, and other

Re: Lag function in Hive

2012-04-10 Thread David Kulp
Yeah. I don't think my SQL would even be accepted because Hive QL doesn't allow the alternate join syntax in the WHERE clause. Thanks Phil. On Apr 10, 2012, at 11:02 AM, Philip Tromans wrote: > I think you want something more like: > > SELECT t2.value - t1.value > FROM mytable t1 > JOIN mytab

Re: Lag function in Hive

2012-04-10 Thread Philip Tromans
I think you want something more like: SELECT t2.value - t1.value FROM mytable t1 JOIN mytable t2 ON (t1.rownum = t2.rownum + 1 AND t2.partition=bar) WHERE t1.partition=foo; This should be faster as partition selection will happen earlier. This is still going to involve an awful lot of I/O, and n

RE: Lag function in Hive

2012-04-10 Thread Hamilton, Robert (Austin)
You can write a custom UDF - Here is one that I have played around with, along with some test SQL. It comes with no warrantee :) Sorry I can't really share the test data, but hopefully you get the idea. To run, compile the Lag class, jar it up into Analytics.jar, put the jar on the CLASSPAT

Re: Lag function in Hive

2012-04-10 Thread David Kulp
You have to explicitly request it in CREATE TABLE. And you should generally let hive perform the clustering -- i.e. don't use an external table with data that is generated by some other process because it's hard to get the hash and notation right. Check your table with "DESCRIBE FORMATTED table

Re: Lag function in Hive

2012-04-10 Thread karanveer.singh
Thanks - I will check this out. Meanwhile, would default clustering happen using rownum? How can I check on how is clustering happening in our environment? Rgds - Original Message - From: David Kulp To: user@hive.apache.org Sent: Tue Apr 10 15:45:25 2012 Subject: Re: Lag function in

Re: Lag function in Hive

2012-04-10 Thread David Kulp
New here. Hello all. Could you try a self-join, possibly also restricted to partitions? E.g. SELECT t2.value - t1.value FROM mytable t1, mytable t2 WHERE t1.rownum = t2.rownum+1 AND t1.partition=foo AND t2.partition=bar If your data is clustered by rownum, then this join should, in theory, be

RE: Lag function in Hive

2012-04-10 Thread karanveer.singh
Makes sense but is not the distribution across nodes for a chunk of records in that order. If Hive cannot help me do this, is there another way I can do this? I tried generating an identifier using the perl script invoked using Hive but it does not seem to work fine. While the stand alone scri

Re: cannot start the thrift server

2012-04-10 Thread Jagat Singh
Hi Can you do #netstat -nl | grep 1 Hive is compatible with 0.20.2 series , not with 1.x series of Hadoop If you start Hive server with Hadoop 0.20 it would work - Original Message - From: ylyy-1985 Sent: 04/10/12 08:33 AM To: user Subject: cannot start the thrift server hi all,

Re: Lag function in Hive

2012-04-10 Thread Philip Tromans
Hi Karan, To the best of my knowledge, there isn't one. It's also unlikely to happen because it's hard to parallelise in a map-reduce way (it requires knowing where you are in a result set, and who your neighbours are and they in turn need to be present on the same node as you which is difficult t

Lag function in Hive

2012-04-10 Thread karanveer.singh
Hi, Is there something like a 'lag' function in HIVE? The requirement is to calculate difference for the same column for every 2 subsequent records. For example. Row, Column A, Column B 1, 10, 100 2, 20, 200 3, 30, 300 The result that I need should be like: Row, Column A, Column B, Result 1

Re: cannot start the thrift server

2012-04-10 Thread Bhavesh Shah
Hello, [root@localhost hive]# hive --service hiveserver Starting Hive Thrift Server After starting Hive Thrift Server nothing get printed on console. This means your server get started. Now you just run your JDBC program and let us know whether it runs or not. -- Regards, Bhavesh Shah On Tue,

Re: Hive query on existing HBase table

2012-04-10 Thread Vishal M. Katkar
It's working great Thanks a lot -Regards Vishal On Tue, Apr 10, 2012 at 1:34 PM, Vishal M. Katkar wrote: > I did wrong deployment, let me check it once again > > Sorry for premature reply > > Regards, > Vishal > > > On Tue, Apr 10, 2012 at 1:20 PM, Vishal M. Katkar wrote: > >> Checked-out the f

Re: Hive query on existing HBase table

2012-04-10 Thread Vishal M. Katkar
I did wrong deployment, let me check it once again Sorry for premature reply Regards, Vishal On Tue, Apr 10, 2012 at 1:20 PM, Vishal M. Katkar wrote: > Checked-out the following branch > svn checkout http://svn.apache.org/repos/asf/hive/trunk trunk > > Still facing the same issue. > > *Created

Re: Hive query on existing HBase table

2012-04-10 Thread Vishal M. Katkar
Checked-out the following branch svn checkout http://svn.apache.org/repos/asf/hive/trunk trunk Still facing the same issue. *Created Hive table with following command:* CREATE EXTERNAL TABLE myTable(key STRING, fileName STRING) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SER