mirror of
https://github.com/luoye663/e5.git
synced 2024-12-26 03:38:53 +00:00
backup
This commit is contained in:
parent
80faabf3dc
commit
bfba053599
@ -42,12 +42,17 @@ public class influxdb2Test {
|
|||||||
try (WriteApi writeApi = influxDBClient.getWriteApi(writeOptions)) {
|
try (WriteApi writeApi = influxDBClient.getWriteApi(writeOptions)) {
|
||||||
// writeApi.writeMeasurement();
|
// writeApi.writeMeasurement();
|
||||||
// writeApi.writeMeasurements("e5", org ,WritePrecision.NS,list);
|
// writeApi.writeMeasurements("e5", org ,WritePrecision.NS,list);
|
||||||
|
List<Point> list1 = new ArrayList<>();
|
||||||
|
for (int i = 0; i < 100; i++) {
|
||||||
Point point = Point
|
Point point = Point
|
||||||
.measurement("githubId_123")
|
.measurement("githubId_123")
|
||||||
.addTag("githubId","123465")
|
.addTag("githubId","123465")
|
||||||
.addFields(beanMap)
|
.addFields(beanMap)
|
||||||
.time(Instant.now(), WritePrecision.NS);
|
.time(Instant.now(), WritePrecision.NS);
|
||||||
writeApi.writePoint("e5",org,point);
|
list1.add(point);
|
||||||
|
}
|
||||||
|
|
||||||
|
writeApi.writePoints("e5",org,list1);
|
||||||
|
|
||||||
}
|
}
|
||||||
influxDBClient.close();
|
influxDBClient.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user