Hive Server2 thrift java client

2013-05-24 Thread Ghousia
Hi, Has anyone explore on thrift java client for HiveServer2? I have a java client in place which connects to HiveServer2 and gets table details. What I am yet to figure out is how to read the actual table content. How to get handle on table's storage descriptor. ThriftCLIServiceClient do not pr

Re: Difference between like %A% and %a%

2013-05-24 Thread Sai Sai
Just wondering about this, please let me know if you have any suggestions why we r getting these results: This  query does not return any data: Query1:hive (test)> select full_name from states where abbreviation like '%a%'; But this query returns data successfully: Query2:hive (test)> selec

Re: Difference between like %A% and %a%

2013-05-24 Thread Jov
2013/5/24 Sai Sai > abbreviation l unlike MySQL, string in Hive is case sensitive,so '%A%' is not equal with '%a%'. -- Jov blog: http:amutu.com/blog

Re: Where can we see the results of Select * from states

2013-05-24 Thread Sai Sai
I have created an external table called states under a database called test, Then loaded the table successfully; The i have tried: Select * from states; It successfully executes MR and displays the results in the console but wondering where to look in hdfs to see these results. I have looked un

Re: Where to find the external table file in HDFS

2013-05-24 Thread Sai Sai
I have created an external table states and loaded it from a file under /tmp/states.txt Then in the url:  http://localhost.localdomain:50070/dfshealth.jsp I have looked to see if this file states table exists and do not see it. Just wondering if it is saved in hdfs or not. How many days will t

Re: Where can we see the results of Select * from states

2013-05-24 Thread Jov
you can write data into filesystem from query using "INSERT OVERWRITE [LOCAL] DIRECTORY directory1 SELECT ... FROM ..." more detail: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Writingdataintofilesystemfromqueries 2013/5/24 Sai Sai > I have created an

Re: Difference between like %A% and %a%

2013-05-24 Thread Sai Sai
But it should get more results for this: %a% than for %A% Please let me know if i am missing something. Thanks Sai From: Jov To: user@hive.apache.org; Sai Sai Sent: Friday, 24 May 2013 4:39 PM Subject: Re: Difference between like %A% and %a% 2013/5/

Re: How to look at the metadata of the tables we have created.

2013-05-24 Thread Sai Sai
Is it possible to look at the metadata of the databases/tables/views we have created in hive. Is there some thing like sysobjects in hive. Thanks Sai

Re: Difference between like %A% and %a%

2013-05-24 Thread Dean Wampler
Your where clause looks at the abbreviation, requiring 'A', not the state name. You got the correct answer. On Fri, May 24, 2013 at 6:21 AM, Sai Sai wrote: > But it should get more results for this: > > %a% > > than for > > %A% > > Please let me know if i am missing something. > Thanks > Sai >

Re: Difference between like %A% and %a%

2013-05-24 Thread John Omernik
I have mentioned this before, and I think this a big miss by the Hive team. Like, by default in many SQL RDBMS (like MSSQL or MYSQL) is not case sensitive. Thus when you have new users moving over to Hive, if they see a command like "like" they will assume similarity (like many other SQL like qua

Re: Difference between like %A% and %a%

2013-05-24 Thread Dean Wampler
Hortonworks has announced plans to make Hive more SQL compliant. I suspect bugs like this will be addressed sooner or later. It will be necessary to handle backwards compatibility, but that could be handled with a hive property that enables one or the other behaviors. On Fri, May 24, 2013 at 8:07

Re: Difference between like %A% and %a%

2013-05-24 Thread Edward Capriolo
It is not really a bug, as must as it is the way hive is designed. https://issues.apache.org/jira/browse/HIVE-4070#comment-13666362 So there already is a 'like' and an 'rlike', mlike is a good idea. It seems like an easier UDF (low hanging fruit) type issue anyone could tackle. On Fri, May 24,

Re: Difference between like %A% and %a%

2013-05-24 Thread Edward Capriolo
Also I am thinking that the rlike is based on regex and can be told to do case insensitive matching. On Fri, May 24, 2013 at 9:16 AM, Dean Wampler wrote: > Hortonworks has announced plans to make Hive more SQL compliant. I suspect > bugs like this will be addressed sooner or later. It will be n

how to load data from SequenceFile(with Snappy compression) into hive

2013-05-24 Thread Ramesh R N
Hi, I had been trying to import data from a sequence-file stored in HDFS, compressed with Snappy. (the original file is a massive-log file). I had created the tables in hive-metastore(MySQL) and installed Snappy and tried several approaches: 1. gave the direct path with "hdfs://" prefix 2

Re: Difference between like %A% and %a%

2013-05-24 Thread Dean Wampler
If backwards compatibility wasn't an issue, the hive code that implements LIKE could be changed to convert the fields and LIKE strings to lower case before comparing ;) Of course, there is overhead doing that. On Fri, May 24, 2013 at 9:50 AM, Edward Capriolo wrote: > Also I am thinking that the r

Re: Difference between like %A% and %a%

2013-05-24 Thread Edward Capriolo
It is not as simple of a problem as you think. Mysql has the same problem just most everyone uses a default charset and comparator. http://www.bluebox.net/about/blog/2009/07/mysql_encoding/ You do you account for foreign characters like the a~ etc. is that > then A and less then < On Fri, May 2

OrcFile writing failing with multiple threads

2013-05-24 Thread Andrew Psaltis
All, I have a test application that is attempting to add rows to an OrcFile from multiple threads, however, every time I do I get exceptions with stack traces like the following: java.lang.IndexOutOfBoundsException: Index 4 is outside of 0..5 at org.apache.hadoop.hive.ql.io.orc.DynamicIntArray.g

Re: Difference between like %A% and %a%

2013-05-24 Thread Anthony Urso
Postgres/Vertica and their ilk have ILIKE which is a case-insensitive version of LIKE, in addition to the case-sensitive LIKE. Works well having both. Cheers, Anthony On Fri, May 24, 2013 at 8:58 AM, Edward Capriolo wrote: > It is not as simple of a problem as you think. Mysql has the same prob

Re: OrcFile writing failing with multiple threads

2013-05-24 Thread Owen O'Malley
Currently, ORC writers, like the Java collections API don't lock themselves. You should synchronize on the writer before adding a row. I'm open to making the writers synchronized. -- Owen On Fri, May 24, 2013 at 11:39 AM, Andrew Psaltis < andrew.psal...@webtrends.com> wrote: > All, > I have a

Re: OrcFile writing failing with multiple threads

2013-05-24 Thread Andrew Psaltis
Here is a snippet from the file header comment the WriterImpl for ORC: /** * This class is synchronized so that multi-threaded access is ok. In * particular, because the MemoryManager is shared between writers, this class * assumes that checkMemory may be called from a separate thread. *

Apache Flume Properties File

2013-05-24 Thread Raj Hadoop
Hi,   I just installed Apache Flume 1.3.1 and trying to run a small example to test. Can any one suggest me how can I do this? I am going through the documentation right now.   Thanks, Raj

Re: How to look at the metadata of the tables we have created.

2013-05-24 Thread Stephen Sprague
yes. there's this high faluntin' concept called the 'metastore'. should you google it in conjunction with 'hive' the answer shall be before you. On Fri, May 24, 2013 at 4:30 AM, Sai Sai wrote: > Is it possible to look at the metadata of the databases/tables/views we > have created in hive. >

Re: Apache Flume Properties File

2013-05-24 Thread Stephen Sprague
so you spammed three big lists there, eh? with a general question for somebody to serve up a solution on a silver platter for you -- all before you even read any documentation on the subject matter? nice job and good luck to you. On Fri, May 24, 2013 at 2:13 PM, Raj Hadoop wrote: > Hi, > > I j

Re: Apache Flume Properties File

2013-05-24 Thread Raj Hadoop
Hi, When I am reading all the stuff on internet on Flume, everything is mostly on CDH distribution. I am aware that Flume is Cloudera's contribution but I am using a strict Apache version in my research work. When I was reading all this, I want to make sure from the forum that Apache flume if ha

Re: Hive Server2 thrift java client

2013-05-24 Thread Prasad Mujumdar
Hi Ghousia, You might want to look at the JDBC2 driver code as an example of handling the HiveServer2 thrift API in Java. The HiveServer2 thrift interface doesn't expose storage descriptor or partitions. This interface is more aligned with JDBC/ODBC spec for data and metadata operations. than