Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,13 @@ session = (new TableSessionBuilder())
->build();
```

`host()` also accepts an unbracketed IPv6 address; `rpcPort()` still sets the port separately.

#### 3.2.2 Configurable Parameter List

| **Parameter Name** | **Description** | **Default Value** |
| :---: | :---: | :---: |
| host | Set the connected node IP | "127.0.0.1" ("localhost") |
| host | IP address of the node to connect to; supports an unbracketed IPv4 address, an unbracketed IPv6 address, or a hostname. Omit brackets for IPv6. IPv6 is supported from V2.0.12. | "127.0.0.1" ("localhost") |
| rpcPort | Set the connected node port | 6667 |
| username | Set the connection username | "root" |
| password | Set the connection password | "root" |
Expand Down Expand Up @@ -451,4 +453,3 @@ Failed to delete cached file C:\Users\Administrator\.m2\repository\.cache\downlo
Possible fixes:
- Try to delete the ".m2\repository\\.cache\" directory and try again.
- Add "\<skipCache>true\</skipCache>" configuration to the download-maven-plugin maven phase that complains this error.

9 changes: 9 additions & 0 deletions src/UserGuide/Master/Table/API/Programming-JDBC_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,13 @@ public class TableModelJDBCExample {
}
}
}

```java
// IPv6 + Table model
String url = "jdbc:iotdb://[DN_IPV6_ADDRESS]:6667?sql_dialect=table";
// IPv6 + Table model + SSL
String sslUrl = "jdbc:iotdb://[DN_IPV6_ADDRESS]:6667?sql_dialect=table&use_ssl=true";
```

Starting with V2.0.12, table-model JDBC URLs also support `[ipv6]:port`. Replace `DN_IPV6_ADDRESS` with the DataNode’s actual reachable address. For SSL over IPv6, the server certificate SAN uses the unbracketed IPv6 address without a port. Retain the existing table-model URL examples.
```
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Since V2.0.11, `TableSessionBuilder` supports configuring the RPC compression me

| **Parameter** | **Description** | **Default Value** |
|-----------------------------------------------------| ------------------------------------------------------------ | ------------------------------------------------- |
| nodeUrls(List\<String> nodeUrls) | Sets the list of IoTDB cluster node URLs. | `Collections.singletonList("``localhost:6667``")` |
| nodeUrls(List\<String> nodeUrls) | Sets the IoTDB cluster node URL list; IPv6 endpoints use `[ipv6]:port`, for example `[DN_IPV6_ADDRESS]:6667`. IPv6 is supported from V2.0.12. | `Collections.singletonList("``localhost:6667``")` |
| username(String username) | Sets the username for the connection. | `"root"` |
| password(String password) | Sets the password for the connection. | `"TimechoDB@2021"` (the default password is `root` before V2.0.6.x) |
| database(String database) | Sets the target database name. | `null` |
Expand Down Expand Up @@ -182,6 +182,8 @@ Since V2.0.11, `TableSessionBuilder` supports configuring the RPC compression me
| withDateEncoding(TSEncoding tsEncoding) | Sets the encoding for DATE values. | `TSEncoding.TS_2DIFF` |
| connectionTimeoutInMs(int connectionTimeoutInMs) | Sets the connection timeout in milliseconds. | `0` (no timeout) |

Starting with V2.0.12, table-model `nodeUrls` also supports IPv6 endpoints. `DN_IPV6_ADDRESS` in the table is a DataNode address placeholder; replace it with an actual reachable address. Existing defaults remain unchanged. When configuring `TableSessionBuilder` with separate `host`/`rpcPort` settings, use an unbracketed IPv6 host; only node URL strings use brackets.

#### 3.2.3 Sample Code

```Java
Expand Down Expand Up @@ -520,7 +522,7 @@ The `TableSessionPoolBuilder` class is a builder for configuring and creating `I

| **Parameter** | **Description** | **Default Value** |
|---------------------------------------------------------------| ------------------------------------------------------------ | --------------------------------------------- |
| nodeUrls(List\<String> nodeUrls) | Sets the list of IoTDB cluster node URLs. | `Collections.singletonList("localhost:6667")` |
| nodeUrls(List\<String> nodeUrls) | Sets the IoTDB cluster node URL list; IPv6 endpoints use `[ipv6]:port`, for example `[DN_IPV6_ADDRESS]:6667`. IPv6 is supported from V2.0.12. | `Collections.singletonList("localhost:6667")` |
| maxSize(int maxSize) | Sets the maximum size of the session pool, i.e., the maximum number of sessions allowed in the pool. | `5` |
| user(String user) | Sets the username for the connection. | `"root"` |
| password(String password) | Sets the password for the connection. | `"root"` |
Expand Down Expand Up @@ -944,4 +946,6 @@ public class TableModelSessionPoolExample {
}
}
}

To connect to IPv6 nodes in the Chapter 5 example, `LOCAL_URL` can use `[ipv6]:port`; retain the existing address and initialization code.
```
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,16 @@ def close(self):

| **Parameter** | **Description** | **Type** | **Default Value** |
| ------------------ | ------------------------------------- | -------- | ------------------------- |
| node_urls | List of database node URLs. | `list` | `["localhost:6667"]` |
| node_urls | List of database connection node URLs; IPv6 endpoints use `[ipv6]:port`, for example `[DN_IPV6_ADDRESS]:6667`. IPv6 is supported from V2.0.12. | `list` | `["localhost:6667"]` |
| username | Username for the database connection. | `str` | `"root"` |
| password | Password for the database connection. | `str` | `"root"` |
| database | Target database to connect to. | `str` | `None` |
| fetch_size | Number of rows to fetch per query. | `int` | `5000` |
| time_zone | Default session time zone. | `str` | `Session.DEFAULT_ZONE_ID` |
| enable_compression | Enable data compression. | `bool` | `False` |

Starting with V2.0.12, table-model `node_urls` supports IPv6 endpoints. `DN_IPV6_ADDRESS` in the table is a DataNode address placeholder; retain existing defaults and examples. When `TableSession`/`TableSessionPool` take host and port separately, use an unbracketed IPv6 host; node URL lists use `[ipv6]:port`.

#### Sample Code

```Python
Expand Down Expand Up @@ -231,7 +233,7 @@ def close(self):

| **Paramater** | **Description** | **Type** | **Default Value** |
| ------------------ | ------------------------------------------------------------ | -------- | -------------------------- |
| node_urls | List of IoTDB cluster node URLs. | `list` | None |
| node_urls | List of database connection node URLs; IPv6 endpoints use `[ipv6]:port`, for example `[DN_IPV6_ADDRESS]:6667`. IPv6 is supported from V2.0.12. | `list` | None |
| max_pool_size | Maximum size of the session pool, i.e., the maximum number of sessions allowed in the pool. | `int` | `5` |
| username | Username for the connection. | `str` | `Session.DEFAULT_USER` |
| password | Password for the connection. | `str` | `Session.DEFAULT_PASSWORD` |
Expand Down Expand Up @@ -395,6 +397,8 @@ if __name__ == "__main__":
df = get_data()
```

Use an unbracketed IPv6 host for SSL connections. The CA specified by `ca_certs` must validate the server certificate, and the server certificate SAN must contain the actual unbracketed IPv6 `IP Address` used by the client. TLS server identity verification fails if the SAN does not contain that address.

## 4. Sample Code

**Session** Example: You can find the full example code at [Session Example](https://github.com/apache/iotdb/blob/master/iotdb-client/client-py/table_model_session_example.py).
Expand Down Expand Up @@ -570,4 +574,3 @@ delete_data()
session_pool.close()
print("example is finished!")
```

Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,26 @@ AINode supports modifying some necessary parameters. You can find the following
| **Name** | **Description** | **Type** | **Default Value** |
| ------------------------------ | ------------------------------------------------------------ | -------- | ------------------ |
| cluster_name | Identifier of the cluster AINode joins | string | defaultCluster |
| ain_seed_config_node | Address of the ConfigNode registered when AINode starts | String | 127.0.0.1:10710 |
| ain_cluster_ingress_address | RPC address of the DataNode for AINode to pull data | String | 127.0.0.1 |
| ain_seed_config_node | ConfigNode endpoint used for AINode registration at startup. Supports `ipv4:port`, `hostname:port`, or `[ipv6]:port`, for example `[CN_IPV6_ADDRESS]:10710`. IPv6 is supported from V2.0.12. | String | 127.0.0.1:10710 |
| ain_cluster_ingress_address | DataNode RPC address from which AINode pulls data. Supports an unbracketed IPv4 address, an unbracketed IPv6 address, or a hostname, without a port. IPv6 is supported from V2.0.12. | String | 127.0.0.1 |
| ain_cluster_ingress_port | RPC port of the DataNode for AINode to pull data | Integer | 6667 |
| ain_cluster_ingress_username | Client username for AINode to pull data from the DataNode | String | root |
| ain_cluster_ingress_password | Client password for AINode to pull data from the DataNode | String | root |
| ain_cluster_ingress_time_zone | Client time zone for AINode to pull data from the DataNode | String | UTC+8 |
| ain_inference_rpc_address | Address for AINode to provide services and communication (internal interface) | String | 127.0.0.1 |
| ain_inference_rpc_address | Address used for AINode services and internal communication. Supports an unbracketed IPv4 address, an unbracketed IPv6 address, or a hostname, without a port. IPv6 is supported from V2.0.12. | String | 127.0.0.1 |
| ain_inference_rpc_port | Port for AINode to provide services and communication | String | 10810 |
| ain_system_dir | Metadata storage path for AINode (relative path starts from OS-dependent directory; absolute path is recommended) | String | data/AINode/system |
| ain_models_dir | Path to store model files for AINode (relative path starts from OS-dependent directory; absolute path is recommended) | String | data/AINode/models |
| ain_thrift_compression_enabled | Whether to enable Thrift compression for AINode (0=disabled, 1=enabled) | Boolean | 0 |

```properties
ain_seed_config_node=[CN_IPV6_ADDRESS]:10710
ain_cluster_ingress_address=DN_IPV6_ADDRESS
ain_inference_rpc_address=AINODE_IPV6_ADDRESS
```

`ain_seed_config_node` includes both an address and port and uses `[ipv6]:port` for IPv6. `ain_cluster_ingress_address` and `ain_inference_rpc_address` contain addresses only and use unbracketed IPv6. Replace `CN_IPV6_ADDRESS`, `DN_IPV6_ADDRESS`, and `AINODE_IPV6_ADDRESS` with the actual reachable addresses of the ConfigNode, DataNode, and AINode. After startup, verify that AINode is registered with ConfigNode and can access DataNode.

### 3.3 Importing Weight Files

> Offline environment only (Online environments can skip this step)
Expand Down
Loading