Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Previous writer likely failed to write hdfs://localhost:8020/tmp/hive/hadoop/_tez_session_dir/39ba9c15-d9ed-4582-a4ce-11ae8b

2015-06-03 Thread Sateesh Karuturi
I am using *hive 1.0.0* and *apache tez 0.5.2* When I configure hive to use tez I get an exception. In *hive-site.xml* when the *hive.execution.engine* value is mr its works fine. But if I set it to tez I get this error: Exception in thread "main" java.lang.RuntimeException: java.io.IOException:

Hive 0.14: impersonation not working without system property

2015-06-03 Thread Lonikar, Kiran
Hi, While executing hive queries through CliDriver, we are getting permission denied error on scratch dir when executing with impersonation. The error goes away when the system property HADOOP_PROXY_USER is set to the the proxy/impersonated user name. Attaching the sample program to reproduce

Re: Query in HQL

2015-06-03 Thread Ankit Bhatnagar
My bad .. i looked up the code and hive really transforms everything to lower case. On Wednesday, June 3, 2015 10:02 PM, Renuka Be wrote: Hi Ankit, Thanks for your reply. I have tried as you suggested it throws below error. FAILED: ParseException line 1:21 cannot recognize input ne

Re: Query in HQL

2015-06-03 Thread Renuka Be
Hi Ankit, Thanks for your reply. I have tried as you suggested it throws below error. FAILED: ParseException line 1:21 cannot recognize input near 'as' ''CustomerId'' 'from' in selection target Query: select customerid as 'CustomerId' from Customers Regards, Renuka On Thu, Jun 4, 2015 at 12:4

Re: Query in HQL

2015-06-03 Thread Ankit Bhatnagar
modify to say > 'CustomerId' On Wednesday, June 3, 2015 9:44 PM, Renuka Be wrote: Hi Folks, Here is my query, select customerid as CustomerId  from Customers It returns table with column name as 'customerid', ' CustomerId' in the query was not reflected into table. What shall i

Query in HQL

2015-06-03 Thread Renuka Be
Hi Folks, Here is my query, select customerid as CustomerId from Customers It returns table with column name as 'customerid', ' CustomerId' in the query was not reflected into table. What shall i do to display column name as 'CustomerId'. Regards, Renuka

Re: Group by query

2015-06-03 Thread Ravisankar Mani
Hi Bhagwan, Thanks for your response... Is there any possible to use aggregated and non aggregated columns in hive query to get data without using group by? Regards, Ravi On Wed, Jun 3, 2015 at 10:24 AM, Bhagwan S. Soni wrote: > Ravishankar, > > below query will w

Re: Top N query

2015-06-03 Thread Ravisankar Mani
Hi gopal, Thanks for your response. I does't understand about your solution. Could you please provide exact query? Regards, Ravi On Wed, Jun 3, 2015 at 2:23 PM, Gopal Vijayaraghavan wrote: > Hi, > > This particular case can be handled by a special case of the inner > equijoin. > > > ( recom

how ALTER statement affects reading the ORC files before table schema change

2015-06-03 Thread Jie Zhang
Hi, Experts, We have an application which creates a ORC table in hive to store the events. The table schema needs to be changed dynamically since new data adds more new columns (append only). We noticed the application needs to use alter table to change the table schema before loading the new data

When using ORC, how to confirm Stipes/row-groups are being skipped ?

2015-06-03 Thread chandan sheth
Hi Community, While using ORC file format, I would like to see in the logs that stripes and/or row-groups are being skipped based on my where clause. I don't see skip-messages it in the logs. Is that info even outputted ? If so, what do I need to enable it ? Thank you, *Chandan*

Re: Top N query

2015-06-03 Thread Gopal Vijayaraghavan
Hi, This particular case can be handled by a special case of the inner equijoin. > ( recommend_ratings2.movieid = T_0.movieid_0 or >((recommend_ratings2.movieid IS NULL) AND (T_0.movieid_0 IS NULL))) Can be rewritten as a null-safe equi-join (i.e where movieid <=> movieid_0, which is not SQL se

connection pooling for hive JDBC client

2015-06-03 Thread McWhorter, David
Hello, I am working on an application that queries and interacts with hive using the JDBC API. In many other cases, using a JDBC connection pool such as commons-dbcp or BoneCP or HikariCP is a recommended practice and results in much better performance. All of the examples I’ve found of using

Re: current_date function in hive

2015-06-03 Thread Ayazur Rehman
Hi everyone, Thanks for the responses. My problem is solved now. I was not using the proper version of hive to be able to use the current_date function. Thanks Gopal for the UDF link. I beleive I will have to add the udf to the hiveserver2 in order to be able to run the query using Oozie. On Tue,

Re: HIve Joins vs Pig Joins

2015-06-03 Thread Alan Gates
These results are fairly old. Both Hive and Pig have changed significantly since then. Many of Hive's internal operators have been rewritten. Both can now run over Tez or Spark. So at this point it's hard to say which is better. The best option is to develop some tests based on your use ca

Re: Hive Query

2015-06-03 Thread João Alves
Hey all, Has anyone else also found the coalesce function to be prone to some weird behaviours? e.g.1: Giving null when it shouldn’t. e.g.2: I had to change a coalesce(v1,v2,v3) to coalesce(v1,v2,v3,null) (???) otherwise the query would crash! Regards, João Alves > On 03 Jun 2015, at 17:00

Re: Hive Query

2015-06-03 Thread gabriel balan
Hi If(ISNOTNULL(sum(columnname), sum(columnname),0) as sumVendor Or *coalesce( sum(columnname),0) as ...* As explained here , COALESCE(T v1, T v2, ...) Returns the first v that is not NULL, or NULL if all v's are NULL

Re: Group by query

2015-06-03 Thread Bhagwan S. Soni
Ravishankar, below query will works fine without including group by SELECT COUNT(adventurepersoncontacts.contactid) as contact FROM default.adventurepersoncontacts But when you are planning to get aggregated column with non-aggregated column you have to specify the level of aggregation. Why d

Re: Null condition hive query

2015-06-03 Thread Bhagwan S. Soni
Why don't you try IF(column_name IS NULL, 0) AS column_name; After this you can perform your aggregation on top of this. On Wed, Jun 3, 2015 at 11:16 AM, Ravisankar Mani wrote: > Hi Everyone, > > I need to check condition measure value is null or not. If it is null is > then replace 0 otherwis

Re: HIve Joins vs Pig Joins

2015-06-03 Thread DU DU
Are Tez, CBO, and ORC are considered in this. With so much efforts invested to Hive especially from Hortonworks and Cloudera, I think Hive will have the future, such as Hive over spark and so on. On Wed, Jun 3, 2015 at 12:06 AM, Ritesh Kumar Singh < riteshoneinamill...@gmail.com> wrote: > Check t

RE: Top N query

2015-06-03 Thread Arpita SINGH
That is the point , actually each Hive query is transformed into a MapReduce Program which can easily evaluate an EQUIJOIN ( which permits only equality condition ) . Till recently as far as I know Hive supported only EquiJoins , other joins were not supported decently because transforming them

Re: Top N query

2015-06-03 Thread Ravisankar Mani
Hi Arpita, Inner join working perfectly. But the 'or' condition not supported in inner join. Regards Ravi On Wed, Jun 3, 2015 at 6:39 AM, Arpita SINGH wrote: > Is Inner Join supported by the Hive version you are using ? > > > > Regards > > Arpita Singh > > > > *From:* Ravisank

RE: Top N query

2015-06-03 Thread Arpita SINGH
Is Inner Join supported by the Hive version you are using ? Regards Arpita Singh From: Ravisankar Mani [mailto:rrav...@gmail.com] Sent: Wednesday, June 03, 2015 11:29 AM To: user@hive.apache.org Subject: Top N query Hi everyone, "FAILED: SemanticException [Error 10019]: Line 9:5 O

Group by query

2015-06-03 Thread Ravisankar Mani
Hi everyone, I have selected specific column using aggregation ." FAILED: SemanticException [Error 10002]: Line 2:26 Invalid column reference 'contactid " . Exception occur while executing following query. But it working in sql server without using group by. Kindly refer the query. S

Top N query

2015-06-03 Thread Ravisankar Mani
Hi everyone, "FAILED: SemanticException [Error 10019]: Line 9:5 OR not supported in JOIN currently 'movieid_0' " Exception occur while executing the following query. But i need the add the conditions. Kindly help other way to resolve the query. Please refer the following query

MetaException(message:java.security.AccessControlException: Permission denied

2015-06-03 Thread patcharee
Hi, I was running a spark job to insert overwrite hive table and got Permission denied. My question is why spark job did the insert by using user 'hive', not myself who ran the job? How can I fix the problem? val hiveContext = new HiveContext(sc) import hiveContext.implicits._ hiveContext.sql