[jira] [Updated] (HIVE-6998) Select query can only support maximum 128 distinct expressions

2018-05-18 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-6998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-6998:
-
Attachment: HIVE-6998.01.patch

> Select query can only support maximum 128 distinct expressions
> --
>
> Key: HIVE-6998
> URL: https://issues.apache.org/jira/browse/HIVE-6998
> Project: Hive
>  Issue Type: Bug
>  Components: Query Processor, Serializers/Deserializers
>Affects Versions: 0.14.0
>Reporter: Chaoyu Tang
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-6998.01.patch
>
>
> Select query can only support maximum 128 distinct expressions. Otherwise, 
> you will be thrown ArrayIndexOutOfBoundsException. For a query like:
> select count(distinct c1),  count(distinct c2),  count(distinct c3),  
> count(distinct c4),  count(distinct c5),  count(distinct c6), , 
> count(distinct c128),  count(distinct c129) from tbl_129columns;
> you will get error like:
> {code}
> java.lang.Exception: java.lang.RuntimeException: Hive Runtime Error while 
> closing operators
> at 
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:354)
> Caused by: java.lang.RuntimeException: Hive Runtime Error while closing 
> operators
> at 
> org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:260)
> at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
> at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366)
> at 
> org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:223)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> at java.lang.Thread.run(Thread.java:695)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1141)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:579)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at 
> org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:227)
> ... 10 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.flush(GroupByOperator.java:1099)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1138)
> ... 15 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:327)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:796)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:1064)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.flush(GroupByOperator.java:1082)
> ... 16 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -128
> at java.util.ArrayList.get(ArrayList.java:324)
> at 
> org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:838)
> at 
> org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:600)
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.toHiveKey(ReduceSinkOperator.java:401)
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:320)
> ... 19 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-6998) Select query can only support maximum 128 distinct expressions

2018-05-18 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-6998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-6998:


Assignee: Eugene Koifman

> Select query can only support maximum 128 distinct expressions
> --
>
> Key: HIVE-6998
> URL: https://issues.apache.org/jira/browse/HIVE-6998
> Project: Hive
>  Issue Type: Bug
>  Components: Query Processor, Serializers/Deserializers
>Affects Versions: 0.14.0
>Reporter: Chaoyu Tang
>Assignee: Eugene Koifman
>Priority: Major
>
> Select query can only support maximum 128 distinct expressions. Otherwise, 
> you will be thrown ArrayIndexOutOfBoundsException. For a query like:
> select count(distinct c1),  count(distinct c2),  count(distinct c3),  
> count(distinct c4),  count(distinct c5),  count(distinct c6), , 
> count(distinct c128),  count(distinct c129) from tbl_129columns;
> you will get error like:
> {code}
> java.lang.Exception: java.lang.RuntimeException: Hive Runtime Error while 
> closing operators
> at 
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:354)
> Caused by: java.lang.RuntimeException: Hive Runtime Error while closing 
> operators
> at 
> org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:260)
> at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
> at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366)
> at 
> org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:223)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> at java.lang.Thread.run(Thread.java:695)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1141)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:579)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:591)
> at 
> org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:227)
> ... 10 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.flush(GroupByOperator.java:1099)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.closeOp(GroupByOperator.java:1138)
> ... 15 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.ArrayIndexOutOfBoundsException: -128
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:327)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:796)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:1064)
> at 
> org.apache.hadoop.hive.ql.exec.GroupByOperator.flush(GroupByOperator.java:1082)
> ... 16 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -128
> at java.util.ArrayList.get(ArrayList.java:324)
> at 
> org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:838)
> at 
> org.apache.hadoop.hive.serde2.binarysortable.BinarySortableSerDe.serialize(BinarySortableSerDe.java:600)
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.toHiveKey(ReduceSinkOperator.java:401)
> at 
> org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:320)
> ... 19 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-18 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481106#comment-16481106
 ] 

Eugene Koifman commented on HIVE-18748:
---

same patch again - looks like pom has been updated

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, 
> HIVE-18748.03-branch-3.patch, HIVE-18748.03.patch, HIVE-18748.04.patch, 
> HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-18 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.03-branch-3.patch

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, 
> HIVE-18748.03-branch-3.patch, HIVE-18748.03.patch, HIVE-18748.04.patch, 
> HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19588) Several invocation of file listing when creating VectorizedOrcAcidRowBatchReader

2018-05-18 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481017#comment-16481017
 ] 

Eugene Koifman commented on HIVE-19588:
---

+1

> Several invocation of file listing when creating 
> VectorizedOrcAcidRowBatchReader
> 
>
> Key: HIVE-19588
> URL: https://issues.apache.org/jira/browse/HIVE-19588
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.1.0
>Reporter: Nita Dembla
>Assignee: Prasanth Jayachandran
>Priority: Major
> Attachments: HIVE-19588.1.patch, HIVE-19588.2.patch, Screen Shot 
> 2018-05-16 at 2.23.25 PM.png
>
>
> Looks like we are doing file listing several times when creating one instance 
> of VectorizedOrcAcidRowBatchReader
>  AcidUtils.parseBaseOrDeltaBucketFilename() does full file listing (when 
> there are files with bucket_* prefix) just to get a single file out of a path 
> to figure out if it has ACID schema (as part of HIVE-18190).
>  There is full file listing where we populate
>  1) ColumnizedDeleteEventRegistry
>  2) SortMergedDeleteEventRegistry
>  3) Twice in computeOffsetAndBucket()
>  
> Attaching profiles which [~gopalv] took while debugging. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19588) Several invocation of file listing when creating VectorizedOrcAcidRowBatchReader

2018-05-17 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479818#comment-16479818
 ] 

Eugene Koifman commented on HIVE-19588:
---

+1 pending tests

> Several invocation of file listing when creating 
> VectorizedOrcAcidRowBatchReader
> 
>
> Key: HIVE-19588
> URL: https://issues.apache.org/jira/browse/HIVE-19588
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.1.0
>Reporter: Nita Dembla
>Assignee: Prasanth Jayachandran
>Priority: Major
> Attachments: HIVE-19588.1.patch, Screen Shot 2018-05-16 at 2.23.25 
> PM.png
>
>
> Looks like we are doing file listing several times when creating one instance 
> of VectorizedOrcAcidRowBatchReader
>  AcidUtils.parseBaseOrDeltaBucketFilename() does full file listing (when 
> there are files with bucket_* prefix) just to get a single file out of a path 
> to figure out if it has ACID schema (as part of HIVE-18190).
>  There is full file listing where we populate
>  1) ColumnizedDeleteEventRegistry
>  2) SortMergedDeleteEventRegistry
>  3) Twice in computeOffsetAndBucket()
>  
> Attaching profiles which [~gopalv] took while debugging. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-19599) Release Notes : Highlighting backwards incompatible changes

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-19599:
-


> Release Notes : Highlighting backwards incompatible changes
> ---
>
> Key: HIVE-19599
> URL: https://issues.apache.org/jira/browse/HIVE-19599
> Project: Hive
>  Issue Type: Bug
>  Components: Documentation
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Vineet Garg
>Priority: Blocker
>
> We need to highlight backwards incompatible changes.  A list Jira titles 
> won't be sufficient.
> For example, tables with Acid V1 (pre 3.0) data has to be major compacted 
> before upgrade and may not process any update/delete/merge until after 
> upgrade.  Not doing so may result in data corruption/loss.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19598) Acid V1 to V2 upgrade

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19598:
--
Target Version/s: 3.1.0

> Acid V1 to V2 upgrade
> -
>
> Key: HIVE-19598
> URL: https://issues.apache.org/jira/browse/HIVE-19598
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Critical
>
> The on-disk layout for full acid (transactional) tables has changed 3.0.
> Any transactional table that has any update/delete events in any deltas that 
> have not been Major compacted, must go through a Major compaction before 
> upgrading to 3.0.  No more update/delete/merge should be run after/during 
> major compaction.
> Not doing so will result in data corruption/loss.
>  
> Need to create a utility tool to help with this process.  HIVE-19233 started 
> this but it needs more work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19598) Acid V1 to V2 upgrade

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19598:
--
Priority: Critical  (was: Major)

> Acid V1 to V2 upgrade
> -
>
> Key: HIVE-19598
> URL: https://issues.apache.org/jira/browse/HIVE-19598
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Critical
>
> The on-disk layout for full acid (transactional) tables has changed 3.0.
> Any transactional table that has any update/delete events in any deltas that 
> have not been Major compacted, must go through a Major compaction before 
> upgrading to 3.0.  No more update/delete/merge should be run after/during 
> major compaction.
> Not doing so will result in data corruption/loss.
>  
> Need to create a utility tool to help with this process.  HIVE-19233 started 
> this but it needs more work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-19598) Acid V1 to V2 upgrade

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-19598:
-


> Acid V1 to V2 upgrade
> -
>
> Key: HIVE-19598
> URL: https://issues.apache.org/jira/browse/HIVE-19598
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
>
> The on-disk layout for full acid (transactional) tables has changed 3.0.
> Any transactional table that has any update/delete events in any deltas that 
> have not been Major compacted, must go through a Major compaction before 
> upgrading to 3.0.  No more update/delete/merge should be run after/during 
> major compaction.
> Not doing so will result in data corruption/loss.
>  
> Need to create a utility tool to help with this process.  HIVE-19233 started 
> this but it needs more work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19587) HeartBeat thread uses cancelled delegation token while connecting to meta on KERBEROS cluster

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19587:
--
Component/s: Transactions

> HeartBeat thread uses cancelled delegation token while connecting to meta on 
> KERBEROS cluster
> -
>
> Key: HIVE-19587
> URL: https://issues.apache.org/jira/browse/HIVE-19587
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Oleksiy Sayankin
>Assignee: Oleksiy Sayankin
>Priority: Blocker
>
> *STEP 1. Create test data*
> {code}
> create table t1 (id int) ROW FORMAT DELIMITED FIELDS TERMINATED BY  ",";
> create table t2 (id int) ROW FORMAT DELIMITED FIELDS TERMINATED BY  ",";
> {code}
> Generate 10 000 000 lines of random data
> {code}
> package com.test.app;
> import java.io.FileNotFoundException;
> import java.io.PrintWriter;
> import java.util.concurrent.ThreadLocalRandom;
> public class App {
>   public static void main(String[] args) throws FileNotFoundException {
> try (PrintWriter out = new PrintWriter("table.data");) {
>   int min = 0;
>   int max = 10_000;
>   int numRows = 10_000_000;
>   for (int i = 0; i <= numRows - 1; i++){
> int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1);
> out.println(randomNum);
>   }
> }
>   }
> }
> {code}
> Upload data to Hive tables
> {code}
> load data local inpath '/home/myuser/table.data' into table t1;
> load data local inpath '/home/myuser/table.data' into table t2;
> {code}
> *STEP 2. Configure transactions in hive-site.xml*
> {code}
> 
>
>   hive.exec.dynamic.partition.mode
>   nonstrict
>
>
>   hive.support.concurrency
>   true
>
>
>   hive.enforce.bucketing
>   true
>
>
>   hive.txn.manager
>   org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
>
>
>   hive.compactor.initiator.on
>   true
>
>
>   hive.compactor.worker.threads
>   1
>
> {code}
> *STEP 3. Configure hive.txn.timeout in hive-site.xml*
> {code}
> 
>
>   hive.txn.timeout
>   10s
>
> {code}
> *STEP 4. Connect via beeline to HS2 with KERBEROS*
> {code}
> !connect 
> jdbc:hive2://node8.cluster:1/default;principal=myuser/node8.cluster@NODE8;ssl=true;sslTrustStore=/opt/myuser/conf/ssl_truststore
> {code}
> {code}
> select count(*) from t1;
> {code}
> *STEP 5. Close connection and reconnect*
> {code}
> !close
> {code}
> {code}
> !connect 
> jdbc:hive2://node8.cluster:1/default;principal=myuser/node8.cluster@NODE8;ssl=true;sslTrustStore=/opt/myuser/conf/ssl_truststore
> {code}
> *STEP 6. Perform long playing query*
> This query lasts about 600s
> {code}
> select count(*) from t1 join t2 on t1.id = t2.id;
> {code}
> *EXPECTED RESULT*
> Query finishes successfully
> *ACTUAL RESULT*
> {code}
> 2018-05-17T13:54:54,921 ERROR [pool-7-thread-10] transport.TSaslTransport: 
> SASL negotiation failure
> javax.security.sasl.SaslException: DIGEST-MD5: IO error acquiring password
> at 
> com.sun.security.sasl.digest.DigestMD5Server.validateClientResponse(DigestMD5Server.java:598)
>  
> at 
> com.sun.security.sasl.digest.DigestMD5Server.evaluateResponse(DigestMD5Server.java:244)
> at 
> org.apache.thrift.transport.TSaslTransport$SaslParticipant.evaluateChallengeOrResponse(TSaslTransport.java:539)
>  
> at 
> org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:283)
> at 
> org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
>  
> at 
> org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
>  
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:663)
>  
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:660)
>  
> at java.security.AccessController.doPrivileged(Native Method) 
> at javax.security.auth.Subject.doAs(Subject.java:360)
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1613)
>  
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory.getTransport(HadoopThriftAuthBridge.java:660)
>  
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  
> at java.lang.Thread.run(Thread.java:748)
> Caused by: 

[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Target Version/s: 3.1.0

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19417) Modify metastore to have/access persistent tables for stats

2018-05-17 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479350#comment-16479350
 ] 

Eugene Koifman commented on HIVE-19417:
---

[~steveyeom2017], could you explain the meaning/intent of the fields in 
UPD_TXNS.

How will COMMIT_SEQID be used?

What are the possible values STATE?

If you have TBL_ID, why store db_name, tbl_name?

> Modify metastore to have/access persistent tables for stats
> ---
>
> Key: HIVE-19417
> URL: https://issues.apache.org/jira/browse/HIVE-19417
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
> Attachments: HIVE-19417.01.patch, HIVE-19417.02.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-17 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479328#comment-16479328
 ] 

Eugene Koifman commented on HIVE-18748:
---

committed to master

Thanks Sankar for the reriew

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-17 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16479323#comment-16479323
 ] 

Eugene Koifman commented on HIVE-18748:
---

rebased branch-3 patch

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-17 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.02-branch-3.patch

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, 
> HIVE-18748.02-branch-3.patch, HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.01-branch-3.patch

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.01-branch-3.patch, HIVE-18748.02.patch, 
> HIVE-18748.03.patch, HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behavior as table names are not updated in meta-tables.

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Summary: Rename table impacts the ACID behavior as table names are not 
updated in meta-tables.  (was: Rename table impacts the ACID behaviour as table 
names are not updated in meta-tables.)

> Rename table impacts the ACID behavior as table names are not updated in 
> meta-tables.
> -
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-19417) Modify metastore to have/access persistent tables for stats

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-19417:
-

Assignee: Eugene Koifman  (was: Steve Yeom)

> Modify metastore to have/access persistent tables for stats
> ---
>
> Key: HIVE-19417
> URL: https://issues.apache.org/jira/browse/HIVE-19417
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-19417.01.patch, HIVE-19417.02.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19416) Create single version transactional table metastore statistics for aggregation queries

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19416:
--
Component/s: (was: Hive)
 Transactions

> Create single version transactional table metastore statistics for 
> aggregation queries
> --
>
> Key: HIVE-19416
> URL: https://issues.apache.org/jira/browse/HIVE-19416
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
>
> The system should use only statistics for aggregation queries like count on 
> transactional tables.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19532) Modify Hive Driver/Executor to support transactional-stats-using COUNT aggregation queries

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19532:
--
Component/s: (was: Hive)
 Transactions

> Modify Hive Driver/Executor to support transactional-stats-using COUNT 
> aggregation queries 
> ---
>
> Key: HIVE-19532
> URL: https://issues.apache.org/jira/browse/HIVE-19532
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
> Fix For: 3.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19417) Modify metastore to have/access persistent tables for stats

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19417:
--
Component/s: (was: Hive)
 Transactions

> Modify metastore to have/access persistent tables for stats
> ---
>
> Key: HIVE-19417
> URL: https://issues.apache.org/jira/browse/HIVE-19417
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
> Attachments: HIVE-19417.01.patch, HIVE-19417.02.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19470) Modify metastore to have application logic to retrieve/update transactional table stats

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19470:
--
Component/s: (was: Hive)
 Transactions

> Modify metastore to have application logic to retrieve/update transactional 
> table stats 
> 
>
> Key: HIVE-19470
> URL: https://issues.apache.org/jira/browse/HIVE-19470
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
> Fix For: 3.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19533) Modify Hive to support transactional-stats-using aggregation queries with all other than COUNT

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19533:
--
Component/s: (was: Hive)
 Transactions

> Modify Hive to support transactional-stats-using aggregation queries with all 
> other than COUNT
> --
>
> Key: HIVE-19533
> URL: https://issues.apache.org/jira/browse/HIVE-19533
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
> Fix For: 3.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19416) Create single version transactional table metastore statistics for aggregation queries

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19416:
--
Labels: Transa  (was: )

> Create single version transactional table metastore statistics for 
> aggregation queries
> --
>
> Key: HIVE-19416
> URL: https://issues.apache.org/jira/browse/HIVE-19416
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
>
> The system should use only statistics for aggregation queries like count on 
> transactional tables.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19416) Create single version transactional table metastore statistics for aggregation queries

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19416:
--
Labels:   (was: Transa)

> Create single version transactional table metastore statistics for 
> aggregation queries
> --
>
> Key: HIVE-19416
> URL: https://issues.apache.org/jira/browse/HIVE-19416
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Reporter: Steve Yeom
>Assignee: Steve Yeom
>Priority: Major
>
> The system should use only statistics for aggregation queries like count on 
> transactional tables.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (HIVE-15967) Add test for Add Partition with data to Acid table

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman resolved HIVE-15967.
---
Resolution: Fixed

support for Add Partition was added in HIVE-18814 (with tests)

> Add test for Add Partition with data to Acid table
> --
>
> Key: HIVE-15967
> URL: https://issues.apache.org/jira/browse/HIVE-15967
> Project: Hive
>  Issue Type: New Feature
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
>
> This should in principle work as long as the partition is properly bucketed 
> and uses ORC.  Non-acid to acid conversion (in compaction) should just handle 
> it.
> ORC Schema evolution should handle any missing columns (and ignore extra 
> ones) wrt table schema.
> I doubt there are any checks in place to check compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-15967) Add test for Add Partition with data to Acid table

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-15967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-15967:
-

Assignee: Eugene Koifman  (was: Steve Yeom)

> Add test for Add Partition with data to Acid table
> --
>
> Key: HIVE-15967
> URL: https://issues.apache.org/jira/browse/HIVE-15967
> Project: Hive
>  Issue Type: New Feature
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
>
> This should in principle work as long as the partition is properly bucketed 
> and uses ORC.  Non-acid to acid conversion (in compaction) should just handle 
> it.
> ORC Schema evolution should handle any missing columns (and ignore extra 
> ones) wrt table schema.
> I doubt there are any checks in place to check compatibility.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19516) TestNegative merge_negative_5 and mm_concatenate are causing timeouts

2018-05-16 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478293#comment-16478293
 ] 

Eugene Koifman commented on HIVE-19516:
---

Alter table compact just enqueues compaction request.

The contract is that for compaction to work, standalone HMS must be running to 
handle this request.

I don't know how to detect the fact that nothing is reading this request queue.

 

In UTs, I manually run Worker.run() to process the queue entry.  From .q file, 
we could build some UDF that does the same and call it via "select WorkerUDF 
from dual" or something.

 

 

> TestNegative merge_negative_5 and mm_concatenate are causing timeouts
> -
>
> Key: HIVE-19516
> URL: https://issues.apache.org/jira/browse/HIVE-19516
> Project: Hive
>  Issue Type: Bug
>  Components: Testing Infrastructure
>Reporter: Vineet Garg
>Assignee: Sergey Shelukhin
>Priority: Major
> Attachments: HIVE-19516.01.patch, HIVE-19516.patch
>
>
> I haven't tried to reproduce this in isolation but it is reproducible if you 
> run in batch on local system 
> {noformat}
> mvn -B test  -Dtest.groups= -Dtest=TestNegativeCliDriver 
> 

[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-16 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478205#comment-16478205
 ] 

Eugene Koifman commented on HIVE-18748:
---

a Green run... (/)

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-16 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.05.patch

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-16 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16477847#comment-16477847
 ] 

Eugene Koifman commented on HIVE-18748:
---

fixed checkstyle issues.

[~sankarh] could you take a look please

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch, HIVE-18748.05.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-15 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476798#comment-16476798
 ] 

Eugene Koifman commented on HIVE-18748:
---

patch 4 addressing comments.

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-15 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.04.patch

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch, 
> HIVE-18748.04.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18453) ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet support

2018-05-15 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18453:
--
Target Version/s: 3.1.0

> ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet 
> support
> -
>
> Key: HIVE-18453
> URL: https://issues.apache.org/jira/browse/HIVE-18453
> Project: Hive
>  Issue Type: Improvement
>  Components: Transactions
>Reporter: Gopal V
>Assignee: Igor Kryvenko
>Priority: Major
>
> The ACID table markers are currently done with TBLPROPERTIES which is 
> inherently fragile.
> The "create transactional table" offers a way to standardize the syntax and 
> allows for future compatibility changes to support Parquet ACIDv2 tables 
> along with ORC tables.
> The ACIDv2 design is format independent, with the ability to add new 
> vectorized input formats with no changes to the design.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18453) ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet support

2018-05-15 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476665#comment-16476665
 ] 

Eugene Koifman commented on HIVE-18453:
---

[~ikryvenko], I think if the ticket is not assigned to anyone, you should feel 
free to work on it

> ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet 
> support
> -
>
> Key: HIVE-18453
> URL: https://issues.apache.org/jira/browse/HIVE-18453
> Project: Hive
>  Issue Type: Improvement
>  Components: Transactions
>Reporter: Gopal V
>Assignee: Igor Kryvenko
>Priority: Major
>
> The ACID table markers are currently done with TBLPROPERTIES which is 
> inherently fragile.
> The "create transactional table" offers a way to standardize the syntax and 
> allows for future compatibility changes to support Parquet ACIDv2 tables 
> along with ORC tables.
> The ACIDv2 design is format independent, with the ability to add new 
> vectorized input formats with no changes to the design.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-18453) ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet support

2018-05-15 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-18453:
-

Assignee: Igor Kryvenko

> ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet 
> support
> -
>
> Key: HIVE-18453
> URL: https://issues.apache.org/jira/browse/HIVE-18453
> Project: Hive
>  Issue Type: Improvement
>  Components: Transactions
>Reporter: Gopal V
>Assignee: Igor Kryvenko
>Priority: Major
>
> The ACID table markers are currently done with TBLPROPERTIES which is 
> inherently fragile.
> The "create transactional table" offers a way to standardize the syntax and 
> allows for future compatibility changes to support Parquet ACIDv2 tables 
> along with ORC tables.
> The ACIDv2 design is format independent, with the ability to add new 
> vectorized input formats with no changes to the design.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (HIVE-19490) Locking on Insert into for non native and managed tables.

2018-05-15 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476656#comment-16476656
 ] 

Eugene Koifman edited comment on HIVE-19490 at 5/16/18 12:42 AM:
-

there is a number of new checkstyle warnings, otherwise
+1 


was (Author: ekoifman):
+1

> Locking on Insert into for non native and managed tables.
> -
>
> Key: HIVE-19490
> URL: https://issues.apache.org/jira/browse/HIVE-19490
> Project: Hive
>  Issue Type: Improvement
>  Components: Druid integration
>Reporter: slim bouguerra
>Assignee: slim bouguerra
>Priority: Major
>  Labels: druid, locking
> Attachments: HIVE-19490.2.patch, HIVE-19490.3.patch, HIVE-19490.patch
>
>
> Current state of the art: 
> Managed non native table like Druid Tables, will need to get a Lock on Insert 
> into or insert Over write. The nature of this lock is set to Exclusive by 
> default for any non native table.
> This implies that Inserts into Druid table will Lock any read query as well 
> during the execution of the insert into. IMO this lock (on insert into) is  
> not needed since the insert statement is appending data and the state of 
> loading it is managed partially by Hive Storage handler hook and part of it 
> by Druid. 
> What i am proposing is to relax the lock level to shared for all non native 
> tables on insert into operations and keep it as Exclusive Write for insert 
> Overwrite for now.
>  
> Any feedback is welcome.
> cc [~ekoifman] / [~ashutoshc] / [~jdere] / [~hagleitn]
> Also am not sure what is the best way to unit test this currently am using 
> debugger to check if locks are what i except, please let me know if there is 
> a better way to do this. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19490) Locking on Insert into for non native and managed tables.

2018-05-15 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476656#comment-16476656
 ] 

Eugene Koifman commented on HIVE-19490:
---

+1

> Locking on Insert into for non native and managed tables.
> -
>
> Key: HIVE-19490
> URL: https://issues.apache.org/jira/browse/HIVE-19490
> Project: Hive
>  Issue Type: Improvement
>  Components: Druid integration
>Reporter: slim bouguerra
>Assignee: slim bouguerra
>Priority: Major
>  Labels: druid, locking
> Attachments: HIVE-19490.2.patch, HIVE-19490.3.patch, HIVE-19490.patch
>
>
> Current state of the art: 
> Managed non native table like Druid Tables, will need to get a Lock on Insert 
> into or insert Over write. The nature of this lock is set to Exclusive by 
> default for any non native table.
> This implies that Inserts into Druid table will Lock any read query as well 
> during the execution of the insert into. IMO this lock (on insert into) is  
> not needed since the insert statement is appending data and the state of 
> loading it is managed partially by Hive Storage handler hook and part of it 
> by Druid. 
> What i am proposing is to relax the lock level to shared for all non native 
> tables on insert into operations and keep it as Exclusive Write for insert 
> Overwrite for now.
>  
> Any feedback is welcome.
> cc [~ekoifman] / [~ashutoshc] / [~jdere] / [~hagleitn]
> Also am not sure what is the best way to unit test this currently am using 
> debugger to check if locks are what i except, please let me know if there is 
> a better way to do this. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-14 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Fix Version/s: (was: 3.0.0)

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-14 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475138#comment-16475138
 ] 

Eugene Koifman commented on HIVE-18748:
---

[~sankarh], addressed comments.  could you look again please

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-14 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.03.patch

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.0.0
>
> Attachments: HIVE-18748.02.patch, HIVE-18748.03.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19490) Locking on Insert into for non native and managed tables.

2018-05-14 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474656#comment-16474656
 ] 

Eugene Koifman commented on HIVE-19490:
---

If this causes a perf issue, tracing won't give us a way to solve it.
Is there a way to make sure of this before making the code change?


> Locking on Insert into for non native and managed tables.
> -
>
> Key: HIVE-19490
> URL: https://issues.apache.org/jira/browse/HIVE-19490
> Project: Hive
>  Issue Type: Improvement
>  Components: Druid integration
>Reporter: slim bouguerra
>Assignee: slim bouguerra
>Priority: Major
>  Labels: druid, locking
> Attachments: HIVE-19490.2.patch, HIVE-19490.patch
>
>
> Current state of the art: 
> Managed non native table like Druid Tables, will need to get a Lock on Insert 
> into or insert Over write. The nature of this lock is set to Exclusive by 
> default for any non native table.
> This implies that Inserts into Druid table will Lock any read query as well 
> during the execution of the insert into. IMO this lock (on insert into) is  
> not needed since the insert statement is appending data and the state of 
> loading it is managed partially by Hive Storage handler hook and part of it 
> by Druid. 
> What i am proposing is to relax the lock level to shared for all non native 
> tables on insert into operations and keep it as Exclusive Write for insert 
> Overwrite for now.
>  
> Any feedback is welcome.
> cc [~ekoifman] / [~ashutoshc] / [~jdere] / [~hagleitn]
> Also am not sure what is the best way to unit test this currently am using 
> debugger to check if locks are what i except, please let me know if there is 
> a better way to do this. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19516) TestNegative merge_negative_5 and mm_concatenate are causing timeouts

2018-05-14 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474645#comment-16474645
 ] 

Eugene Koifman commented on HIVE-19516:
---

I bet you are right.  Compaction has to have a metastore thread to run, and 
since it's not there, Concatenate just waits for compaction that will never 
happen

> TestNegative merge_negative_5 and mm_concatenate are causing timeouts
> -
>
> Key: HIVE-19516
> URL: https://issues.apache.org/jira/browse/HIVE-19516
> Project: Hive
>  Issue Type: Bug
>  Components: Testing Infrastructure
>Reporter: Vineet Garg
>Priority: Major
>
> I haven't tried to reproduce this in isolation but it is reproducible if you 
> run in batch on local system 
> {noformat}
> mvn -B test  -Dtest.groups= -Dtest=TestNegativeCliDriver 
> 

[jira] [Commented] (HIVE-19490) Locking on Insert into for non native and managed tables.

2018-05-14 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474442#comment-16474442
 ] 

Eugene Koifman commented on HIVE-19490:
---

how expensive is {{t.getStorageHandler()}} - is this retrieving an object from 
memory?  If so, i.e. doesn't make lock acquisition more expensive, the approach 
looks ok to me.

I think the error msgs should include qualified table name.
Is it possible to add some DbTxnManager2 tests to cover this?

> Locking on Insert into for non native and managed tables.
> -
>
> Key: HIVE-19490
> URL: https://issues.apache.org/jira/browse/HIVE-19490
> Project: Hive
>  Issue Type: Improvement
>  Components: Druid integration
>Reporter: slim bouguerra
>Assignee: slim bouguerra
>Priority: Major
>  Labels: druid, locking
> Attachments: HIVE-19490.2.patch, HIVE-19490.patch
>
>
> Current state of the art: 
> Managed non native table like Druid Tables, will need to get a Lock on Insert 
> into or insert Over write. The nature of this lock is set to Exclusive by 
> default for any non native table.
> This implies that Inserts into Druid table will Lock any read query as well 
> during the execution of the insert into. IMO this lock (on insert into) is  
> not needed since the insert statement is appending data and the state of 
> loading it is managed partially by Hive Storage handler hook and part of it 
> by Druid. 
> What i am proposing is to relax the lock level to shared for all non native 
> tables on insert into operations and keep it as Exclusive Write for insert 
> Overwrite for now.
>  
> Any feedback is welcome.
> cc [~ekoifman] / [~ashutoshc] / [~jdere] / [~hagleitn]
> Also am not sure what is the best way to unit test this currently am using 
> debugger to check if locks are what i except, please let me know if there is 
> a better way to do this. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18774) ACID: Use the _copy_N files copyNumber as the implicit statement-id

2018-05-10 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471275#comment-16471275
 ] 

Eugene Koifman commented on HIVE-18774:
---

suppose you have 2 Load Data statements in 1 txn
1st one creates delta_7_7_0/ with _0 and _0_copy_1
2nd one creates delta_7_7_1/ with _0 and _0_copy_1

so you can't simply take N from copy_N and use it as stmt id

> ACID: Use the _copy_N files copyNumber as the implicit statement-id
> ---
>
> Key: HIVE-18774
> URL: https://issues.apache.org/jira/browse/HIVE-18774
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
> Environment: if this is not done in 3.0 it cannot be done at all
>Reporter: Gopal V
>Assignee: Eugene Koifman
>Priority: Blocker
>
> When upgrading flat ORC files to ACID, use the _copy_N numbering as a 
> statement-id to avoid having to align the row numbering between _copy_1 and 
> _copy_2 files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (HIVE-17547) MoveTask for Acid tables race condition

2018-05-10 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-17547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman resolved HIVE-17547.
---
Resolution: Not A Problem

since commit() of the txn happens after all tasks are complete, no one will 
read contents of this delta until it has all the files

> MoveTask for Acid tables race condition
> ---
>
> Key: HIVE-17547
> URL: https://issues.apache.org/jira/browse/HIVE-17547
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
>
> Consider Hive.moveAcidFiles()
> it starts out with something like
> {noformat}
>   └── -ext-1
> │   └── 00_0
> │   ├── _orc_acid_version
> │   └── delta_019_019
> │   └── bucket_0
> │   └── 00_1
> │   ├── _orc_acid_version
> │   └── delta_019_019
> │   └── bucket_1
> {noformat}
> for a write to a bucketed table.
> The "move" handles each 00_N separately.  The first on creates 
> delta_019_019 under the table/partition dir, the others just add 
> bucket_N there.
> That means there is a small window where someone may "ls 
> table/part/delta_019_019" and not see all the buckets.
> Once Acid writes directly to the final location (a la MM tables) this issue 
> resolves automatically since txn 19 is uncommitted until everything is 
> written.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19490) Locking on Insert into for non native and managed tables.

2018-05-10 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471031#comment-16471031
 ] 

Eugene Koifman commented on HIVE-19490:
---

TestDbTxnManager2 has many tests to verify locks

I think using shared lock for Druid insert makes sense but I'm not sure if that 
is appropriate for all non-native tables.

> Locking on Insert into for non native and managed tables.
> -
>
> Key: HIVE-19490
> URL: https://issues.apache.org/jira/browse/HIVE-19490
> Project: Hive
>  Issue Type: Improvement
>  Components: Druid integration
>Reporter: slim bouguerra
>Assignee: slim bouguerra
>Priority: Major
>  Labels: druid, locking
> Attachments: HIVE-19490.patch
>
>
> Current state of the art: 
> Managed non native table like Druid Tables, will need to get a Lock on Insert 
> into or insert Over write. The nature of this lock is set to Exclusive by 
> default for any non native table.
> This implies that Inserts into Druid table will Lock any read query as well 
> during the execution of the insert into. IMO this lock (on insert into) is  
> not needed since the insert statement is appending data and the state of 
> loading it is managed partially by Hive Storage handler hook and part of it 
> by Druid. 
> What i am proposing is to relax the lock level to shared for all non native 
> tables on insert into operations and keep it as Exclusive Write for insert 
> Overwrite for now.
>  
> Any feedback is welcome.
> cc [~ekoifman] / [~ashutoshc] / [~jdere] / [~hagleitn]
> Also am not sure what is the best way to unit test this currently am using 
> debugger to check of locks are what i except, please let me know if there is 
> a better way to do this. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18193) Migrate existing ACID tables to use write id per table rather than global transaction id

2018-05-09 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16469437#comment-16469437
 ] 

Eugene Koifman commented on HIVE-18193:
---

LGTM

> Migrate existing ACID tables to use write id per table rather than global 
> transaction id
> 
>
> Key: HIVE-18193
> URL: https://issues.apache.org/jira/browse/HIVE-18193
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: anishek
>Assignee: Sankar Hariappan
>Priority: Blocker
>  Labels: ACID, Upgrade
> Fix For: 3.0.0, 3.1.0
>
> Attachments: HIVE-18193.01.patch, HIVE-18193.02.patch
>
>
> dependent upon HIVE-18192
> For existing ACID Tables we need to update the table level write id 
> metatables/sequences so any new operations on these tables works seamlessly 
> without any conflicting data in existing base/delta files.
> 1. Need to create metadata tables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID.
> 2. Add entries for each ACID/MM tables into NEXT_WRITE_ID where NWI_NEXT is 
> set to current value of NEXT_TXN_ID.NTXN_NEXT.
> 3. All current open/abort transactions to have an entry in TXN_TO_WRITE_ID 
> such that T2W_TXNID=T2W_WRITEID=Open/AbortedTxnId.
> 4. Added new column TC_WRITEID in TXN_COMPONENTS and CTC_WRITEID in 
> COMPLETED_TXN_COMPONENTS to store the write id which should be set as 
> respective values of TC_TXNID and CTC_TXNID from the same row.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19454) Test failure : org.apache.hadoop.hive.ql.TestTxnCommands2.testNonAcidToAcidConversion1 fails with java.lang.AssertionError

2018-05-08 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16467996#comment-16467996
 ] 

Eugene Koifman commented on HIVE-19454:
---

cc [~djaiswal]

> Test failure : 
> org.apache.hadoop.hive.ql.TestTxnCommands2.testNonAcidToAcidConversion1 fails 
> with java.lang.AssertionError
> --
>
> Key: HIVE-19454
> URL: https://issues.apache.org/jira/browse/HIVE-19454
> Project: Hive
>  Issue Type: Bug
> Environment: uname -a
> Linux pts00433-vm40 3.10.0-862.el7.ppc64le #1 SMP Wed Mar 21 22:20:19 UTC 
> 2018 ppc64le ppc64le ppc64le GNU/Linux
>Reporter: Alisha Prabhu
>Priority: Major
>  Labels: patch-available
> Attachments: HIVE-19454.1.patch
>
>
> org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testNonAcidToAcidConversion1
>  refers to the same test case.
> Maven command used is : mvn -Dtest=TestTxnCommands2 test
> Error:
> {code:java}
> [INFO] Running org.apache.hadoop.hive.ql.TestTxnCommands2
> [ERROR] Tests run: 44, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 
> 618.215 s <<< FAILURE! - in org.apache.hadoop.hive.ql.TestTxnCommands2
> [ERROR] 
> testNonAcidToAcidConversion1(org.apache.hadoop.hive.ql.TestTxnCommands2)  
> Time elapsed: 17.557 s  <<< FAILURE!
> java.lang.AssertionError
>     at org.junit.Assert.fail(Assert.java:86)
>     at org.junit.Assert.assertTrue(Assert.java:41)
>     at org.junit.Assert.assertTrue(Assert.java:52)
>     at 
> org.apache.hadoop.hive.ql.TestTxnCommands2.testNonAcidToAcidConversion1(TestTxnCommands2.java:499)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>     at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>     at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>     at 
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
>     at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>     at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>     at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>     at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
>     at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
>     at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
>     at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
>     at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
>     at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
>     at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
>     at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
> [INFO]
> [INFO] Results:
> [INFO]
> [ERROR] Failures:
> [ERROR]   TestTxnCommands2.testNonAcidToAcidConversion1:499
> [INFO]
> [ERROR] Tests run: 44, Failures: 1, Errors: 0, Skipped: 3
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18126) IOW Mechanics of multiple commands with OVERWRITE in a singe transactions

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18126:
--
Target Version/s: 3.0.0
Priority: Critical  (was: Major)

> IOW Mechanics of multiple commands with OVERWRITE in a singe transactions
> -
>
> Key: HIVE-18126
> URL: https://issues.apache.org/jira/browse/HIVE-18126
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Critical
>
> for Insert overwrite/load data overwrite we create base_x/ to hold the data 
> thus are able to make Overwrite command non-blocking.  
> What happens if multiple IOWs are run against the same table/partition in the 
> same transaction.
> should base support a suffix base_x_000 like deltas?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (HIVE-18380) ALTER TABLE CONCATENATE is not supported on Micro-managed table

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman resolved HIVE-18380.
---
   Resolution: Fixed
Fix Version/s: 3.0.0
 Release Note: n/a

fixed as part of HIVE-18288

> ALTER TABLE CONCATENATE is not supported on Micro-managed table
> ---
>
> Key: HIVE-18380
> URL: https://issues.apache.org/jira/browse/HIVE-18380
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Eugene Koifman
>Priority: Minor
> Fix For: 3.0.0
>
>
> ALTER TABLE CONCATENATE is not supported on Micro-managed table. 
> Example qtest is "alter_merge_2_orc.q" and the unsupportability is revealed 
> when we start with tables in micro-managed table type(insert_only 
> transactional).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18774) ACID: Use the _copy_N files copyNumber as the implicit statement-id

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18774:
--
Target Version/s: 3.0.0
 Environment: if this is not done in 3.0 it cannot be done at all

> ACID: Use the _copy_N files copyNumber as the implicit statement-id
> ---
>
> Key: HIVE-18774
> URL: https://issues.apache.org/jira/browse/HIVE-18774
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
> Environment: if this is not done in 3.0 it cannot be done at all
>Reporter: Gopal V
>Assignee: Eugene Koifman
>Priority: Blocker
>
> When upgrading flat ORC files to ACID, use the _copy_N numbering as a 
> statement-id to avoid having to align the row numbering between _copy_1 and 
> _copy_2 files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18709) Enable Compaction to work on more than one partition per job

2018-05-07 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1640#comment-1640
 ] 

Eugene Koifman commented on HIVE-18709:
---

with query based compactor this may be easy

> Enable Compaction to work on more than one partition per job
> 
>
> Key: HIVE-18709
> URL: https://issues.apache.org/jira/browse/HIVE-18709
> Project: Hive
>  Issue Type: Improvement
>  Components: Transactions
>Affects Versions: 1.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
>
> currently compaction launches 1 MR job per partition that needs to be 
> compacted.
> The number of tasks is equal to the number of buckets in the table (or number 
> or writers in the 'widest' write).
> The number of AMs in a cluster is usually limited to a small percentage of 
> the nodes.  This limits how much compaction can be done in parallel.
> Investigate what it would take for a single job to be able to handle multiple 
> partitions.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18774) ACID: Use the _copy_N files copyNumber as the implicit statement-id

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18774:
--
Priority: Blocker  (was: Major)

> ACID: Use the _copy_N files copyNumber as the implicit statement-id
> ---
>
> Key: HIVE-18774
> URL: https://issues.apache.org/jira/browse/HIVE-18774
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Gopal V
>Assignee: Eugene Koifman
>Priority: Blocker
>
> When upgrading flat ORC files to ACID, use the _copy_N numbering as a 
> statement-id to avoid having to align the row numbering between _copy_1 and 
> _copy_2 files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16466657#comment-16466657
 ] 

Eugene Koifman commented on HIVE-18748:
---

[~sankarh] could you review please

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.0.0
>
> Attachments: HIVE-18748.02.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Attachment: HIVE-18748.02.patch

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.0.0
>
> Attachments: HIVE-18748.02.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Status: Patch Available  (was: Open)

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.0.0
>
> Attachments: HIVE-18748.02.patch
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19447) BucketizedHiveInputFormat doesn't account for ACID

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19447:
--
Component/s: Transactions

> BucketizedHiveInputFormat doesn't account for ACID
> --
>
> Key: HIVE-19447
> URL: https://issues.apache.org/jira/browse/HIVE-19447
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Priority: Major
>
> See the TODO added in HIVE-19312.
> It doesn't account for MM tables and can apparently be used for them, 
> producing incorrect results.
> I'm not sure if it can be used for ACID tables; we need to fix it for ACID 
> (w.r.t. the ACID-related logic in HIF) or perhaps add a negative test where 
> for the same query it's used for a non-ACID table but not used for an ACID 
> table. mm_bhif test has a simple example query (count distinct iirc)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Fix Version/s: (was: 3.1.0)
   3.0.0

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.0.0
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18131) Truncate table for Acid tables

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18131:
--
   Resolution: Fixed
Fix Version/s: 3.0.0
 Release Note: n/a
   Status: Resolved  (was: Patch Available)

committed to branch-3/master
thanks Prasanth for the review

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-18131.01.patch, HIVE-18131.02.patch, 
> HIVE-18131.03.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19322) broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19322:
--
Fix Version/s: 3.0.0

> broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]
> --
>
> Key: HIVE-19322
> URL: https://issues.apache.org/jira/browse/HIVE-19322
> Project: Hive
>  Issue Type: Sub-task
>  Components: Test, Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-19322.01-branch-3.patch, 
> HIVE-19322.02-branch-3.patch, HIVE-19322.02.patch, 
> HIVE-19322.03-branch-3.patch, HIVE-19322.03.patch, 
> HIVE-19322.04-branch-3.patch, HIVE-19322.04.patch, HIVE-19322.05.patch, 
> HIVE-19322.06.patch, HIVE-19322.07.patch
>
>
> this is apparently caused by HIVE-18739, specifically changing
> {{private static ThreadLocal tss}} in {{SessionState}} to 
> {{private static InheritableThreadLocal tss}}
> need to figure out why this is.  
> Looks like
> {{TestNegativeMinimrCliDriver 
> -Dqfile=mapreduce_stack_trace_turnoff.q,mapreduce_stack_trace.q,cluster_tasklog_retrieval.q}}
> are also broken by this



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Fix Version/s: 3.0.0

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

committed to branch-3/master
thanks Sergey for the review

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19322) broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19322:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

also committed to branch-3

> broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]
> --
>
> Key: HIVE-19322
> URL: https://issues.apache.org/jira/browse/HIVE-19322
> Project: Hive
>  Issue Type: Sub-task
>  Components: Test, Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-19322.01-branch-3.patch, 
> HIVE-19322.02-branch-3.patch, HIVE-19322.02.patch, 
> HIVE-19322.03-branch-3.patch, HIVE-19322.03.patch, 
> HIVE-19322.04-branch-3.patch, HIVE-19322.04.patch, HIVE-19322.05.patch, 
> HIVE-19322.06.patch, HIVE-19322.07.patch
>
>
> this is apparently caused by HIVE-18739, specifically changing
> {{private static ThreadLocal tss}} in {{SessionState}} to 
> {{private static InheritableThreadLocal tss}}
> need to figure out why this is.  
> Looks like
> {{TestNegativeMinimrCliDriver 
> -Dqfile=mapreduce_stack_trace_turnoff.q,mapreduce_stack_trace.q,cluster_tasklog_retrieval.q}}
> are also broken by this



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19442) convert Hive stats to deltas

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19442:
--
Component/s: Transactions

> convert Hive stats to deltas
> 
>
> Key: HIVE-19442
> URL: https://issues.apache.org/jira/browse/HIVE-19442
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Priority: Major
>
> This would allow for
> 1) Accurate stats after partial operations like inserts.
> 2) Better ACID integration.
> The idea is for partition stats and table stats to be written as deltas, with 
> a flag that indicates this is a delta (i.e. "this insert wrote 500 rows").
> The flag like this would also allow us to avoid converting old stats.
> Thats can be merged after the query if appropriate locking is present and the 
> table is not transactional, or by compactor, based on ACID watermarks, when 
> the table is transactional.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-18748:
-

Assignee: Eugene Koifman  (was: Sankar Hariappan)

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Major
>  Labels: ACID, DDL
> Fix For: 3.1.0
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18748) Rename table impacts the ACID behaviour as table names are not updated in meta-tables.

2018-05-07 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18748:
--
Priority: Critical  (was: Major)

> Rename table impacts the ACID behaviour as table names are not updated in 
> meta-tables.
> --
>
> Key: HIVE-18748
> URL: https://issues.apache.org/jira/browse/HIVE-18748
> Project: Hive
>  Issue Type: Sub-task
>  Components: HiveServer2, Transactions
>Affects Versions: 3.0.0
>Reporter: Sankar Hariappan
>Assignee: Eugene Koifman
>Priority: Critical
>  Labels: ACID, DDL
> Fix For: 3.1.0
>
>
> ACID implementation uses metatables such as TXN_COMPONENTS, 
> COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPCTION_QUEUE etc to 
> manage ACID operations.
> Per table write ID implementation (HIVE-18192) introduces couple of 
> metatables such as NEXT_WRITE_ID and TXN_TO_WRITE_ID to manage write ids 
> allocated per table.
> Now, when we rename any tables, it is necessary to update the corresponding 
> table names in these metatables as well. Otherwise, ACID table operations 
> won't work properly.
> Since, this change is significant and have other side-effects, we propose to 
> disable rename tables on ACID tables until a fix is figured out.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18570:
--
  Resolution: Fixed
Release Note: Insert Overwrite commands even on transactional tables will 
acquire Exclusive locks to ensure correctness.  This will be improved upon to 
allow greater concurrency.
  Status: Resolved  (was: Patch Available)

committed to branch-3/master
thanks Sergey for the review

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.03.patch, 
> HIVE-18570.04-branch-3.patch, HIVE-18570.05-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16464350#comment-16464350
 ] 

Eugene Koifman commented on HIVE-18288:
---

yes

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-04 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16464335#comment-16464335
 ] 

Eugene Koifman commented on HIVE-18570:
---

no related failures for HIVE-18570.03.patch on master
attaching HIVE-18570.05-branch-3.patch

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.03.patch, 
> HIVE-18570.04-branch-3.patch, HIVE-18570.05-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18570:
--
Attachment: HIVE-18570.05-branch-3.patch

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.03.patch, 
> HIVE-18570.04-branch-3.patch, HIVE-18570.05-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19322) broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19322:
--
Attachment: HIVE-19322.04-branch-3.patch

> broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]
> --
>
> Key: HIVE-19322
> URL: https://issues.apache.org/jira/browse/HIVE-19322
> Project: Hive
>  Issue Type: Sub-task
>  Components: Test, Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-19322.01-branch-3.patch, 
> HIVE-19322.02-branch-3.patch, HIVE-19322.02.patch, 
> HIVE-19322.03-branch-3.patch, HIVE-19322.03.patch, 
> HIVE-19322.04-branch-3.patch, HIVE-19322.04.patch, HIVE-19322.05.patch, 
> HIVE-19322.06.patch, HIVE-19322.07.patch
>
>
> this is apparently caused by HIVE-18739, specifically changing
> {{private static ThreadLocal tss}} in {{SessionState}} to 
> {{private static InheritableThreadLocal tss}}
> need to figure out why this is.  
> Looks like
> {{TestNegativeMinimrCliDriver 
> -Dqfile=mapreduce_stack_trace_turnoff.q,mapreduce_stack_trace.q,cluster_tasklog_retrieval.q}}
> are also broken by this



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19322) broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]

2018-05-04 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16464077#comment-16464077
 ] 

Eugene Koifman commented on HIVE-19322:
---

rebase patch

> broken test: TestNegativeMinimrCliDriver#testCliDriver[minimr_broken_pipe]
> --
>
> Key: HIVE-19322
> URL: https://issues.apache.org/jira/browse/HIVE-19322
> Project: Hive
>  Issue Type: Sub-task
>  Components: Test, Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-19322.01-branch-3.patch, 
> HIVE-19322.02-branch-3.patch, HIVE-19322.02.patch, 
> HIVE-19322.03-branch-3.patch, HIVE-19322.03.patch, 
> HIVE-19322.04-branch-3.patch, HIVE-19322.04.patch, HIVE-19322.05.patch, 
> HIVE-19322.06.patch, HIVE-19322.07.patch
>
>
> this is apparently caused by HIVE-18739, specifically changing
> {{private static ThreadLocal tss}} in {{SessionState}} to 
> {{private static InheritableThreadLocal tss}}
> need to figure out why this is.  
> Looks like
> {{TestNegativeMinimrCliDriver 
> -Dqfile=mapreduce_stack_trace_turnoff.q,mapreduce_stack_trace.q,cluster_tasklog_retrieval.q}}
> are also broken by this



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: HIVE-18288.02.patch

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: (was: HIVE-18288.02.patch)

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: (was: HIVE-18288.02.patch)

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16464073#comment-16464073
 ] 

Eugene Koifman commented on HIVE-18288:
---

same patch again

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: HIVE-18288.02.patch

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch, 
> HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18131) Truncate table for Acid tables

2018-05-04 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16464068#comment-16464068
 ] 

Eugene Koifman commented on HIVE-18131:
---

same patch again since the last one was again lost in the Bermuda triangle of 
the build queue

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch, HIVE-18131.02.patch, 
> HIVE-18131.03.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18131) Truncate table for Acid tables

2018-05-04 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18131:
--
Attachment: HIVE-18131.03.patch

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch, HIVE-18131.02.patch, 
> HIVE-18131.03.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-19418) add background stats updater similar to compactor

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-19418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-19418:
--
Component/s: Transactions

> add background stats updater similar to compactor
> -
>
> Key: HIVE-19418
> URL: https://issues.apache.org/jira/browse/HIVE-19418
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Sergey Shelukhin
>Priority: Major
>
> There's a JIRA HIVE-19416 to add snapshot version to stats for MM/ACID tables 
> to make them usable in a transaction without breaking ACID (for metadata-only 
> optimization). However, stats for ACID tables can still become unusable if 
> e.g. two parallel inserts run - neither sees the data written by the other, 
> so after both finish, the snapshots on either set of stats won't match the 
> current snapshot and the stats will be unusable.
> Additionally, for ACID and non-ACID tables alike, a lot of the stats, with 
> some exceptions like numRows, cannot be aggregated (i.e. you cannot combine 
> ndvs from two inserts), and for ACID even less can be aggregated (you cannot 
> derive min/max if some rows are deleted but you don't scan the rest of the 
> dataset).
> Therefore we will add background logic to metastore (similar to, and 
> partially inside, the ACID compactor) to update stats.
> It will have 3 modes of operation.
> 1) Off.
> 2) Update only the stats that exist but are out of date (generating stats can 
> be expensive, so if the user is only analyzing a subset of tables it should 
> be able to only update that subset). We can simply look at existing stats and 
> only analyze for the relevant partitions and columns.
> 3) On: 2 + create stats for all tables and columns missing stats.
> There will also be a table parameter to skip stats update. 
> In phase 1, the process will operate outside of compactor, and run analyze 
> command on the table. The analyze command will automatically save the stats 
> with ACID snapshot information if needed, based on HIVE-19416, so we don't 
> need to do any special state management and this will work for all table 
> types. However it's also more expensive.
> In phase 2, we can explore adding stats collection during MM compaction that 
> uses a temp table. If we don't have open writers during major compaction (so 
> we overwrite all of the data), the temp table stats can simply be copied over 
> to the main table with correct snapshot information, saving us a table scan.
> In phase 3, we can add custom stats collection logic to full ACID compactor 
> that is not query based, the same way as we'd do for (2). Alternatively we 
> can wait for ACID compactor to become query based and just reuse (2).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16463211#comment-16463211
 ] 

Eugene Koifman commented on HIVE-18570:
---

HIVE-18570.03.patch updates some golden files

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.03.patch, 
> HIVE-18570.04-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18570:
--
Attachment: HIVE-18570.03.patch

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.03.patch, 
> HIVE-18570.04-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18288) merge/concat not supported on Acid table

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16463187#comment-16463187
 ] 

Eugene Koifman commented on HIVE-18288:
---

[~sershe] could you review please

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: HIVE-18288.02.patch

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: (was: HIVE-18288.02.patch)

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: HIVE-18288.02.patch

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Status: Patch Available  (was: Open)

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch, HIVE-18288.02.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19400) Adjust Hive 1.0 to 2.0 conversion utility to the upgrade

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462882#comment-16462882
 ] 

Eugene Koifman commented on HIVE-19400:
---

you're right that test is pretty weak.  I was just looking for some validation 
that it recognizes the new option correctly.  You can create a new test if you 
prefer.

mvn -Dtest=TestTxnExIm#testUpgrade works - for some reason running the whole 
suite fails.

> Adjust Hive 1.0 to 2.0 conversion utility to the upgrade
> 
>
> Key: HIVE-19400
> URL: https://issues.apache.org/jira/browse/HIVE-19400
> Project: Hive
>  Issue Type: Sub-task
>  Components: Hive
>Affects Versions: 3.0.0
>Reporter: Miklos Gergely
>Assignee: Miklos Gergely
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-19400.01.patch
>
>
> Conversion utility should allow specification of the output dir, and create 
> files only if there is actually something to do.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-18131) Truncate table for Acid tables

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462870#comment-16462870
 ] 

Eugene Koifman commented on HIVE-18131:
---

same patch - build bot lost the previous one

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch, HIVE-18131.02.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18131) Truncate table for Acid tables

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18131:
--
Attachment: HIVE-18131.02.patch

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch, HIVE-18131.02.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-17457) IOW Acid Insert Overwrite when the transaction fails

2018-05-03 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-17457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-17457:
--
   Resolution: Fixed
Fix Version/s: 3.0.0
 Release Note: n/a
   Status: Resolved  (was: Patch Available)

committed to branch-3
thanks Sergey for the review

> IOW Acid Insert Overwrite when the transaction fails
> 
>
> Key: HIVE-17457
> URL: https://issues.apache.org/jira/browse/HIVE-17457
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-17457.01.patch, HIVE-17457.02.patch, 
> HIVE-17457.03.patch
>
>
> HIVE-14988 adds support for Insert Overwrite for Acid tables.
> once we have direct write to target dir (i.e. no move op) - how do we handle 
> the case where the txn running IOW aborts?  See if getAcidState() does the 
> right thing



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-17657) export/import for MM tables is broken

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-17657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462696#comment-16462696
 ] 

Eugene Koifman commented on HIVE-17657:
---

+1

> export/import for MM tables is broken
> -
>
> Key: HIVE-17657
> URL: https://issues.apache.org/jira/browse/HIVE-17657
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Sergey Shelukhin
>Priority: Major
>  Labels: mm-gap-2
> Attachments: HIVE-17657.01.patch, HIVE-17657.02.patch, 
> HIVE-17657.03.patch, HIVE-17657.04.patch, HIVE-17657.05.patch, 
> HIVE-17657.06.patch, HIVE-17657.07.patch, HIVE-17657.08.patch, 
> HIVE-17657.patch
>
>
> there is mm_exim.q but it's not clear from the tests what file structure it 
> creates 
> On import the txnids in the directory names would have to be remapped if 
> importing to a different cluster.  Perhaps export can be smart and export 
> highest base_x and accretive deltas (minus aborted ones).  Then import can 
> ...?  It would have to remap txn ids from the archive to new txn ids.  This 
> would then mean that import is made up of several transactions rather than 1 
> atomic op.  (all locks must belong to a transaction)
> One possibility is to open a new txn for each dir in the archive (where 
> start/end txn of file name is the same) and commit all of them at once (need 
> new TMgr API for that).  This assumes using a shared lock (if any!) and thus 
> allows other inserts (not related to import) to occur.
> What if you have delta_6_9, such as a result of concatenate?  If we stipulate 
> that this must mean that there is no delta_6_6 or any other "obsolete" delta 
> in the archive we can map it to a new single txn delta_x_x.
> Add read_only mode for tables (useful in general, may be needed for upgrade 
> etc) and use that to make the above atomic.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19400) Adjust Hive 1.0 to 2.0 conversion utility to the upgrade

2018-05-03 Thread Eugene Koifman (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-19400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462648#comment-16462648
 ] 

Eugene Koifman commented on HIVE-19400:
---

Can TestTxnExIm.testUpgrade() be modified to test that this works?

> Adjust Hive 1.0 to 2.0 conversion utility to the upgrade
> 
>
> Key: HIVE-19400
> URL: https://issues.apache.org/jira/browse/HIVE-19400
> Project: Hive
>  Issue Type: Sub-task
>  Components: Hive
>Affects Versions: 3.0.0
>Reporter: Miklos Gergely
>Assignee: Miklos Gergely
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-19400.01.patch
>
>
> Conversion utility should allow specification of the output dir, and create 
> files only if there is actually something to do.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18570) ACID IOW implemented using base may delete too much data

2018-05-02 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18570:
--
Attachment: HIVE-18570.02.patch

> ACID IOW implemented using base may delete too much data
> 
>
> Key: HIVE-18570
> URL: https://issues.apache.org/jira/browse/HIVE-18570
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Sergey Shelukhin
>Assignee: Eugene Koifman
>Priority: Blocker
> Attachments: HIVE-18570.01-branch-3.patch, HIVE-18570.01.patch, 
> HIVE-18570.02-branch-3.patch, HIVE-18570.02.patch, 
> HIVE-18570.03-branch-3.patch, HIVE-18570.04-branch-3.patch
>
>
> Suppose we have a table with delta_0 insert data.
> Txn 1 starts an insert into delta_1.
> Txn 2 starts an IOW into base_2.
> Txn 2 commits.
> Txn 1 commits after txn 2 but its results would be invisible.
> Txn 2 deletes rows committed by txn 1 that according to standard ACID 
> semantics it could have never observed and affected; this sequence of events 
> is only possible under read-uncommitted isolation level (so, 2 deletes rows 
> written by 1 before 1 commits them). 
> This is if we look at IOW as transactional delete+insert. Otherwise we are 
> just saying IOW performs "semi"-transactional delete.
> If 1 ran an update on rows instead of an insert, and 2 still ran an 
> IOW/delete, row lock conflict (or equivalent) should cause one of them to 
> fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18288) merge/concat not supported on Acid table

2018-05-02 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18288:
--
Attachment: HIVE-18288.01.patch

> merge/concat not supported on Acid table
> 
>
> Key: HIVE-18288
> URL: https://issues.apache.org/jira/browse/HIVE-18288
> Project: Hive
>  Issue Type: Sub-task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18288.01.patch
>
>
> For example, mvn test -Dtest=TestCliDriver -Dqfile=orc_merge10.q
> now ends up with 
> {noformat}
> 2017-12-15T15:12:30,753 ERROR [7c3ff5b2-285c-44f2-8b13-5c3ccbd41b13 main] 
> ql.Driver: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/M\
> erge can not be performed on transactional tables
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge can not 
> be performed on transactional tables
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTablePartMergeFiles(DDLSemanticAnalyzer.java:2172)
> at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:343)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-18380) ALTER TABLE CONCATENATE is not supported on Micro-managed table

2018-05-02 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman reassigned HIVE-18380:
-

Assignee: Eugene Koifman

> ALTER TABLE CONCATENATE is not supported on Micro-managed table
> ---
>
> Key: HIVE-18380
> URL: https://issues.apache.org/jira/browse/HIVE-18380
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 3.0.0
>Reporter: Steve Yeom
>Assignee: Eugene Koifman
>Priority: Minor
>
> ALTER TABLE CONCATENATE is not supported on Micro-managed table. 
> Example qtest is "alter_merge_2_orc.q" and the unsupportability is revealed 
> when we start with tables in micro-managed table type(insert_only 
> transactional).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18131) Truncate table for Acid tables

2018-05-02 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18131:
--
Issue Type: Task  (was: New Feature)

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: Task
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-18131) Truncate table for Acid tables

2018-05-02 Thread Eugene Koifman (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-18131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eugene Koifman updated HIVE-18131:
--
Status: Patch Available  (was: Open)

> Truncate table for Acid tables
> --
>
> Key: HIVE-18131
> URL: https://issues.apache.org/jira/browse/HIVE-18131
> Project: Hive
>  Issue Type: New Feature
>  Components: Transactions
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Major
> Attachments: HIVE-18131.01.patch
>
>
> How should this work?  Should it work like Insert Overwrite T select * from T 
> where 1=2?
> This should create a new empty base_x/ and thus operate w/o violating 
> Snapshot Isolation semantics.
> This makes sense for specific partition or unpartitioned table.  What about 
> "Truncate T" where T is partitioned?  Is the expectation to wipe out all 
> partition info or to make each partition empty?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


<    4   5   6   7   8   9   10   11   12   13   >