[TRAFODION-3331] JDBC T4 driver to support login timeout and query timeout

1. Support to cancel the query when cqd CANCEL_QUERY_ALLOWED is set to OFF.

When this CQD is set to OFF, the query can't be canceled gracefully
because the query is not registered with cancel broker.
This change allows the master process to be stopped and abort the query
abruptly when the query is active for longer than the minimum required
time. To activate this feature.
a) A variable MIN_QUERY_ACTIVE_TIME_IN_SECS_BEFORE_CANCEL=n need to be set
   where 'n' is duration in secs
b) control query cancel qid <qid> needs to issued after 'n' seconds.
2. Streamlined the query timeout concept in JDBC driver and Sync up JDBC driver with this concept in the server side.
a) The 2 properties ignoreCancel and activeTimeBeforeCancelInSecs can be used to enable query timeout
   and cancel from JDBC driver. By default ignoreCancel is set to true, activeTimeBeforeCancelInSecs is set to -1.
b) During socket read, timeout is set based on type of request.
   If it is connection related, timeout is login timeout and it will be query timeout otherwise.
c) By default network timeout is set to 1 secs. socket read times out every 1 sec and check if the timeout has elapsed.
d) If the timeout pertains to the login timeout, an error is returned.
e) If the timeout pertains to the query timeout, if ignoreCancel is false, control query cancel qid is sent.
   If ignoreCancel is true, it is checked if the query has been active longer than activeTimeBeforeCancel. Then cancel is sent to server.
f) If Statement.cancel is issued by the application, then it is checked if the connection is waiting in socket read.
   If so, the above timeout mechanism can kick in to send cancel to the server.
   If not, an internal close is issued to the server to free up system resources associated with the statement.
25 files changed
tree: 2f1d1efae9a4f496bb8c0d7866ea88a364741a5b
  1. core/
  2. dcs/
  3. docs/
  4. install/
  5. licenses/
  6. tests/
  7. tools/
  8. win-odbc64/
  9. wms/
  10. .gitattributes
  11. .gitignore
  12. .rat-excludes
  13. build_easily.sh
  14. doap.rdf
  15. env.sh
  16. Makefile
  17. NOTICE
  18. pom.xml
  19. RAT_README
  20. README
  21. README.md
README.md

Apache Trafodion

trafodion logo

Apache Trafodion is a webscale SQL-on-Hadoop solution enabling transactional or operational workloads on Hadoop. The name “Trafodion” (the Welsh word for transactions, pronounced “Tra-vod-eee-on”) was chosen specifically to emphasize the differentiation that Trafodion provides in closing a critical gap in the Hadoop ecosystem. Trafodion builds on the scalability, elasticity, and flexibility of Hadoop. Trafodion extends Hadoop to provide guaranteed transactional integrity, enabling new kinds of big data applications to run on Hadoop.

To get started using Apache Trafodion:

  • documentation for this release can be viewed on the Apache Trafodion wiki page:

http://trafodion.apache.org/documentation.html

  • release notes describing changes for particular releases can be viewed:

http://trafodion.apache.org/release-notes.html

Cryptographic software notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information. The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The product links OpenSSL libraries which can be used by the product to encode and decode passwords through the connectivity interface.

Apache Trafodion is distributed under the terms of the Apache License, Version 2.0.