Skip to content

Commit 96ce0d9

Browse files
authored
upgrading pom dependecies (#66)
resolves #63
1 parent 734ee01 commit 96ce0d9

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ Backoff time in milliseconds between connection attempts.
173173
* Importance: low
174174

175175
``index.prefix``
176-
Indices prefix to include in copying.
176+
Indices prefix to include in copying.
177+
Periodically, new indices are discovered if they match the pattern.
177178

178179
* Type: string
179180
* Default: ""

doc/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ Backoff time in milliseconds between connection attempts.
173173
* Importance: low
174174

175175
``index.prefix``
176-
Indices prefix to include in copying.
176+
Indices prefix to include in copying.
177+
Periodically, new indices are discovered if they match the pattern.
177178

178179
* Type: string
179180
* Default: ""

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545
"elastic"
4646
],
4747
"title": "Kafka Connect Elasticsearch Source",
48-
"version": "1.3"
48+
"version": "1.5.0"
4949
}

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<groupId>com.github.dariobalinzo</groupId>
2929
<artifactId>elastic-source-connect</artifactId>
30-
<version>1.4</version>
30+
<version>1.5.0</version>
3131

3232
<licenses>
3333
<license>
@@ -41,46 +41,46 @@
4141
<dependency>
4242
<groupId>org.apache.kafka</groupId>
4343
<artifactId>connect-api</artifactId>
44-
<version>2.6.0</version>
44+
<version>2.8.0</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>org.elasticsearch.client</groupId>
4848
<artifactId>elasticsearch-rest-high-level-client</artifactId>
49-
<version>6.2.3</version>
49+
<version>7.16.1</version>
5050
</dependency>
5151
<dependency>
5252
<groupId>org.elasticsearch.client</groupId>
5353
<artifactId>elasticsearch-rest-client</artifactId>
54-
<version>6.2.3</version>
54+
<version>7.16.1</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>junit</groupId>
5858
<artifactId>junit</artifactId>
59-
<version>4.13.1</version>
59+
<version>4.13.2</version>
6060
<scope>test</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>org.testcontainers</groupId>
6464
<artifactId>testcontainers</artifactId>
65-
<version>1.15.0-rc2</version>
65+
<version>1.16.2</version>
6666
<scope>test</scope>
6767
</dependency>
6868
<dependency>
6969
<groupId>org.testcontainers</groupId>
7070
<artifactId>elasticsearch</artifactId>
71-
<version>1.15.0-rc2</version>
71+
<version>1.16.2</version>
7272
<scope>test</scope>
7373
</dependency>
7474
<dependency>
7575
<groupId>ch.qos.logback</groupId>
7676
<artifactId>logback-core</artifactId>
77-
<version>1.2.3</version>
77+
<version>1.2.8</version>
7878
<scope>test</scope>
7979
</dependency>
8080
<dependency>
8181
<groupId>ch.qos.logback</groupId>
8282
<artifactId>logback-classic</artifactId>
83-
<version>1.2.3</version>
83+
<version>1.2.8</version>
8484
<scope>test</scope>
8585
</dependency>
8686
<dependency>
@@ -92,7 +92,7 @@
9292
<dependency>
9393
<groupId>com.fasterxml.jackson.core</groupId>
9494
<artifactId>jackson-databind</artifactId>
95-
<version>2.11.1</version>
95+
<version>2.13.0</version>
9696
</dependency>
9797
</dependencies>
9898

src/main/java/com/github/dariobalinzo/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
package com.github.dariobalinzo;
1818

1919
public class Version {
20-
public static final String VERSION = "1.4";
20+
public static final String VERSION = "1.5.0";
2121
}

src/main/java/com/github/dariobalinzo/elastic/ElasticRepository.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import com.github.dariobalinzo.elastic.response.PageResult;
2121
import org.elasticsearch.action.search.SearchRequest;
2222
import org.elasticsearch.action.search.SearchResponse;
23+
import org.elasticsearch.client.Request;
24+
import org.elasticsearch.client.RequestOptions;
2325
import org.elasticsearch.client.Response;
2426
import org.elasticsearch.index.query.QueryBuilder;
2527
import org.elasticsearch.search.builder.SearchSourceBuilder;
@@ -171,7 +173,7 @@ private SearchResponse executeSearch(SearchRequest searchRequest) throws IOExcep
171173
for (int i = 0; i < maxTrials; ++i) {
172174
try {
173175
return elasticConnection.getClient()
174-
.search(searchRequest);
176+
.search(searchRequest, RequestOptions.DEFAULT);
175177
} catch (IOException e) {
176178
lastError = e;
177179
Thread.sleep(elasticConnection.getConnectionRetryBackoff());
@@ -183,9 +185,10 @@ private SearchResponse executeSearch(SearchRequest searchRequest) throws IOExcep
183185
public List<String> catIndices(String prefix) {
184186
Response resp;
185187
try {
188+
186189
resp = elasticConnection.getClient()
187190
.getLowLevelClient()
188-
.performRequest("GET", "/_cat/indices");
191+
.performRequest(new Request("GET", "/_cat/indices"));
189192
} catch (IOException e) {
190193
logger.error("error in searching index names");
191194
throw new RuntimeException(e);
@@ -212,7 +215,7 @@ public void refreshIndex(String index) {
212215
try {
213216
elasticConnection.getClient()
214217
.getLowLevelClient()
215-
.performRequest("POST", "/" + index + "/_refresh");
218+
.performRequest(new Request("POST", "/" + index + "/_refresh"));
216219
} catch (IOException e) {
217220
logger.error("error in refreshing index " + index);
218221
throw new RuntimeException(e);

src/test/java/com/github/dariobalinzo/TestContainersContext.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
2626
import org.elasticsearch.action.index.IndexRequest;
2727
import org.elasticsearch.action.index.IndexResponse;
28-
import org.elasticsearch.common.xcontent.XContentBuilder;
29-
import org.elasticsearch.common.xcontent.XContentFactory;
28+
import org.elasticsearch.client.RequestOptions;
29+
import org.elasticsearch.xcontent.XContentBuilder;
30+
import org.elasticsearch.xcontent.XContentFactory;
3031
import org.junit.AfterClass;
3132
import org.junit.BeforeClass;
3233
import org.testcontainers.elasticsearch.ElasticsearchContainer;
@@ -76,7 +77,7 @@ public static void setupElastic() {
7677

7778
protected void deleteTestIndex() {
7879
try {
79-
connection.getClient().indices().delete(new DeleteIndexRequest(TEST_INDEX));
80+
connection.getClient().indices().delete(new DeleteIndexRequest(TEST_INDEX), RequestOptions.DEFAULT);
8081
} catch (Exception ignored) {
8182

8283
}
@@ -108,7 +109,7 @@ protected void insertMockData(int tsStart, String fullName, String index) throws
108109
indexRequest.type("_doc");
109110
indexRequest.source(builder);
110111

111-
IndexResponse response = connection.getClient().index(indexRequest);
112+
IndexResponse response = connection.getClient().index(indexRequest, RequestOptions.DEFAULT);
112113
assertEquals(DocWriteResponse.Result.CREATED, response.getResult());
113114
}
114115

0 commit comments

Comments
 (0)