- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
HBase/Phoenix - How to specify autocommit in JDBC URL ?
- Labels:
-
Apache HBase
-
Apache Phoenix
Created ‎05-08-2017 03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to avoid setting auto-commit=true by default, thus I am not adding the required property in hbase-site.xml.
However, I want to add auto commit property to the jdbc url so that I can get a connection with autocommit=true on need basis.
I am not able to find how to add this property to connection url.
I have a kerberized cluster and I an using the following url:
jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path][:headless_keytab_file:principal]
I also tried the following approach but it did not connect due to malformed url:
jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path][:headless_keytab_file:principal][:AutoCommit=true]
Created ‎05-08-2017 03:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the colon with a semi-colon in jdbc url and this will work:jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path][:headless_keytab_file:principal] [;autocommit=true]
Created ‎05-08-2017 03:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the colon with a semi-colon in jdbc url and this will work:jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path][:headless_keytab_file:principal] [;autocommit=true]
Created ‎05-08-2017 07:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. This solved the problem.
Created ‎05-08-2017 03:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can use PhoenixRuntime.AUTO_COMMIT_ATTRIB as supported in following class.
Please see the following JIRA to make sure you are using the version of Phoenix that supports it.
