This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch remove_old_cluster_doc in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git
commit fb4f5815395e3f148d53becf0a6fb9b7d2df0143 Author: HTHou <[email protected]> AuthorDate: Wed Aug 28 10:35:00 2024 +0800 Remove documents of old cluster --- .../Master/API/Programming-Java-Native-API.md | 97 --------------------- .../V1.0.x/API/Programming-Java-Native-API.md | 98 --------------------- .../V1.1.x/API/Programming-Java-Native-API.md | 99 ---------------------- .../V1.2.x/API/Programming-Java-Native-API.md | 97 --------------------- .../latest/API/Programming-Java-Native-API.md | 96 --------------------- .../Master/API/Programming-Java-Native-API.md | 92 -------------------- .../V1.0.x/API/Programming-Java-Native-API.md | 93 -------------------- .../V1.1.x/API/Programming-Java-Native-API.md | 93 -------------------- .../V1.2.x/API/Programming-Java-Native-API.md | 93 -------------------- .../latest/API/Programming-Java-Native-API.md | 94 -------------------- 10 files changed, 952 deletions(-) diff --git a/src/UserGuide/Master/API/Programming-Java-Native-API.md b/src/UserGuide/Master/API/Programming-Java-Native-API.md index 0cb5e6c..4e852d3 100644 --- a/src/UserGuide/Master/API/Programming-Java-Native-API.md +++ b/src/UserGuide/Master/API/Programming-Java-Native-API.md @@ -537,100 +537,3 @@ Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## Cluster information related APIs (only works in the cluster mode) - -Cluster information related APIs allow users get the cluster info like where a database will be -partitioned to, the status of each node in the cluster. - -To use the APIs, add dependency in your pom file: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -How to open a connection: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -APIs in `ClusterInfoService.Client`: - - -* Get the physical hash ring of the cluster: - -```java -list<Node> getRing(); -``` - -* Get data partition information of input path and time range: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* Get metadata partition information of input path: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* Get the status (alive or not) of all nodes: -```java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* get the raft group info (voteFor, term, etc..) of the connected node - (Notice that this API is rarely used by users): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/UserGuide/V1.0.x/API/Programming-Java-Native-API.md b/src/UserGuide/V1.0.x/API/Programming-Java-Native-API.md index f8283e5..a97c84c 100644 --- a/src/UserGuide/V1.0.x/API/Programming-Java-Native-API.md +++ b/src/UserGuide/V1.0.x/API/Programming-Java-Native-API.md @@ -539,101 +539,3 @@ Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` - -## Cluster information related APIs (only works in the cluster mode) - -Cluster information related APIs allow users get the cluster info like where a database will be -partitioned to, the status of each node in the cluster. - -To use the APIs, add dependency in your pom file: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -How to open a connection: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -APIs in `ClusterInfoService.Client`: - - -* Get the physical hash ring of the cluster: - -```java -list<Node> getRing(); -``` - -* Get data partition information of input path and time range: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* Get metadata partition information of input path: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* Get the status (alive or not) of all nodes: -```java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* get the raft group info (voteFor, term, etc..) of the connected node - (Notice that this API is rarely used by users): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/UserGuide/V1.1.x/API/Programming-Java-Native-API.md b/src/UserGuide/V1.1.x/API/Programming-Java-Native-API.md index ec67ad2..ea52e24 100644 --- a/src/UserGuide/V1.1.x/API/Programming-Java-Native-API.md +++ b/src/UserGuide/V1.1.x/API/Programming-Java-Native-API.md @@ -509,102 +509,3 @@ you have to call `SessionPool.closeResultSet(wrapper)` manually; Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java``` Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` - - -## Cluster information related APIs (only works in the cluster mode) - -Cluster information related APIs allow users get the cluster info like where a database will be -partitioned to, the status of each node in the cluster. - -To use the APIs, add dependency in your pom file: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -How to open a connection: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -APIs in `ClusterInfoService.Client`: - - -* Get the physical hash ring of the cluster: - -``` java -list<Node> getRing(); -``` - -* Get data partition information of input path and time range: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* Get metadata partition information of input path: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* Get the status (alive or not) of all nodes: -``` java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* get the raft group info (voteFor, term, etc..) of the connected node - (Notice that this API is rarely used by users): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/UserGuide/V1.2.x/API/Programming-Java-Native-API.md b/src/UserGuide/V1.2.x/API/Programming-Java-Native-API.md index 4c1a6bb..a9f5fb3 100644 --- a/src/UserGuide/V1.2.x/API/Programming-Java-Native-API.md +++ b/src/UserGuide/V1.2.x/API/Programming-Java-Native-API.md @@ -534,100 +534,3 @@ Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## Cluster information related APIs (only works in the cluster mode) - -Cluster information related APIs allow users get the cluster info like where a database will be -partitioned to, the status of each node in the cluster. - -To use the APIs, add dependency in your pom file: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -How to open a connection: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -APIs in `ClusterInfoService.Client`: - - -* Get the physical hash ring of the cluster: - -```java -list<Node> getRing(); -``` - -* Get data partition information of input path and time range: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* Get metadata partition information of input path: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* Get the status (alive or not) of all nodes: -```java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* get the raft group info (voteFor, term, etc..) of the connected node - (Notice that this API is rarely used by users): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/UserGuide/latest/API/Programming-Java-Native-API.md b/src/UserGuide/latest/API/Programming-Java-Native-API.md index 4fe0bee..119d21a 100644 --- a/src/UserGuide/latest/API/Programming-Java-Native-API.md +++ b/src/UserGuide/latest/API/Programming-Java-Native-API.md @@ -534,100 +534,4 @@ Examples: ```session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## Cluster information related APIs (only works in the cluster mode) -Cluster information related APIs allow users get the cluster info like where a database will be -partitioned to, the status of each node in the cluster. - -To use the APIs, add dependency in your pom file: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -How to open a connection: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -APIs in `ClusterInfoService.Client`: - - -* Get the physical hash ring of the cluster: - -```java -list<Node> getRing(); -``` - -* Get data partition information of input path and time range: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* Get metadata partition information of input path: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* Get the status (alive or not) of all nodes: -```java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* get the raft group info (voteFor, term, etc..) of the connected node - (Notice that this API is rarely used by users): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/zh/UserGuide/Master/API/Programming-Java-Native-API.md b/src/zh/UserGuide/Master/API/Programming-Java-Native-API.md index 120ed21..16c79c4 100644 --- a/src/zh/UserGuide/Master/API/Programming-Java-Native-API.md +++ b/src/zh/UserGuide/Master/API/Programming-Java-Native-API.md @@ -509,96 +509,4 @@ void testInsertTablets(Map<String, Tablet> tablets) 或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## 集群信息相关的接口 (仅在集群模式下可用) -集群信息相关的接口允许用户获取如数据分区情况、节点是否当机等信息。 -要使用该 API,需要增加依赖: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>${project.version}</version> - </dependency> -</dependencies> -``` - -建立连接与关闭连接的示例: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -API 列表: - -* 获取集群中的各个节点的信息(构成哈希环) - -``` java -list<Node> getRing(); -``` - -* 给定一个路径(应包括一个 SG 作为前缀)和起止时间,获取其覆盖的数据分区情况: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* 给定一个路径(应包括一个 SG 作为前缀),获取其被分到了哪个节点上: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* 获取所有节点的死活状态: -``` java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* 获取当前连接节点的 Raft 组信息(投票编号等)(一般用户无需使用该接口): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/zh/UserGuide/V1.0.x/API/Programming-Java-Native-API.md b/src/zh/UserGuide/V1.0.x/API/Programming-Java-Native-API.md index 5494c4f..348f8c8 100644 --- a/src/zh/UserGuide/V1.0.x/API/Programming-Java-Native-API.md +++ b/src/zh/UserGuide/V1.0.x/API/Programming-Java-Native-API.md @@ -522,96 +522,3 @@ void testInsertTablets(Map<String, Tablet> tablets) 或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## 集群信息相关的接口 (仅在集群模式下可用) - -集群信息相关的接口允许用户获取如数据分区情况、节点是否当机等信息。 -要使用该 API,需要增加依赖: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -建立连接与关闭连接的示例: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -API 列表: - -* 获取集群中的各个节点的信息(构成哈希环) - -```java -list<Node> getRing(); -``` - -* 给定一个路径(应包括一个 SG 作为前缀)和起止时间,获取其覆盖的数据分区情况: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* 给定一个路径(应包括一个 SG 作为前缀),获取其被分到了哪个节点上: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* 获取所有节点的死活状态: -```java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* 获取当前连接节点的 Raft 组信息(投票编号等)(一般用户无需使用该接口): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/zh/UserGuide/V1.1.x/API/Programming-Java-Native-API.md b/src/zh/UserGuide/V1.1.x/API/Programming-Java-Native-API.md index 501e0dd..0a62cf8 100644 --- a/src/zh/UserGuide/V1.1.x/API/Programming-Java-Native-API.md +++ b/src/zh/UserGuide/V1.1.x/API/Programming-Java-Native-API.md @@ -503,96 +503,3 @@ void testInsertTablets(Map<String, Tablet> tablets) 或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -### 集群信息相关的接口 (仅在集群模式下可用) - -集群信息相关的接口允许用户获取如数据分区情况、节点是否当机等信息。 -要使用该 API,需要增加依赖: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>1.0.0</version> - </dependency> -</dependencies> -``` - -建立连接与关闭连接的示例: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -API 列表: - -* 获取集群中的各个节点的信息(构成哈希环) - -``` java -list<Node> getRing(); -``` - -* 给定一个路径(应包括一个 SG 作为前缀)和起止时间,获取其覆盖的数据分区情况: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* 给定一个路径(应包括一个 SG 作为前缀),获取其被分到了哪个节点上: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* 获取所有节点的死活状态: -``` java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* 获取当前连接节点的 Raft 组信息(投票编号等)(一般用户无需使用该接口): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/zh/UserGuide/V1.2.x/API/Programming-Java-Native-API.md b/src/zh/UserGuide/V1.2.x/API/Programming-Java-Native-API.md index 7cb72e0..da81265 100644 --- a/src/zh/UserGuide/V1.2.x/API/Programming-Java-Native-API.md +++ b/src/zh/UserGuide/V1.2.x/API/Programming-Java-Native-API.md @@ -505,96 +505,3 @@ void testInsertTablets(Map<String, Tablet> tablets) 或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` -## 集群信息相关的接口 (仅在集群模式下可用) - -集群信息相关的接口允许用户获取如数据分区情况、节点是否当机等信息。 -要使用该 API,需要增加依赖: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>${project.version}</version> - </dependency> -</dependencies> -``` - -建立连接与关闭连接的示例: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -API 列表: - -* 获取集群中的各个节点的信息(构成哈希环) - -``` java -list<Node> getRing(); -``` - -* 给定一个路径(应包括一个 SG 作为前缀)和起止时间,获取其覆盖的数据分区情况: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* 给定一个路径(应包括一个 SG 作为前缀),获取其被分到了哪个节点上: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* 获取所有节点的死活状态: -``` java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* 获取当前连接节点的 Raft 组信息(投票编号等)(一般用户无需使用该接口): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -``` diff --git a/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md b/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md index 7cd5317..ed381df 100644 --- a/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md +++ b/src/zh/UserGuide/latest/API/Programming-Java-Native-API.md @@ -504,97 +504,3 @@ void testInsertTablets(Map<String, Tablet> tablets) 使用示例可以参见 `session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java` 或 `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java` - -## 集群信息相关的接口 (仅在集群模式下可用) - -集群信息相关的接口允许用户获取如数据分区情况、节点是否当机等信息。 -要使用该 API,需要增加依赖: - -```xml -<dependencies> - <dependency> - <groupId>org.apache.iotdb</groupId> - <artifactId>iotdb-thrift-cluster</artifactId> - <version>${project.version}</version> - </dependency> -</dependencies> -``` - -建立连接与关闭连接的示例: - -```java -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; -import org.apache.thrift.transport.TTransportException; -import org.apache.iotdb.rpc.RpcTransportFactory; - -public class CluserInfoClient { - TTransport transport; - ClusterInfoService.Client client; - public void connect() { - transport = - RpcTransportFactory.INSTANCE.getTransport( - new TSocket( - // the RPC address - IoTDBDescriptor.getInstance().getConfig().getRpcAddress(), - // the RPC port - ClusterDescriptor.getInstance().getConfig().getClusterRpcPort())); - try { - transport.open(); - } catch (TTransportException e) { - Assert.fail(e.getMessage()); - } - //get the client - client = new ClusterInfoService.Client(new TBinaryProtocol(transport)); - } - public void close() { - transport.close(); - } -} -``` - -API 列表: - -* 获取集群中的各个节点的信息(构成哈希环) - -``` java -list<Node> getRing(); -``` - -* 给定一个路径(应包括一个 SG 作为前缀)和起止时间,获取其覆盖的数据分区情况: - -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return the data partition info. If the time range only covers one data partition, the the size - * of the list is one. - */ -list<DataPartitionEntry> getDataPartition(1:string path, 2:long startTime, 3:long endTime); -``` - -* 给定一个路径(应包括一个 SG 作为前缀),获取其被分到了哪个节点上: -```java -/** - * @param path input path (should contains a database name as its prefix) - * @return metadata partition information - */ -list<Node> getMetaPartition(1:string path); -``` - -* 获取所有节点的死活状态: -``` java -/** - * @return key: node, value: live or not - */ -map<Node, bool> getAllNodeStatus(); -``` - -* 获取当前连接节点的 Raft 组信息(投票编号等)(一般用户无需使用该接口): -```java -/** - * @return A multi-line string with each line representing the total time consumption, invocation - * number, and average time consumption. - */ -string getInstrumentingInfo(); -```
