Skip to content

Commit f341e00

Browse files
authored
chore: change default port from 9999 to 8086 (#148)
1 parent 44cb1d7 commit f341e00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+139
-127
lines changed

.circleci/config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ jobs:
108108
docker:
109109
- image: << parameters.maven-image >>
110110
- image: &influx-image quay.io/influxdb/<< parameters.influxdb-image >>
111+
environment:
112+
INFLUXD_HTTP_BIND_ADDRESS: :9999
111113
- image: &influx-image quay.io/influxdb/<< parameters.influxdb-image >>
112114
name: influxdb_v2_onboarding
115+
environment:
116+
INFLUXD_HTTP_BIND_ADDRESS: :9999
113117
- image: influxdb:1.8-alpine
114118
environment:
115119
INFLUXDB_HTTP_FLUX_ENABLED: true

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## 1.12.0 [unreleased]
22

3+
### API
4+
1. [#139](https://github.com/influxdata/influxdb-client-java/pull/148): Changed default port from 9999 to 8086
5+
36
## 1.11.0 [2020-08-14]
47

58
### Features

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public class InfluxDB2Example {
128128

129129
public static void main(final String[] args) {
130130

131-
InfluxDBClient influxDBClient = InfluxDBClientFactory.create("http://localhost:9999", token, org, bucket);
131+
InfluxDBClient influxDBClient = InfluxDBClientFactory.create("http://localhost:8086", token, org, bucket);
132132

133133
//
134134
// Write data
@@ -239,7 +239,7 @@ public class InfluxDB2ManagementExample {
239239

240240
public static void main(final String[] args) {
241241

242-
InfluxDBClient influxDBClient = InfluxDBClientFactory.create("http://localhost:9999", token);
242+
InfluxDBClient influxDBClient = InfluxDBClientFactory.create("http://localhost:8086", token);
243243

244244
//
245245
// Create bucket "iot_bucket" with data retention set to 3,600 seconds

client-kotlin/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import kotlinx.coroutines.runBlocking
2727
fun main(args: Array<String>) = runBlocking {
2828

2929
val influxDBClient = InfluxDBClientKotlinFactory
30-
.create("http://localhost:9999", "my-token".toCharArray(), "my-org")
30+
.create("http://localhost:8086", "my-token".toCharArray(), "my-org")
3131

3232
val fluxQuery = ("from(bucket: \"my-bucket\")\n"
3333
+ " |> range(start: -1d)"
@@ -61,7 +61,7 @@ import kotlinx.coroutines.runBlocking
6161
fun main(args: Array<String>) = runBlocking {
6262

6363
val influxDBClient = InfluxDBClientKotlinFactory
64-
.create("http://localhost:9999", "my-token".toCharArray(), "my-org")
64+
.create("http://localhost:8086", "my-token".toCharArray(), "my-org")
6565

6666
val fluxQuery = ("from(bucket: \"my-bucket\")\n"
6767
+ " |> range(start: -5m)"
@@ -103,7 +103,7 @@ The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` s
103103
##### Configuration example
104104

105105
```properties
106-
influx2.url=http://localhost:9999
106+
influx2.url=http://localhost:8086
107107
influx2.org=my-org
108108
influx2.bucket=my-bucket
109109
influx2.token=my-token
@@ -125,7 +125,7 @@ A client can be constructed using a connection string that can contain the Influ
125125

126126
```kotlin
127127
val influxDBClient = InfluxDBClientKotlinFactory
128-
.create("http://localhost:9999?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
128+
.create("http://localhost:8086?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
129129
```
130130
The following options are supported:
131131

@@ -177,7 +177,7 @@ import java.time.temporal.ChronoUnit
177177
fun main(args: Array<String>) = runBlocking {
178178

179179
val influxDBClient = InfluxDBClientKotlinFactory
180-
.create("http://localhost:9999", "my-token".toCharArray(), "my-org")
180+
.create("http://localhost:8086", "my-token".toCharArray(), "my-org")
181181

182182
val mem = Flux.from("my-bucket")
183183
.range(-30L, ChronoUnit.MINUTES)

client-kotlin/src/test/kotlin/com/influxdb/client/kotlin/ITQueryKotlinApi.kt

+33-32
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
package com.influxdb.client.kotlin
2323

2424
import assertk.assertThat
25+
import assertk.assertions.contains
2526
import assertk.assertions.containsExactly
26-
import assertk.assertions.endsWith
2727
import assertk.assertions.hasSize
2828
import assertk.assertions.isEmpty
2929
import assertk.assertions.isEqualTo
3030
import assertk.assertions.isFailure
3131
import assertk.assertions.isInstanceOf
3232
import assertk.assertions.isTrue
33+
import assertk.assertions.startsWith
3334
import com.influxdb.annotations.Column
3435
import com.influxdb.client.InfluxDBClientFactory
3536
import com.influxdb.client.domain.Bucket
36-
import com.influxdb.client.domain.BucketRetentionRules
3737
import com.influxdb.client.domain.Dialect
3838
import com.influxdb.client.domain.Organization
3939
import com.influxdb.client.domain.Permission
@@ -75,11 +75,8 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
7575
.findFirst()
7676
.orElseThrow { IllegalStateException() }
7777

78-
val retentionRule = BucketRetentionRules()
79-
retentionRule.everySeconds = 3600
80-
8178
bucket = client.bucketsApi
82-
.createBucket(generateName("h2o"), retentionRule, organization)
79+
.createBucket(generateName("h2o"), null, organization)
8380

8481
//
8582
// Add Permissions to read and write to the Bucket
@@ -185,14 +182,14 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
185182
val lines = queryKotlinApi.queryRaw(flux).toList()
186183

187184
assertThat(lines).hasSize(7)
188-
assertThat(lines[0]).isEqualTo("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string")
189-
assertThat(lines[1]).isEqualTo("#group,false,false,true,true,false,true,true,true,true")
185+
assertThat(lines[0]).startsWith("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,")
186+
assertThat(lines[1]).startsWith("#group,false,false,true,true,")
190187
assertThat(lines[2]).isEqualTo("#default,_result,,,,,,,,")
191-
assertThat(lines[3]).isEqualTo(",result,table,_start,_stop,_value,_field,_measurement,host,region")
192-
assertThat(lines[4].endsWith("42,free,mem,B,west") ||
193-
lines[4].endsWith("21,free,mem,A,west"), name = lines[4]).isTrue()
194-
assertThat(lines[5].endsWith("42,free,mem,B,west") ||
195-
lines[5].endsWith("21,free,mem,A,west"), name = lines[5]).isTrue()
188+
assertThat(lines[3]).startsWith(",result,table,_start,_stop,")
189+
assertThat(lines[4].contains(",42") ||
190+
lines[4].contains(",21"), name = lines[4]).isTrue()
191+
assertThat(lines[5].contains(",42") ||
192+
lines[5].contains(",21"), name = lines[5]).isTrue()
196193
assertThat(lines[6]).isEmpty()
197194
}
198195

@@ -201,14 +198,14 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
201198
val lines = queryKotlinApi.queryRaw(flux, AbstractInfluxDBClient.DEFAULT_DIALECT).toList()
202199

203200
assertThat(lines).hasSize(7)
204-
assertThat(lines[0]).isEqualTo("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string")
205-
assertThat(lines[1]).isEqualTo("#group,false,false,true,true,false,true,true,true,true")
201+
assertThat(lines[0]).startsWith("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,")
202+
assertThat(lines[1]).startsWith("#group,false,false,true,true,")
206203
assertThat(lines[2]).isEqualTo("#default,_result,,,,,,,,")
207-
assertThat(lines[3]).isEqualTo(",result,table,_start,_stop,_value,_field,_measurement,host,region")
208-
assertThat(lines[4].endsWith("42,free,mem,B,west") ||
209-
lines[4].endsWith("21,free,mem,A,west"), name = lines[4]).isTrue()
210-
assertThat(lines[5].endsWith("42,free,mem,B,west") ||
211-
lines[5].endsWith("21,free,mem,A,west"), name = lines[5]).isTrue()
204+
assertThat(lines[3]).startsWith(",result,table,_start,_stop,")
205+
assertThat(lines[4].contains(",42") ||
206+
lines[4].contains(",21"), name = lines[4]).isTrue()
207+
assertThat(lines[5].contains(",42") ||
208+
lines[5].contains(",21"), name = lines[5]).isTrue()
212209
assertThat(lines[6]).isEmpty()
213210
}
214211

@@ -217,14 +214,14 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
217214
val lines = queryKotlinApi.queryRaw(Query().dialect(AbstractInfluxDBClient.DEFAULT_DIALECT).query(flux)).toList()
218215

219216
assertThat(lines).hasSize(7)
220-
assertThat(lines[0]).isEqualTo("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string")
221-
assertThat(lines[1]).isEqualTo("#group,false,false,true,true,false,true,true,true,true")
217+
assertThat(lines[0]).startsWith("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,")
218+
assertThat(lines[1]).startsWith("#group,false,false,true,true,")
222219
assertThat(lines[2]).isEqualTo("#default,_result,,,,,,,,")
223-
assertThat(lines[3]).isEqualTo(",result,table,_start,_stop,_value,_field,_measurement,host,region")
224-
assertThat(lines[4].endsWith("42,free,mem,B,west") ||
225-
lines[4].endsWith("21,free,mem,A,west"), name = lines[4]).isTrue()
226-
assertThat(lines[5].endsWith("42,free,mem,B,west") ||
227-
lines[5].endsWith("21,free,mem,A,west"), name = lines[5]).isTrue()
220+
assertThat(lines[3]).startsWith(",result,table,_start,_stop,")
221+
assertThat(lines[4].contains(",42") ||
222+
lines[4].contains(",21"), name = lines[4]).isTrue()
223+
assertThat(lines[5].contains(",42") ||
224+
lines[5].contains(",21"), name = lines[5]).isTrue()
228225
assertThat(lines[6]).isEmpty()
229226
}
230227
}
@@ -298,11 +295,13 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
298295

299296
val lines = queryKotlinApi.queryRaw(flux, organization.id).toList()
300297
assertThat(lines).hasSize(6)
301-
assertThat(lines[0]).isEqualTo("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string")
302-
assertThat(lines[1]).isEqualTo("#group,false,false,true,true,false,true,true,true,true")
298+
assertThat(lines[0]).startsWith("#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,")
299+
assertThat(lines[1]).startsWith("#group,false,false,true,true,")
303300
assertThat(lines[2]).isEqualTo("#default,_result,,,,,,,,")
304-
assertThat(lines[3]).isEqualTo(",result,table,_start,_stop,_value,_field,_measurement,host,region")
305-
assertThat(lines[4]).endsWith(",21,free,mem,A,west")
301+
assertThat(lines[3]).startsWith(",result,table,_start,_stop,")
302+
assertThat(lines[4]).contains(",21")
303+
assertThat(lines[4]).contains(",A")
304+
assertThat(lines[4]).contains(",west")
306305
assertThat(lines[5]).isEmpty()
307306
}
308307

@@ -319,7 +318,9 @@ internal class ITQueryKotlinApi : AbstractITInfluxDBClientKotlin() {
319318
val lines = queryKotlinApi.queryRaw(flux, dialect, organization.id).toList()
320319

321320
assertThat(lines).hasSize(2)
322-
assertThat(lines[0]).endsWith(",21,free,mem,A,west")
321+
assertThat(lines[0]).contains(",21")
322+
assertThat(lines[0]).contains(",A")
323+
assertThat(lines[0]).contains(",west")
323324
assertThat(lines[1]).isEmpty()
324325
}
325326

client-reactive/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class InfluxDB2ReactiveExample {
3333

3434
public static void main(final String[] args) {
3535

36-
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:9999", token, org);
36+
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:8086", token, org);
3737

3838
//
3939
// Query data
@@ -80,7 +80,7 @@ public class InfluxDB2ReactiveExampleRaw {
8080

8181
public static void main(final String[] args) {
8282

83-
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:9999", token, org);
83+
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:8086", token, org);
8484

8585
//
8686
// Query data
@@ -127,7 +127,7 @@ public class InfluxDB2ReactiveExamplePojo {
127127

128128
public static void main(final String[] args) {
129129

130-
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:9999", token, org);
130+
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:8086", token, org);
131131
//
132132
// Query data
133133
//
@@ -208,7 +208,7 @@ public class InfluxDB2ReactiveExampleWriteEveryTenSeconds {
208208

209209
public static void main(final String[] args) throws InterruptedException {
210210

211-
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:9999", token, org, bucket);
211+
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:8086", token, org, bucket);
212212

213213
//
214214
// Write data
@@ -281,7 +281,7 @@ The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` s
281281
##### Configuration example
282282

283283
```properties
284-
influx2.url=http://localhost:9999
284+
influx2.url=http://localhost:8086
285285
influx2.org=my-org
286286
influx2.bucket=my-bucket
287287
influx2.token=my-token
@@ -303,7 +303,7 @@ A client can be constructed using a connection string that can contain the Influ
303303

304304
```java
305305
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory
306-
.create("http://localhost:9999?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
306+
.create("http://localhost:8086?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
307307
```
308308
The following options are supported:
309309

@@ -358,7 +358,7 @@ public class InfluxDB2ReactiveExampleDSL {
358358

359359
public static void main(final String[] args) {
360360

361-
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:9999", token, org);
361+
InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create("http://localhost:8086", token, org);
362362

363363
//
364364
// Query data

client-reactive/src/test/java/com/influxdb/client/reactive/ITWriteQueryReactiveApi.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import com.influxdb.client.WriteOptions;
3333
import com.influxdb.client.domain.Authorization;
3434
import com.influxdb.client.domain.Bucket;
35-
import com.influxdb.client.domain.BucketRetentionRules;
3635
import com.influxdb.client.domain.Permission;
3736
import com.influxdb.client.domain.PermissionResource;
3837
import com.influxdb.client.domain.User;
@@ -72,11 +71,8 @@ void setUp() throws Exception {
7271
InfluxDBClient client = InfluxDBClientFactory.create(influxDB_URL, "my-user",
7372
"my-password".toCharArray());
7473

75-
BucketRetentionRules bucketRetentionRules = new BucketRetentionRules();
76-
bucketRetentionRules.setEverySeconds(3600);
77-
7874
bucket = client.getBucketsApi()
79-
.createBucket(generateName("h2o"), bucketRetentionRules, organization);
75+
.createBucket(generateName("h2o"), null, organization);
8076

8177
//
8278
// Add Permissions to read and write to the Bucket

client-scala/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ object InfluxDB2ScalaExample {
4141
def main(args: Array[String]): Unit = {
4242

4343
val influxDBClient = InfluxDBClientScalaFactory
44-
.create("http://localhost:9999", "my-token".toCharArray, "my-org")
44+
.create("http://localhost:8086", "my-token".toCharArray, "my-org")
4545

4646
val fluxQuery = ("from(bucket: \"my-bucket\")\n"
4747
+ " |> range(start: -1d)"
@@ -88,7 +88,7 @@ object InfluxDB2ScalaExampleRaw {
8888

8989
def main(args: Array[String]): Unit = {
9090
val influxDBClient = InfluxDBClientScalaFactory
91-
.create("http://localhost:9999", "my-token".toCharArray, "my-org")
91+
.create("http://localhost:8086", "my-token".toCharArray, "my-org")
9292

9393
val fluxQuery = ("from(bucket: \"my-bucket\")\n"
9494
+ " |> range(start: -5m)"
@@ -134,7 +134,7 @@ The `influx2.readTimeout`, `influx2.writeTimeout` and `influx2.connectTimeout` s
134134
##### Configuration example
135135

136136
```properties
137-
influx2.url=http://localhost:9999
137+
influx2.url=http://localhost:8086
138138
influx2.org=my-org
139139
influx2.bucket=my-bucket
140140
influx2.token=my-token
@@ -156,7 +156,7 @@ A client can be constructed using a connection string that can contain the Influ
156156

157157
```scala
158158
val influxDBClient = InfluxDBClientScalaFactory
159-
.create("http://localhost:9999?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
159+
.create("http://localhost:8086?readTimeout=5000&connectTimeout=5000&logLevel=BASIC", token)
160160
```
161161
The following options are supported:
162162

@@ -215,7 +215,7 @@ object InfluxDB2ScalaExampleDSL {
215215
def main(args: Array[String]) {
216216

217217
val influxDBClient = InfluxDBClientScalaFactory
218-
.create("http://localhost:9999", "my-token".toCharArray, "my-org")
218+
.create("http://localhost:8086", "my-token".toCharArray, "my-org")
219219

220220
val mem = Flux.from("my-bucket")
221221
.range(-30L, ChronoUnit.MINUTES)

0 commit comments

Comments
 (0)