Skip to content

Commit

Permalink
[update][plugin][influxdb2reader] Remove unused HTTPComponents depend…
Browse files Browse the repository at this point in the history
…encies
  • Loading branch information
wgzhao committed Oct 9, 2024
1 parent b9faed6 commit 283f1b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
18 changes: 8 additions & 10 deletions docs/assets/jobs/influx2stream.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
"height",
"wet"
],
"connection": [
{
"endpoint": "http://localhost:8086",
"bucket": "test",
"table": [
"temperature"
],
"org": "com.wgzhao"
}
],
"connection": {
"endpoint": "http://localhost:8086",
"bucket": "test",
"table": [
"temperature"
],
"org": "com.wgzhao"
},
"token": "YOUR_SECURE_TOKEN",
"range": [
"-1h",
Expand Down
12 changes: 0 additions & 12 deletions plugin/reader/influxdb2reader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@
<artifactId>influxdb-client-java</artifactId>
<version>${influxdb.client.version}</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>${fluent.hc.version}</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void prepare()
this.token = originalConfig.getNecessaryValue(InfluxDB2Key.TOKEN, REQUIRED_VALUE);
originalConfig.getNecessaryValue(InfluxDB2Key.RANGE, REQUIRED_VALUE);
this.range = originalConfig.getList(InfluxDB2Key.RANGE, String.class);
Configuration connConf = Configuration.from(originalConfig.getList(CONNECTION, Object.class).get(0).toString());
Configuration connConf = originalConfig.getConfiguration(CONNECTION);
this.endpoint = connConf.getNecessaryValue(InfluxDB2Key.ENDPOINT, REQUIRED_VALUE);
this.bucket = connConf.getNecessaryValue(InfluxDB2Key.BUCKET, REQUIRED_VALUE);
this.org = connConf.getNecessaryValue(InfluxDB2Key.ORG, REQUIRED_VALUE);
Expand Down Expand Up @@ -146,7 +146,7 @@ public Configuration dealColumns()

private String generalQueryQL()
{
Configuration connConf = Configuration.from(originalConfig.getList(CONNECTION, Object.class).get(0).toString());
Configuration connConf = originalConfig.getConfiguration(CONNECTION);
String bucket = connConf.getString(InfluxDB2Key.BUCKET);
String startTime = null, endTime = null;
if (!range.isEmpty()) {
Expand Down Expand Up @@ -241,7 +241,7 @@ public static class Task
public void init()
{
Configuration readerSliceConfig = super.getPluginJobConf();
Configuration connConf = Configuration.from(readerSliceConfig.getList(CONNECTION, Object.class).get(0).toString());
Configuration connConf = readerSliceConfig.getConfiguration(CONNECTION);
this.endpoint = connConf.getString(ENDPOINT);
this.token = readerSliceConfig.getString("token");
this.org = connConf.getString("org");
Expand Down

0 comments on commit 283f1b9

Please sign in to comment.