Skip to content

Commit ce791ed

Browse files
authored
README: syntax highlighting for all code blocks
1 parent cb519ba commit ce791ed

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ Note that the batching functionality creates an internal thread pool that needs
8282
#### Gzip's support (version 2.5+ required):
8383

8484
influxdb-java client doesn't enable gzip compress for http request body by default. If you want to enable gzip to reduce transfer data's size , you can call:
85-
```
85+
```java
8686
influxDB.enableGzip()
8787
```
8888

8989
#### UDP's support (version 2.5+ required):
9090

9191
influxdb-java client support udp protocol now. you can call followed methods directly to write through UDP.
92-
```
92+
```java
9393
public void write(final int udpPort, final String records);
9494
public void write(final int udpPort, final List<String> records);
9595
public void write(final int udpPort, final Point point);
@@ -100,7 +100,7 @@ note: make sure write content's total size should not > UDP protocol's limit(64K
100100
#### chunking support (version 2.6+ required, unreleased):
101101

102102
influxdb-java client now supports influxdb chunking. The following example uses a chunkSize of 20 and invokes the specified Consumer (e.g. System.out.println) for each received QueryResult
103-
```
103+
```java
104104
Query query = new Query("SELECT idle FROM cpu", dbName);
105105
influxDB.query(query, 20, queryResult -> System.out.println(queryResult));
106106
```
@@ -112,7 +112,7 @@ For additional usage examples have a look at [InfluxDBTest.java](https://github.
112112
## Version
113113

114114
The latest version for maven dependence:
115-
```
115+
```xml
116116
<dependency>
117117
<groupId>org.influxdb</groupId>
118118
<artifactId>influxdb-java</artifactId>
@@ -130,20 +130,26 @@ For version change history have a look at [ChangeLog](https://github.com/influxd
130130

131131
Then you can build influxdb-java with all tests with:
132132

133-
$ mvn clean install
133+
```bash
134+
$ mvn clean install
135+
```
134136

135137
If you don't have Docker running locally, you can skip tests with -DskipTests flag set to true:
136138

137-
$ mvn clean install -DskipTests=true
139+
```bash
140+
$ mvn clean install -DskipTests=true
141+
```
138142

139143
If you have Docker running, but it is not at localhost (e.g. you are on a Mac and using `docker-machine`) you can set an optional environment variable `INFLUXDB_IP` to point to the correct IP address:
140144

141-
$ export INFLUXDB_IP=192.168.99.100
142-
$ mvn test
145+
```bash
146+
$ export INFLUXDB_IP=192.168.99.100
147+
$ mvn test
148+
```
143149

144150
For convenience we provide a small shell script which starts a influxdb server locally and executes `mvn clean install` with all tests inside docker containers.
145151

146-
```
152+
```bash
147153
$ ./compile-and-test.sh
148154
```
149155

0 commit comments

Comments
 (0)