You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,8 @@ dependencies {
63
63
64
64
## Usage
65
65
66
+
### Create client
67
+
66
68
To start with the client, import the `com.influxdb.v3.client` package and create a `InfluxDBClient` by:
67
69
68
70
```java
@@ -91,7 +93,9 @@ public class IOxExample {
91
93
}
92
94
```
93
95
94
-
to insert data, you can use code like this:
96
+
### Write
97
+
98
+
To insert data, you can use code like this:
95
99
96
100
```java
97
101
//
@@ -144,7 +148,7 @@ String record = "temperature,location=north value=60.0";
144
148
client.writeRecord(record);
145
149
```
146
150
147
-
### Accept partial writes and inspect failed lines
151
+
####Accept partial writes and inspect failed lines
148
152
149
153
Partial writes are enabled by default.
150
154
`acceptPartial` can be configured in three ways: client defaults via `WriteOptions`, connection string / environment variable / system property (`writeAcceptPartial` / `INFLUX_WRITE_ACCEPT_PARTIAL` / `influx.writeAcceptPartial`), or per-write `WriteOptions`.
@@ -158,15 +162,17 @@ With InfluxDB Core/Enterprise, when a write request fails due to one or more inv
158
162
When partial writes are disabled, any rejected line causes all lines to be rejected.
159
163
InfluxDB Clustered does not return this structured partial-write error format.
160
164
161
-
### Compatibility with InfluxDB Clustered
165
+
####Compatibility with InfluxDB Clustered
162
166
163
167
For InfluxDB Clustered, enable `useV2Api` for writes.
164
168
Like other write options, this can be configured in client code, connection string / environment variable / system property (`writeUseV2Api` / `INFLUX_WRITE_USE_V2_API` / `influx.writeUseV2Api`), or per-write `WriteOptions`.
165
169
166
170
If `useV2Api` is set, `acceptPartial` is ignored because this compatibility mode does not support partial-write controls.
167
171
Any rejected line causes all lines to be rejected.
0 commit comments