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
13 changes: 7 additions & 6 deletions src/UserGuide/Master/Table/API/Programming-JDBC_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@
under the License.

-->
# JDBC

The IoTDB JDBC provides a standardized way to interact with the IoTDB database, allowing users to execute SQL statements from Java programs for managing databases and time-series data. It supports operations such as connecting to the database, creating, querying, updating, and deleting data, as well as batch insertion and querying of time-series data.

**Note:** The current JDBC implementation is designed primarily for integration with third-party tools. High-performance writing **may not be achieved** when using JDBC for insert operations. For Java applications, it is recommended to use the **JAVA Native API** for optimal performance.

## Prerequisites
## 1. Prerequisites

### **Environment Requirements**
### 1.1 **Environment Requirements**

- **JDK:** Version 1.8 or higher
- **Maven:** Version 3.6 or higher

### **Adding Maven Dependencies**
### 1.2 **Adding Maven Dependencies**

Add the following dependency to your Maven `pom.xml` file:

Expand All @@ -44,13 +45,13 @@ Add the following dependency to your Maven `pom.xml` file:
</dependencies>
```

## Read and Write Operations
## 2. Read and Write Operations

**Write Operations:** Perform database operations such as inserting data, creating databases, and creating time-series using the `execute` method.

**Read Operations:** Execute queries using the `executeQuery` method and retrieve results via the `ResultSet` object.

### Method Overview
### 2.1 Method Overview

| **Method Name** | **Description** | **Parameters** | **Return Value** |
| ------------------------------------------------------------ | ----------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------- |
Expand All @@ -63,7 +64,7 @@ Add the following dependency to your Maven `pom.xml` file:
| ResultSet.next() | Moves to the next row in the result set | None | `boolean`: Whether the move was successful |
| ResultSet.getString(int columnIndex) | Retrieves the string value of a specified column | `columnIndex`: Column index (starting from 1) | `String`: Column value |

## Sample Code
## 3. Sample Code

**Note:** When using the Table Model, you must specify the `sql_dialect` parameter as `table` in the URL. Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
under the License.

-->
# Java Native API

IoTDB provides a Java native client driver and a session pool management mechanism. These tools enable developers to interact with IoTDB using object-oriented APIs, allowing time-series objects to be directly assembled and inserted into the database without constructing SQL statements. It is recommended to use the `ITableSessionPool` for multi-threaded database operations to maximize efficiency.

## Prerequisites
## 1. Prerequisites

### Environment Requirements
### 1.1 Environment Requirements

- **JDK**: Version 1.8 or higher
- **Maven**: Version 3.6 or higher

### Adding Maven Dependencies
### 1.2 Adding Maven Dependencies

```XML
<dependencies>
Expand All @@ -40,9 +41,9 @@ IoTDB provides a Java native client driver and a session pool management mechani
</dependencies>
```

## Read and Write Operations
## 2. Read and Write Operations

### ITableSession Interface
### 2.1 ITableSession Interface

The `ITableSession` interface defines basic operations for interacting with IoTDB, including data insertion, query execution, and session closure. Note that this interface is **not thread-safe**.

Expand Down Expand Up @@ -124,7 +125,7 @@ public interface ITableSession extends AutoCloseable {
}
```

### TableSessionBuilder Class
### 2.2 TableSessionBuilder Class

The `TableSessionBuilder` class is a builder for configuring and creating instances of the `ITableSession` interface. It allows developers to set connection parameters, query parameters, and security features.

Expand Down Expand Up @@ -336,9 +337,9 @@ public class TableSessionBuilder {
}
```

## Session Pool
## 3. Session Pool

### ITableSessionPool Interface
### 3.1 ITableSessionPool Interface

The `ITableSessionPool` interface manages a pool of `ITableSession` instances, enabling efficient reuse of connections and proper cleanup of resources.

Expand Down Expand Up @@ -378,7 +379,7 @@ public interface ITableSessionPool {
}
```

### TableSessionPoolBuilder Class
### 3.2 TableSessionPoolBuilder Class

The `TableSessionPoolBuilder` class is a builder for configuring and creating `ITableSessionPool` instances, supporting options like connection settings and pooling behavior.

Expand Down
6 changes: 3 additions & 3 deletions src/UserGuide/Master/Tree/Ecosystem-Integration/DBeaver.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@

DBeaver is a SQL client software application and a database administration tool. It can use the JDBC application programming interface (API) to interact with IoTDB via the JDBC driver.

## DBeaver Installation
## 1. DBeaver Installation

* From DBeaver site: https://dbeaver.io/download/

## IoTDB Installation
## 2. IoTDB Installation

* Download binary version
* From IoTDB site: https://iotdb.apache.org/Download/
* Version >= 0.13.0
* Or compile from source code
* See https://github.com/apache/iotdb

## Connect IoTDB and DBeaver
## 3. Connect IoTDB and DBeaver

1. Start IoTDB server

Expand Down
16 changes: 8 additions & 8 deletions src/UserGuide/Master/Tree/Ecosystem-Integration/DataEase.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->
# DataEase

## Product Overview
## 1. Product Overview

1. Introduction to DataEase

Expand All @@ -37,7 +37,7 @@
<img src="/img/DataEase-English2.png" alt="" style="width: 70%;"/>
</div>

## Installation Requirements
## 2. Installation Requirements

| **Preparation Content** | **Version Requirements** |
| :-------------------- | :----------------------------------------------------------- |
Expand All @@ -46,7 +46,7 @@
| DataEase | Requires v1 series v1.18 version, please refer to the official [DataEase Installation Guide](https://dataease.io/docs/v2/installation/offline_INSTL_and_UPG/)(V2.x is currently not supported. For integration with other versions, please contact Timecho) |
| DataEase-IoTDB Connector | Please contact Timecho for assistance |

## Installation Steps
## 3. Installation Steps

Step 1: Please contact Timecho to obtain the file and unzip the installation package `iotdb-api-source-1.0.0.zip`

Expand Down Expand Up @@ -88,16 +88,16 @@ Step 4: After startup, you can check whether the startup was successful through
lsof -i:8097 // The port configured in the file where the IoTDB API Source listens
```

## Instructions
## 4. Instructions

### Sign in DataEase
### 4.1 Sign in DataEase

1. Sign in DataEase,access address: `http://[target server IP address]:80`
<div style="text-align: center;">
<img src="/img/DataEase-English3.png" alt="" style="width: 70%;"/>
</div>

### Configure data source
### 4.2 Configure data source

1. Navigate to "Data Source".
<div style="text-align: center;">
Expand Down Expand Up @@ -153,7 +153,7 @@ Step 4: After startup, you can check whether the startup was successful through
<img src="/img/DataEase-English13.png" alt="" style="width: 70%;"/>
</div>

### Configure the Dataset
### 4.3 Configure the Dataset

1. Create API dataset: Navigate to "Data Set",click on the "+" on the top left corner, select "API dataset" and choose the directory where this dataset is located to enter the New API Dataset interface.
<div style="text-align: center;">
Expand Down Expand Up @@ -189,7 +189,7 @@ Step 4: After startup, you can check whether the startup was successful through
<img src="/img/DataEase-English20.png" alt="" style="width: 70%;"/>
</div>

### Configure Dashboard
### 4.4 Configure Dashboard

1. Navigate to "Dashboard", click on "+" to create a directory, then click on "+" of the directory and select "Create Dashboard".
<div style="text-align: center;">
Expand Down
12 changes: 6 additions & 6 deletions src/UserGuide/Master/Tree/Ecosystem-Integration/Flink-IoTDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

IoTDB integration for [Apache Flink](https://flink.apache.org/). This module includes the IoTDB sink that allows a flink job to write events into timeseries, and the IoTDB source allowing reading data from IoTDB.

## IoTDBSink
## 1. IoTDBSink

To use the `IoTDBSink`, you need construct an instance of it by specifying `IoTDBSinkOptions` and `IoTSerializationSchema` instances.
The `IoTDBSink` send only one event after another by default, but you can change to batch by invoking `withBatchSize(int)`.

### Example
### 1.1 Example

This example shows a case that sends data to a IoTDB server from a Flink job:

Expand Down Expand Up @@ -115,17 +115,17 @@ public class FlinkIoTDBSink {

```

### Usage
### 1.2 Usage

* Launch the IoTDB server.
* Run `org.apache.iotdb.flink.FlinkIoTDBSink.java` to run the flink job on local mini cluster.

## IoTDBSource
## 2. IoTDBSource
To use the `IoTDBSource`, you need to construct an instance of `IoTDBSource` by specifying `IoTDBSourceOptions`
and implementing the abstract method `convert()` in `IoTDBSource`. The `convert` methods defines how
you want the row data to be transformed.

### Example
### 2.1 Example
This example shows a case where data are read from IoTDB.
```java
import org.apache.iotdb.flink.options.IoTDBSourceOptions;
Expand Down Expand Up @@ -209,7 +209,7 @@ public class FlinkIoTDBSource {
}
```

### Usage
### 2.2 Usage
Launch the IoTDB server.
Run org.apache.iotdb.flink.FlinkIoTDBSource.java to run the flink job on local mini cluster.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Apache Flink(TsFile)

## About Flink-TsFile-Connector
## 1. About Flink-TsFile-Connector

Flink-TsFile-Connector implements the support of Flink for external data sources of Tsfile type.
This enables users to read and write Tsfile by Flink via DataStream/DataSet API.
Expand All @@ -31,9 +31,9 @@ With this connector, you can
* load a single TsFile or multiple TsFiles(only for DataSet), from either the local file system or hdfs, into Flink
* load all files in a specific directory, from either the local file system or hdfs, into Flink

## Quick Start
## 2. Quick Start

### TsFileInputFormat Example
### 2.1 TsFileInputFormat Example

1. create TsFileInputFormat with default RowRowRecordParser.

Expand Down Expand Up @@ -93,7 +93,7 @@ for (String s : result) {
}
```

### Example of TSRecordOutputFormat
### 2.2 Example of TSRecordOutputFormat

1. create TSRecordOutputFormat with default RowTSRecordConverter.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

Grafana is an open source volume metrics monitoring and visualization tool, which can be used to display time series data and application runtime analysis. Grafana supports Graphite, InfluxDB and other major time series databases as data sources. IoTDB-Grafana-Connector is a connector which we developed to show time series data in IoTDB by reading data from IoTDB and sends to Grafana(https://grafana.com/). Before using this tool, make sure Grafana and IoTDB are correctly installed and started.

## Installation and deployment
## 1. Installation and deployment

### Install Grafana
### 1.1 Install Grafana

* Download url: https://grafana.com/grafana/download
* Version >= 4.4.1

### Install data source plugin
### 1.2 Install data source plugin

* Plugin name: simple-json-datasource
* Download url: https://github.com/grafana/simple-json-datasource
Expand Down Expand Up @@ -64,7 +64,7 @@ Please try to find config file of grafana(eg. customer.ini in windows, and /etc/
allow_loading_unsigned_plugins = "grafana-simple-json-datasource"
```

### Start Grafana
### 1.3 Start Grafana
If Unix is used, Grafana will start automatically after installing, or you can run `sudo service grafana-server start` command. See more information [here](http://docs.grafana.org/installation/debian/).

If Mac and `homebrew` are used to install Grafana, you can use `homebrew` to start Grafana.
Expand All @@ -73,17 +73,17 @@ See more information [here](http://docs.grafana.org/installation/mac/).

If Windows is used, start Grafana by executing grafana-server.exe, located in the bin directory, preferably from the command line. See more information [here](http://docs.grafana.org/installation/windows/).

## IoTDB installation
## 2. IoTDB installation

See https://github.com/apache/iotdb

## IoTDB-Grafana-Connector installation
## 3. IoTDB-Grafana-Connector installation

```shell
git clone https://github.com/apache/iotdb.git
```

## Start IoTDB-Grafana-Connector
## 4. Start IoTDB-Grafana-Connector

* Option one

Expand Down Expand Up @@ -117,27 +117,27 @@ $ java -jar iotdb-grafana-connector-{version}.war

To configure properties, move the `grafana-connector/src/main/resources/application.properties` to the same directory as the war package (`grafana/target`)

## Explore in Grafana
## 5. Explore in Grafana

The default port of Grafana is 3000, see http://localhost:3000/

Username and password are both "admin" by default.

### Add data source
### 5.1 Add data source

Select `Data Sources` and then `Add data source`, select `SimpleJson` in `Type` and `URL` is http://localhost:8888.
After that, make sure IoTDB has been started, click "Save & Test", and "Data Source is working" will be shown to indicate successful configuration.
<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="/img/github/51664777-2766ae00-1ff5-11e9-9d2f-7489f8ccbfc2.png">

<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="/img/github/51664842-554bf280-1ff5-11e9-97d2-54eebe0b2ca1.png">

### Design in dashboard
### 5.2 Design in dashboard

Add diagrams in dashboard and customize your query. See http://docs.grafana.org/guides/getting_started/

<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="/img/github/51664878-6e54a380-1ff5-11e9-9718-4d0e24627fa8.png">

## config grafana
## 6. config grafana

```
# ip and port of IoTDB
Expand Down
Loading