| | |
| | | |
| | | private InfluxQLQueryApi influxQLQueryApi; |
| | | |
| | | private String VALUE = "value"; |
| | | public static final String VALUE = "value"; |
| | | |
| | | private String TIME = "time"; |
| | | public static final String TIME = "time"; |
| | | |
| | | private int rawOffset = TimeZone.getDefault().getRawOffset(); |
| | | |
| | |
| | | } |
| | | if (!CollectionUtils.isEmpty(pointValues)) { |
| | | pointValues.forEach(item -> { |
| | | writeApi.writeMeasurement(influxDBInstance.bucket, influxDBInstance.org, WritePrecision.MS, item); |
| | | String bucket = influxDBInstance.getBucket(); |
| | | writeApi.writeMeasurement(bucket, influxDBInstance.org, WritePrecision.MS, item); |
| | | }); |
| | | } |
| | | writeApi.flush(); |
| | |
| | | InfluxPointValuePOJO point = influxParams.get(i); |
| | | String measurement = PointValueUtils.getMeasurement(point.getType()); |
| | | StringBuilder sb = new StringBuilder(); |
| | | sb.append("from(bucket:\"" + influxDBInstance.bucket + "\") "); |
| | | sb.append("from(bucket:\"" + influxDBInstance.getBucket() + "\") "); |
| | | sb.append("|> range(start: ").append(start).append(", stop: ").append(stop).append(") "); |
| | | sb.append("|> filter(fn: (r) => r[\"_measurement\"] == \"" + measurement + "\")"); |
| | | sb.append("|> filter(fn: (r) => r[\"_field\"] == \"value\")"); |