[jira] [Resolved] (HIVE-6712) HS2 JDBC driver is inconsistent w.r.t. auto commit

2016-05-02 Thread David McWhorter (JIRA)

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

David McWhorter resolved HIVE-6712.
---
   Resolution: Duplicate
Fix Version/s: 2.0.0

This was completed and committed in HIVE-11293

> HS2 JDBC driver is inconsistent w.r.t. auto commit
> --
>
> Key: HIVE-6712
> URL: https://issues.apache.org/jira/browse/HIVE-6712
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Xuefu Zhang
>Assignee: David McWhorter
>  Labels: jdbc
> Fix For: 2.0.0
>
> Attachments: HIVE-6712.patch
>
>
> I see an inconsistency in HS2 JDBC driver code:
> {code}
>   @Override
>   public void setAutoCommit(boolean autoCommit) throws SQLException {
> if (autoCommit) {
>   throw new SQLException("enabling autocommit is not supported");
> }
>   }
> {code}
> From above, it seems that auto commit is not supported. However, 
> {code}
>   @Override
>   public boolean getAutoCommit() throws SQLException {
> return true;
>   }
> {code}



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


[jira] [Updated] (HIVE-6712) HS2 JDBC driver is inconsistent w.r.t. auto commit

2016-05-02 Thread David McWhorter (JIRA)

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

David McWhorter updated HIVE-6712:
--
Status: Open  (was: Patch Available)

> HS2 JDBC driver is inconsistent w.r.t. auto commit
> --
>
> Key: HIVE-6712
> URL: https://issues.apache.org/jira/browse/HIVE-6712
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Xuefu Zhang
>Assignee: David McWhorter
>  Labels: jdbc
> Attachments: HIVE-6712.patch
>
>
> I see an inconsistency in HS2 JDBC driver code:
> {code}
>   @Override
>   public void setAutoCommit(boolean autoCommit) throws SQLException {
> if (autoCommit) {
>   throw new SQLException("enabling autocommit is not supported");
> }
>   }
> {code}
> From above, it seems that auto commit is not supported. However, 
> {code}
>   @Override
>   public boolean getAutoCommit() throws SQLException {
> return true;
>   }
> {code}



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


[jira] [Commented] (HIVE-11589) Invalid value such as '-1' should be checked for 'hive.txn.timeout'.

2016-02-08 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-11589:


Hive 0.14.0

> Invalid value such as '-1' should be checked for 'hive.txn.timeout'.
> 
>
> Key: HIVE-11589
> URL: https://issues.apache.org/jira/browse/HIVE-11589
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.2.1
>Reporter: Takahiko Saito
>Priority: Minor
>
> When an user accidentally set an invalid value such as '-1' for 
> 'hive.txn.timeout', the query simply fails throwing 'NoSuchLockException'
> {noformat}
> 2015-08-16 23:25:43,149 ERROR [HiveServer2-Background-Pool: Thread-206]: 
> metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(159)) - 
> NoSuchLockException(message:No such lock: 40)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.heartbeatLock(TxnHandler.java:1710)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.unlock(TxnHandler.java:501)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.unlock(HiveMetaStore.java:5571)
>   at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
>   at com.sun.proxy.$Proxy7.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.unlock(HiveMetaStoreClient.java:1876)
>   at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
>   at com.sun.proxy.$Proxy8.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.unlock(DbLockManager.java:134)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.releaseLocks(DbLockManager.java:153)
>   at 
> org.apache.hadoop.hive.ql.Driver.releaseLocksAndCommitOrRollback(Driver.java:1038)
>   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1208)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1054)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:154)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOperation.java:71)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:206)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at javax.security.auth.Subject.doAs(Subject.java:415)
>   at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:218)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}
> The better way to handle such an invalid value is to check the value 
> beforehand instead of throwing NoSuchLockException.



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


[jira] [Commented] (HIVE-11589) Invalid value such as '-1' should be checked for 'hive.txn.timeout'.

2016-02-08 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-11589:


Hive 0.14.0

> Invalid value such as '-1' should be checked for 'hive.txn.timeout'.
> 
>
> Key: HIVE-11589
> URL: https://issues.apache.org/jira/browse/HIVE-11589
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.2.1
>Reporter: Takahiko Saito
>Priority: Minor
>
> When an user accidentally set an invalid value such as '-1' for 
> 'hive.txn.timeout', the query simply fails throwing 'NoSuchLockException'
> {noformat}
> 2015-08-16 23:25:43,149 ERROR [HiveServer2-Background-Pool: Thread-206]: 
> metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(159)) - 
> NoSuchLockException(message:No such lock: 40)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.heartbeatLock(TxnHandler.java:1710)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.unlock(TxnHandler.java:501)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.unlock(HiveMetaStore.java:5571)
>   at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
>   at com.sun.proxy.$Proxy7.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.unlock(HiveMetaStoreClient.java:1876)
>   at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
>   at com.sun.proxy.$Proxy8.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.unlock(DbLockManager.java:134)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.releaseLocks(DbLockManager.java:153)
>   at 
> org.apache.hadoop.hive.ql.Driver.releaseLocksAndCommitOrRollback(Driver.java:1038)
>   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1208)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1054)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:154)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOperation.java:71)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:206)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at javax.security.auth.Subject.doAs(Subject.java:415)
>   at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:218)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}
> The better way to handle such an invalid value is to check the value 
> beforehand instead of throwing NoSuchLockException.



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


[jira] [Commented] (HIVE-11589) Invalid value such as '-1' should be checked for 'hive.txn.timeout'.

2016-02-08 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-11589:


We are facing the exact error described by the stack trace in the description, 
but hive.txn.timeout is set to its default value of 300.  We are using a JDBC 
client.  Could this happen if a query takes longer than 300s to complete?

> Invalid value such as '-1' should be checked for 'hive.txn.timeout'.
> 
>
> Key: HIVE-11589
> URL: https://issues.apache.org/jira/browse/HIVE-11589
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.2.1
>Reporter: Takahiko Saito
>Priority: Minor
>
> When an user accidentally set an invalid value such as '-1' for 
> 'hive.txn.timeout', the query simply fails throwing 'NoSuchLockException'
> {noformat}
> 2015-08-16 23:25:43,149 ERROR [HiveServer2-Background-Pool: Thread-206]: 
> metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(159)) - 
> NoSuchLockException(message:No such lock: 40)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.heartbeatLock(TxnHandler.java:1710)
>   at 
> org.apache.hadoop.hive.metastore.txn.TxnHandler.unlock(TxnHandler.java:501)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.unlock(HiveMetaStore.java:5571)
>   at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
>   at com.sun.proxy.$Proxy7.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.unlock(HiveMetaStoreClient.java:1876)
>   at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
>   at com.sun.proxy.$Proxy8.unlock(Unknown Source)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.unlock(DbLockManager.java:134)
>   at 
> org.apache.hadoop.hive.ql.lockmgr.DbLockManager.releaseLocks(DbLockManager.java:153)
>   at 
> org.apache.hadoop.hive.ql.Driver.releaseLocksAndCommitOrRollback(Driver.java:1038)
>   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1208)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
>   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1054)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:154)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOperation.java:71)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:206)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at javax.security.auth.Subject.doAs(Subject.java:415)
>   at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:218)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}
> The better way to handle such an invalid value is to check the value 
> beforehand instead of throwing NoSuchLockException.



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


[jira] [Commented] (HIVE-6705) hive jdbc can not used by jmeter, because of unsupported auto commit feature

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-6705:
---

See HIVE-6712 for a patch with this change

> hive jdbc can not used by jmeter, because of unsupported auto commit feature
> 
>
> Key: HIVE-6705
> URL: https://issues.apache.org/jira/browse/HIVE-6705
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 0.12.0
> Environment: CentOS_X86_64 
> JMeter 2.11
>Reporter: Ben
>Assignee: Navis
> Attachments: HIVE-6705.1.patch.txt, HIVE-6705.2.patch.txt
>
>
> In apache jmeter ,the autocommit property is required.
> but in the hive jdbc the auto commit is unsupported method.
> in 
> /jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
> {quote}
>  public void setAutoCommit(boolean autoCommit) throws SQLException {
> // TODO Auto-generated method stub
>   throw new {color:red}  SQLException("Method not supported");
> {color}
>   }
> {quote}
> so ,should  we make a mock to support  the auto commit property == false ?
> {quote}
> public void setAutoCommit(boolean autoCommit) throws SQLException {
>   // TODO Auto-generated method stub
>  {color:red}if(autoCommit) {color}
>   throw new SQLException("Method not supported");
>  else
>   return;
>  }
> {quote}



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


[jira] [Updated] (HIVE-6712) HS2 JDBC driver is inconsistent w.r.t. auto commit

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter updated HIVE-6712:
--
Attachment: HIVE-6712.patch

This patch changes the behavior of setAutoCommit to allow setAutoCommit(true) 
to succeed silently and setAutoCommit(false) to throw an exception and fail, as 
all Hive transactions automatically commit and hive does not yet support manual 
transactions (see 
https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations).

> HS2 JDBC driver is inconsistent w.r.t. auto commit
> --
>
> Key: HIVE-6712
> URL: https://issues.apache.org/jira/browse/HIVE-6712
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Xuefu Zhang
>Assignee: David McWhorter
> Attachments: HIVE-6712.patch
>
>
> I see an inconsistency in HS2 JDBC driver code:
> {code}
>   @Override
>   public void setAutoCommit(boolean autoCommit) throws SQLException {
> if (autoCommit) {
>   throw new SQLException("enabling autocommit is not supported");
> }
>   }
> {code}
> From above, it seems that auto commit is not supported. However, 
> {code}
>   @Override
>   public boolean getAutoCommit() throws SQLException {
> return true;
>   }
> {code}



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


[jira] [Assigned] (HIVE-6712) HS2 JDBC driver is inconsistent w.r.t. auto commit

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter reassigned HIVE-6712:
-

Assignee: David McWhorter

> HS2 JDBC driver is inconsistent w.r.t. auto commit
> --
>
> Key: HIVE-6712
> URL: https://issues.apache.org/jira/browse/HIVE-6712
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Xuefu Zhang
>Assignee: David McWhorter
>
> I see an inconsistency in HS2 JDBC driver code:
> {code}
>   @Override
>   public void setAutoCommit(boolean autoCommit) throws SQLException {
> if (autoCommit) {
>   throw new SQLException("enabling autocommit is not supported");
> }
>   }
> {code}
> From above, it seems that auto commit is not supported. However, 
> {code}
>   @Override
>   public boolean getAutoCommit() throws SQLException {
> return true;
>   }
> {code}



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


[jira] [Commented] (HIVE-6705) hive jdbc can not used by jmeter, because of unsupported auto commit feature

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-6705:
---

That is, the behavior of getAutoCommit (returns true) is correct.

> hive jdbc can not used by jmeter, because of unsupported auto commit feature
> 
>
> Key: HIVE-6705
> URL: https://issues.apache.org/jira/browse/HIVE-6705
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 0.12.0
> Environment: CentOS_X86_64 
> JMeter 2.11
>Reporter: Ben
>Assignee: Navis
> Attachments: HIVE-6705.1.patch.txt, HIVE-6705.2.patch.txt
>
>
> In apache jmeter ,the autocommit property is required.
> but in the hive jdbc the auto commit is unsupported method.
> in 
> /jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
> {quote}
>  public void setAutoCommit(boolean autoCommit) throws SQLException {
> // TODO Auto-generated method stub
>   throw new {color:red}  SQLException("Method not supported");
> {color}
>   }
> {quote}
> so ,should  we make a mock to support  the auto commit property == false ?
> {quote}
> public void setAutoCommit(boolean autoCommit) throws SQLException {
>   // TODO Auto-generated method stub
>  {color:red}if(autoCommit) {color}
>   throw new SQLException("Method not supported");
>  else
>   return;
>  }
> {quote}



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


[jira] [Commented] (HIVE-6705) hive jdbc can not used by jmeter, because of unsupported auto commit feature

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-6705:
---

That is, the behavior of getAutoCommit (returns true) is correct.

> hive jdbc can not used by jmeter, because of unsupported auto commit feature
> 
>
> Key: HIVE-6705
> URL: https://issues.apache.org/jira/browse/HIVE-6705
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 0.12.0
> Environment: CentOS_X86_64 
> JMeter 2.11
>Reporter: Ben
>Assignee: Navis
> Attachments: HIVE-6705.1.patch.txt, HIVE-6705.2.patch.txt
>
>
> In apache jmeter ,the autocommit property is required.
> but in the hive jdbc the auto commit is unsupported method.
> in 
> /jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
> {quote}
>  public void setAutoCommit(boolean autoCommit) throws SQLException {
> // TODO Auto-generated method stub
>   throw new {color:red}  SQLException("Method not supported");
> {color}
>   }
> {quote}
> so ,should  we make a mock to support  the auto commit property == false ?
> {quote}
> public void setAutoCommit(boolean autoCommit) throws SQLException {
>   // TODO Auto-generated method stub
>  {color:red}if(autoCommit) {color}
>   throw new SQLException("Method not supported");
>  else
>   return;
>  }
> {quote}



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


[jira] [Commented] (HIVE-6705) hive jdbc can not used by jmeter, because of unsupported auto commit feature

2015-10-20 Thread David McWhorter (JIRA)

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

David McWhorter commented on HIVE-6705:
---

I don't think the behavior of this patch is right.  Since hive does not yet 
support manual transactions, all statements autocommit.  So, the behavior of 
isAutoCommit is correct, and setAutoCommit should silently allow autoCommit = 
true but throw an exception saying the operation is not support if if 
autocommit = false.

So the patch should look like
```
if (!autoCommit) {
   throw new SQLException("disabling autocommit is not supported");
}
```

> hive jdbc can not used by jmeter, because of unsupported auto commit feature
> 
>
> Key: HIVE-6705
> URL: https://issues.apache.org/jira/browse/HIVE-6705
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Affects Versions: 0.12.0
> Environment: CentOS_X86_64 
> JMeter 2.11
>Reporter: Ben
>Assignee: Navis
> Attachments: HIVE-6705.1.patch.txt, HIVE-6705.2.patch.txt
>
>
> In apache jmeter ,the autocommit property is required.
> but in the hive jdbc the auto commit is unsupported method.
> in 
> /jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
> {quote}
>  public void setAutoCommit(boolean autoCommit) throws SQLException {
> // TODO Auto-generated method stub
>   throw new {color:red}  SQLException("Method not supported");
> {color}
>   }
> {quote}
> so ,should  we make a mock to support  the auto commit property == false ?
> {quote}
> public void setAutoCommit(boolean autoCommit) throws SQLException {
>   // TODO Auto-generated method stub
>  {color:red}if(autoCommit) {color}
>   throw new SQLException("Method not supported");
>  else
>   return;
>  }
> {quote}



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