hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject hive git commit: HIVE-10726: Hive JDBC setQueryTimeout should not throw exception to make it work with JMeter (Prasanth Jayachandran reviewed by Thejas M Nair)
Date Mon, 18 May 2015 04:30:36 GMT
Repository: hive
Updated Branches:
  refs/heads/master 52308ab6c -> b28d394b5


HIVE-10726: Hive JDBC setQueryTimeout should not throw exception to make it work with JMeter
(Prasanth Jayachandran reviewed by Thejas M Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b28d394b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b28d394b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b28d394b

Branch: refs/heads/master
Commit: b28d394b571659e84856e73de789a884c1fdb9b4
Parents: 52308ab
Author: Prasanth Jayachandran <j.prasanth.j@gmail.com>
Authored: Sun May 17 21:30:25 2015 -0700
Committer: Prasanth Jayachandran <j.prasanth.j@gmail.com>
Committed: Sun May 17 21:30:25 2015 -0700

----------------------------------------------------------------------
 jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b28d394b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
----------------------------------------------------------------------
diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
index c2d0c9d..6b3d05c 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
@@ -29,6 +29,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hive.service.cli.RowSet;
 import org.apache.hive.service.cli.RowSetFactory;
 import org.apache.hive.service.cli.thrift.TCLIService;
@@ -51,6 +53,7 @@ import org.apache.hive.service.cli.thrift.TFetchOrientation;
  *
  */
 public class HiveStatement implements java.sql.Statement {
+  public static final Log LOG = LogFactory.getLog(HiveStatement.class.getName());
   private final HiveConnection connection;
   private TCLIService.Iface client;
   private TOperationHandle stmtHandle = null;
@@ -736,7 +739,10 @@ public class HiveStatement implements java.sql.Statement {
 
   @Override
   public void setQueryTimeout(int seconds) throws SQLException {
-    throw new SQLException("Method not supported");
+    // 0 is supported which means "no limit"
+    if (seconds != 0) {
+      throw new SQLException("Query timeout seconds must be 0");
+    }
   }
 
   /*


Mime
View raw message