Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion docs/src/main/sphinx/connector/phoenix.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,34 @@ The following Phoenix-specific configuration properties are available:

| Property name | Required | Description |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we change this whole list into a list-table .. but that could be a separate commit before or after .. or even a separate PR

|------------------------------------| -------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `phoenix.connection-url` | Yes | `jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path]`. The `zk_quorum` is a comma separated list of ZooKeeper servers. The `zk_port` is the ZooKeeper port. The `zk_hbase_path` is the HBase root znode path, that is configurable using `hbase-site.xml`. By default the location is `/hbase` |
| `phoenix.connection-url` | Yes | See [](phoenix-connection-url). |
| `phoenix.config.resources` | No | Comma-separated list of configuration files (e.g. `hbase-site.xml`) to use for connection properties. These files must exist on the machines running Trino. |
| `phoenix.max-scans-per-split` | No | Maximum number of HBase scans that will be performed in a single split. Default is 20. Lower values will lead to more splits in Trino. Can also be set via session propery `max_scans_per_split`. For details see: [https://phoenix.apache.org/update_statistics.html](https://phoenix.apache.org/update_statistics.html). (This setting has no effect when guideposts are disabled in Phoenix.) |
| `phoenix.server-scan-page-timeout` | No | The time limit on the amount of work single RPC request can do before it times out. Type: [](prop-type-duration). |

(phoenix-connection-url)=
### Connection URL

The connection URL for Phoenix set with `phoenix.connection-url` supports multiple formats:

* `jdbc:phoenix[:zk_quorum][:zk_port][:zk_hbase_path][:principal][:keytab][;options]`:
Comment thread
mosabua marked this conversation as resolved.
Outdated
Connection uses the HBase Zookeeper Registry. `zk_quorum` is a comma-separated
list of ZooKeeper servers. `zk_port` is the ZooKeeper port.
`zk_hbase_path` is the HBase root znode path, that is configurable using
`hbase-site.xml`. By default the location is `/hbase`. Principal, Keytab and
Options are optional.
* `jdbc:phoenix+zk[:host1\:port1][,:host2\:port2]...[,:hostN\:portN][:zk_hbase_path][:principal][:keytab][;options]`:
Uses the same connection as the preceding example with `host:port` pairs as a comma-separated list.
* `jdbc:phoenix+rpc[:host1\:port1][,:host2\:port2]...[,:hostN\:portN][::principal][:keytab][;options]`:
Connection uses the HBase RPC Registry. Recommended for HBase 3+
versions. `host:port` pairs are comma-separated.
Host names refer to HMaster server names, port refers to HMaster ports.
Principal, Keytab and Options are optional.
* `jdbc:phoenix+master[:host1\:port1][,:host2\:port2]...[,:hostN\:portN][::principal][:keytab][;options]`:
Connection uses the HBase Master Registry. `host:port` pairs are comma-separated.
Host names refers to HMaster server names, port refers to HMaster ports.
Principal, Keytab and Options are optional.

```{include} jdbc-common-configurations.fragment
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void close()

public String getJdbcUrl()
{
return format("jdbc:phoenix:localhost:%d:/hbase;phoenix.schema.isNamespaceMappingEnabled=true", port);
// Alternative: "jdbc:phoenix+rpc:localhost\\:%d;phoenix.schema.isNamespaceMappingEnabled=true" where %d = master's port
return format("jdbc:phoenix+zk:localhost\\:%d:/hbase;phoenix.schema.isNamespaceMappingEnabled=true", port);
}
}