[jira] [Created] (HIVE-13600) LLAP: Web service selector channel thread is getting completely blocked

2016-04-23 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-13600:


 Summary: LLAP: Web service selector channel thread is getting 
completely blocked
 Key: HIVE-13600
 URL: https://issues.apache.org/jira/browse/HIVE-13600
 Project: Hive
  Issue Type: Bug
Affects Versions: 2.1.0
Reporter: Prasanth Jayachandran


With pre-emption enabled, 4 executors and with wait queue size of 8. Repeatedly 
running tcpds queries 27 and 5 on scale 2 resulted in deadlock. 
Not sure about the cause yet. Yourkit profile shows llap web selector channel 
thread being blocked. See attached image



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-13599) LLAP: Race condition when wait queue pre-emption is enabled

2016-04-23 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-13599:


 Summary: LLAP: Race condition when wait queue pre-emption is 
enabled
 Key: HIVE-13599
 URL: https://issues.apache.org/jira/browse/HIVE-13599
 Project: Hive
  Issue Type: Bug
  Components: llap
Affects Versions: 2.1.0
Reporter: Prasanth Jayachandran
Assignee: Prasanth Jayachandran


When running some tests with pre-emption enabled, got the following exception

Looks like a race condition when removing items from pre-emption queue.
{code}
16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] ERROR impl.TaskExecutorService : 
Wait queue scheduler worker exited with failure!
java.util.NoSuchElementException
at java.util.AbstractQueue.remove(AbstractQueue.java:117) ~[?:1.7.0_55]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.removeAndGetFromPreemptionQueue(TaskExecutorService.java:568)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.handleScheduleAttemptedRejection(TaskExecutorService.java:493)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.access$1100(TaskExecutorService.java:81)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$WaitQueueWorker.run(TaskExecutorService.java:285)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
~[?:1.7.0_55]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_55]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[?:1.7.0_55]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[?:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55]
16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] INFO impl.LlapDaemon : 
UncaughtExceptionHandler invoked
16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] ERROR impl.LlapDaemon : Thread 
Thread[Wait-Queue-Scheduler-0,5,main] threw an Exception. Shutting down now...
java.util.NoSuchElementException
at java.util.AbstractQueue.remove(AbstractQueue.java:117) ~[?:1.7.0_55]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.removeAndGetFromPreemptionQueue(TaskExecutorService.java:568)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.handleScheduleAttemptedRejection(TaskExecutorService.java:493)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.access$1100(TaskExecutorService.java:81)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$WaitQueueWorker.run(TaskExecutorService.java:285)
 ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
~[?:1.7.0_55]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_55]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[?:1.7.0_55]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[?:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55]
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-13598) Describe extended table should show the primary keys/foreign keys associated with the table

2016-04-23 Thread Hari Sankar Sivarama Subramaniyan (JIRA)
Hari Sankar Sivarama Subramaniyan created HIVE-13598:


 Summary: Describe extended table should show the primary 
keys/foreign keys associated with the table
 Key: HIVE-13598
 URL: https://issues.apache.org/jira/browse/HIVE-13598
 Project: Hive
  Issue Type: Bug
Reporter: Hari Sankar Sivarama Subramaniyan
Assignee: Hari Sankar Sivarama Subramaniyan


After HIVE-13290 is committed, we need to show the constraints as part of table 
description when extended label is used. Currently, the constraints would not 
be shown as part of table description since Constraint is a separate entity.
The purpose of the jira is to modify Hive.describeTable() to enable the user to 
view the constraints associated with the table when the user does a "describe 
extended table";



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread pengcheng xiong


> On April 6, 2016, 10:37 p.m., Ashutosh Chauhan wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g, lines 321-328
> > 
> >
> > We should not reserve these KWs, as this may cause backward 
> > compatibility issue.

According to 
http://www.postgresql.org/docs/9.2/static/sql-keywords-appendix.html, primary, 
foreign, REFERENCES, CONSTRAINT are a reserved key word. So we can reserve all 
of them and add them under "sql11ReservedKeywordsUsedAsIdentifier" in 
IdenfiersParser.g for backward compatibility. For the rest of them, KEY, 
NOVALIDATE, RELY NORELY, we should put them under "nonReserved" in 
IdenfiersParser.g


- pengcheng


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/#review127479
---


On April 23, 2016, 8:20 p.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45274/
> ---
> 
> (Updated April 23, 2016, 8:20 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Support primary keys/foreign keys constraint as part of create table command 
> in Hive
> 
> 
> Diffs
> -
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ae6f084 
>   ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
> 19342a8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
> 549d24f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
>   ql/src/test/queries/clientnegative/create_with_constraints_duplicate_name.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
>   
> ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
>  PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/create_with_constraints.q.out 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45274/diff/
> 
> 
> Testing
> ---
> 
> Local testing done
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Ashutosh Chauhan


> On April 23, 2016, 5:45 p.m., Ashutosh Chauhan wrote:
> > ql/src/test/queries/clientpositive/create_with_constraints.q, line 2
> > 
> >
> > Please add describe statement for all tables. They should list all 
> > constraints of table.
> 
> Hari Sankar Sivarama Subramaniyan wrote:
> This is not trivial with the current implementation. The constraints are 
> a separate entity altogether and not part of the Table. I need to make some 
> changes to DDLTask.describeTable() to support this(fetch primarykeys, 
> foreignkeys for the table and update the metadataformatter implementation to 
> show this information when in extended mode). Would be good to get the 
> current changes in and do this in a follow-up jira?

Ok.. lets do this in a follow-up.


- Ashutosh


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/#review130263
---


On April 23, 2016, 8:20 p.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45274/
> ---
> 
> (Updated April 23, 2016, 8:20 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Support primary keys/foreign keys constraint as part of create table command 
> in Hive
> 
> 
> Diffs
> -
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ae6f084 
>   ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
> 19342a8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
> 549d24f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
>   ql/src/test/queries/clientnegative/create_with_constraints_duplicate_name.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
>   
> ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
>  PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/create_with_constraints.q.out 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45274/diff/
> 
> 
> Testing
> ---
> 
> Local testing done
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Ashutosh Chauhan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/#review130271
---




ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out 
(line 13)


Seems like useful error message is lost. But I think its a generic problem 
with metastore server/client exception handling and message propagation. Lets 
investigate how to do better on this in follow-up. Seems like excpetion parsing 
logic of RetryingMetaStoreClient::invoke() needs to be updated.


- Ashutosh Chauhan


On April 23, 2016, 8:20 p.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45274/
> ---
> 
> (Updated April 23, 2016, 8:20 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Support primary keys/foreign keys constraint as part of create table command 
> in Hive
> 
> 
> Diffs
> -
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ae6f084 
>   ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
> 19342a8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
> 549d24f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
>   ql/src/test/queries/clientnegative/create_with_constraints_duplicate_name.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
>   
> ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
>  PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/create_with_constraints.q.out 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45274/diff/
> 
> 
> Testing
> ---
> 
> Local testing done
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Hari Sankar Sivarama Subramaniyan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/
---

(Updated April 23, 2016, 8:20 p.m.)


Review request for hive and Ashutosh Chauhan.


Repository: hive-git


Description
---

Support primary keys/foreign keys constraint as part of create table command in 
Hive


Diffs (updated)
-

  metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java ae6f084 
  ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 19342a8 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
  ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
549d24f 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
  ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
  ql/src/test/queries/clientnegative/create_with_constraints_duplicate_name.q 
PRE-CREATION 
  ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
PRE-CREATION 
  ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
PRE-CREATION 
  ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
  
ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out 
PRE-CREATION 
  ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
PRE-CREATION 
  ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
PRE-CREATION 
  ql/src/test/results/clientpositive/create_with_constraints.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/45274/diff/


Testing
---

Local testing done


Thanks,

Hari Sankar Sivarama Subramaniyan



Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Hari Sankar Sivarama Subramaniyan


> On April 23, 2016, 5:45 p.m., Ashutosh Chauhan wrote:
> > ql/src/test/queries/clientpositive/create_with_constraints.q, line 2
> > 
> >
> > Please add describe statement for all tables. They should list all 
> > constraints of table.

This is not trivial with the current implementation. The constraints are a 
separate entity altogether and not part of the Table. I need to make some 
changes to DDLTask.describeTable() to support this(fetch primarykeys, 
foreignkeys for the table and update the metadataformatter implementation to 
show this information when in extended mode). Would be good to get the current 
changes in and do this in a follow-up jira?


- Hari Sankar


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/#review130263
---


On April 23, 2016, 7:17 a.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45274/
> ---
> 
> (Updated April 23, 2016, 7:17 a.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Support primary keys/foreign keys constraint as part of create table command 
> in Hive
> 
> 
> Diffs
> -
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ae6f084 
>   ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
> 19342a8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
> 549d24f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
>   ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/create_with_constraints.q.out 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45274/diff/
> 
> 
> Testing
> ---
> 
> Local testing done
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Ashutosh Chauhan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/#review130263
---




metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (line 1050)


You are already inside transaction as part of dropTable(), no need for 
opening/closing Txn here.



ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (lines 
646 - 649)


Please update comments as per latest grammar.



ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (lines 
720 - 724)


Update comments.



ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g (line 2029)


I wonder if you could just have this rule as KW_PRIMARY KW_KEY 
columnParenthesesList

is there a reason not to do it that way? 
Otherwise, in what condition else part of production is valid?



ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g (line 2038)


same comment as previous.



ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g (line 2047)


here as well.



ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g (line 2056)


and here.



ql/src/test/queries/clientnegative/create_with_constraints_validate.q (line 1)


Can you add a -ve test case where table is created with existing constriant 
name?



ql/src/test/queries/clientpositive/create_with_constraints.q (line 2)


Please add describe statement for all tables. They should list all 
constraints of table.



ql/src/test/queries/clientpositive/create_with_constraints.q (line 3)


Can you add a test case for rely/no-rely? Both should succeed.


- Ashutosh Chauhan


On April 23, 2016, 7:17 a.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45274/
> ---
> 
> (Updated April 23, 2016, 7:17 a.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Support primary keys/foreign keys constraint as part of create table command 
> in Hive
> 
> 
> Diffs
> -
> 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ae6f084 
>   ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
> 19342a8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
> 549d24f 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
>   ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
> PRE-CREATION 
>   ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/create_with_constraints.q.out 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45274/diff/
> 
> 
> Testing
> ---
> 
> Local testing done
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



HiveServer2 throws an exception when parsing invalid syntaxes. Is this the right action?

2016-04-23 Thread Takuma Wakamori
Hi all,

This is my first post to developers' mailing list.

I have a question about the behavior of HiveServer2.
When HiveServer2 parse invalid syntaxes sent from beeline2, it prints an
ParseException in console output.

Example code is below.

--
Input:
hostA$ hiveserver2
hostB$ beeline -u jdbc:hive2://localhost:1 -n user -p pass -e "invalid
syntax;"

Output:
hostA$ NoViableAltException(26@[])

   [0/1248]
at
org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1108)
at
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:204)
at
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:444)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:319)
at
org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1199)
at
org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1186)
at
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:146)
at
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:218)
...
FAILED: ParseException line 1:0 cannot recognize input near 'invalid'
'syntax' ''
=> Is it correct?

hostB$ Error: Error while compiling statement: FAILED: ParseException line
1:0 cannot recognize input near 'invalid' 'syntax' ''
(state=42000,code=4)
=> correct.
--

I feel strange about this behavior that it throws exception, because the
input text is invalid syntax but isn't an unexpected input.

Is this correct design? If not, I will create the JIRA ticket and address
this issue to suppress the exception output.

Thanks!
-- 
Takuma Wakamori
wakamori.tak...@gmail.com


Re: Review Request 45274: HIVE-13290 : Support PK/FK constraint as part of create table command

2016-04-23 Thread Hari Sankar Sivarama Subramaniyan

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45274/
---

(Updated April 23, 2016, 7:17 a.m.)


Review request for hive and Ashutosh Chauhan.


Changes
---

Incorporated Pengcheng's comments.


Repository: hive-git


Description
---

Support primary keys/foreign keys constraint as part of create table command in 
Hive


Diffs (updated)
-

  metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java ae6f084 
  ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f091f67 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b26f09d 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 4c9acce 
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 19342a8 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g dd997f0 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 50c53db 
  ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g a192fa7 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java 
549d24f 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 005b53f 
  ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java 03b4d8b 
  ql/src/test/queries/clientnegative/create_with_constraints_enable.q 
PRE-CREATION 
  ql/src/test/queries/clientnegative/create_with_constraints_validate.q 
PRE-CREATION 
  ql/src/test/queries/clientpositive/create_with_constraints.q PRE-CREATION 
  ql/src/test/results/clientnegative/create_with_constraints_enable.q.out 
PRE-CREATION 
  ql/src/test/results/clientnegative/create_with_constraints_validate.q.out 
PRE-CREATION 
  ql/src/test/results/clientpositive/create_with_constraints.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/45274/diff/


Testing
---

Local testing done


Thanks,

Hari Sankar Sivarama Subramaniyan