Skip to content

Commit ebf39c9

Browse files
refactor: remove Netty-based server and client examples
1 parent 56021a9 commit ebf39c9

File tree

3 files changed

+6
-242
lines changed

3 files changed

+6
-242
lines changed

examples/src/main/java/com/influxdb/v3/netty/Netty.java

Lines changed: 0 additions & 138 deletions
This file was deleted.

examples/src/main/java/com/influxdb/v3/netty/NettyClient.java

Lines changed: 0 additions & 99 deletions
This file was deleted.

examples/src/main/java/com/influxdb/v3/netty/rest/Main.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
public class Main {
1616
public static void main(String[] args) throws URISyntaxException, SSLException, ExecutionException, InterruptedException {
1717
ClientConfig clientConfig = configCloud();
18-
// ClientConfig clientConfig = new ClientConfig.Builder().host("http://localhost:8080").token("sda".toCharArray()).build();
1918

2019
var testId = UUID.randomUUID().toString();
21-
try (
22-
RestClient restClient = new RestClient(clientConfig);
23-
) {
20+
try (RestClient restClient = new RestClient(clientConfig)) {
21+
22+
// Get server version.
2423
System.out.println("Server version: " + restClient.getServerVersion());
25-
FullHttpResponse response = restClient.request(HttpMethod.POST, "/", null, null);
24+
25+
// Write data
2626
System.out.println("Write data with testId " + testId);
2727
var p = Point.measurement("cpu_sonnh")
2828
.setTag("host", "server1")
@@ -31,6 +31,7 @@ public static void main(String[] args) throws URISyntaxException, SSLException,
3131
var lineProtocol = p.toLineProtocol();
3232
restClient.write(lineProtocol);
3333

34+
// Read data
3435
System.out.println("Read data with testId " + testId);
3536
String query = String.format("SELECT * FROM \"cpu_sonnh\" WHERE \"testId\" = '%s'", testId);
3637
InfluxDBClient influxDBClient = InfluxDBClient.getInstance(clientConfig);

0 commit comments

Comments
 (0)