Skip to content

Commit 1111be8

Browse files
authored
Merge branch '11.0.x' into pr_merge_from_10_0_x_to_11_0_x
2 parents a5e113e + d4e6494 commit 1111be8

File tree

60 files changed

+4907
-5529
lines changed

Some content is hidden

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

60 files changed

+4907
-5529
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@ To build a development version you'll need a recent version of Kafka as well as
1111

1212
You can build kafka-connect-elasticsearch with Maven using the standard lifecycle phases.
1313

14+
# Configuring
15+
## Creating an Elasticsearch user and assigning required privileges
16+
### Create an Elasticsearch role
17+
```
18+
curl -u elastic:elastic -X POST "localhost:9200/_security/role/es_sink_connector_role?pretty" -H 'Content-Type: application/json' -d'
19+
{
20+
"indices": [
21+
{
22+
"names": [ "*" ],
23+
"privileges": ["create_index", "read", "write", "view_index_metadata"]
24+
}
25+
]
26+
}'
27+
```
28+
### Create an Elasticsearch user
29+
```
30+
curl -u elastic:elastic -X POST "localhost:9200/_security/user/es_sink_connector_user?pretty" -H 'Content-Type: application/json' -d'
31+
{
32+
"password" : "seCret-secUre-PaSsW0rD",
33+
"roles" : [ "es_sink_connector_role" ]
34+
}'
35+
```
36+
1437
# Contribute
1538

1639
- Source Code: https://github.com/confluentinc/kafka-connect-elasticsearch

checkstyle/suppressions.xml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,18 @@
88

99
<!-- switch statements on types exceed maximum complexity -->
1010
<suppress
11-
checks="(CyclomaticComplexity)"
12-
files="(JestElasticsearchClient|Mapping|BulkProcessor).java"
11+
checks="(CyclomaticComplexity)"
12+
files="Mapping.java"
1313
/>
1414

15-
<!-- TODO: Undecided if this is too much -->
1615
<suppress
17-
checks="(ClassDataAbstractionCoupling)"
18-
files="(BulkProcessor|JestElasticsearchClient).java"
16+
checks="(ClassDataAbstractionCoupling)"
17+
files="(ElasticsearchClient|ConfigCallbackHandler).java"
1918
/>
2019

21-
<!-- TODO: Pass some parameters in common config object? -->
2220
<suppress
23-
checks="(ParameterNumber)"
24-
files="(ElasticsearchWriter).java"
25-
/>
26-
27-
<suppress
28-
checks="MethodLengthCheck"
29-
files="ElasticsearchSinkConnectorConfig.java"
30-
/>
31-
32-
<suppress
33-
checks="NPathComplexity"
34-
files="JestElasticsearchClient.java"
21+
checks="(MethodLength)"
22+
files="ElasticsearchSinkConnectorConfig.java"
3523
/>
3624

3725
</suppressions>

pom.xml

Lines changed: 85 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>io.confluent</groupId>
77
<artifactId>common</artifactId>
8-
<version>6.0.0</version>
8+
<version>6.0.3</version>
99
</parent>
1010

1111
<groupId>io.confluent</groupId>
1212
<artifactId>kafka-connect-elasticsearch</artifactId>
13-
<version>10.0.4-SNAPSHOT</version>
13+
<version>11.0.14-SNAPSHOT</version>
1414
<packaging>jar</packaging>
1515
<name>kafka-connect-elasticsearch</name>
1616
<organization>
@@ -34,24 +34,25 @@
3434
<connection>scm:git:git://github.com/confluentinc/kafka-connect-elasticsearch.git</connection>
3535
<developerConnection>scm:git:git@github.com:confluentinc/kafka-connect-elasticsearch.git</developerConnection>
3636
<url>https://github.com/confluentinc/kafka-connect-elasticsearch</url>
37-
<tag>10.0.x</tag>
37+
<tag>11.0.x</tag>
3838
</scm>
3939

4040
<properties>
41-
<es.version>2.4.6</es.version>
42-
<lucene.version>5.5.4</lucene.version>
41+
<es.version>7.9.3</es.version>
4342
<hamcrest.version>1.3</hamcrest.version>
4443
<mockito.version>2.28.2</mockito.version>
45-
<jest.version>6.3.1</jest.version>
44+
<gson.version>2.8.6</gson.version>
4645
<test.containers.version>1.15.3</test.containers.version>
4746
<kafka.connect.maven.plugin.version>0.11.1</kafka.connect.maven.plugin.version>
4847
<maven.release.plugin.version>2.5.3</maven.release.plugin.version>
48+
<hadoop.version>3.3.0</hadoop.version>
49+
<apacheds-jdbm1.version>2.0.0-M2</apacheds-jdbm1.version>
50+
<jackson.databind.version>2.10.5.1</jackson.databind.version>
4951
<!-- temporary fix by pinning the version until we upgrade to a version of common that contains this or newer version.
5052
See https://github.com/confluentinc/common/pull/332 for details -->
5153
<dependency.check.version>6.1.6</dependency.check.version>
5254
<confluent.maven.repo>http://packages.confluent.io/maven/</confluent.maven.repo>
5355
<commons.codec.version>1.15</commons.codec.version>
54-
<snakeyaml.version>1.28</snakeyaml.version>
5556
</properties>
5657

5758
<repositories>
@@ -74,9 +75,48 @@
7475
<scope>provided</scope>
7576
</dependency>
7677
<dependency>
77-
<groupId>io.searchbox</groupId>
78-
<artifactId>jest</artifactId>
79-
<version>${jest.version}</version>
78+
<groupId>org.elasticsearch.client</groupId>
79+
<artifactId>elasticsearch-rest-high-level-client</artifactId>
80+
<version>${es.version}</version>
81+
</dependency>
82+
<dependency>
83+
<groupId>org.elasticsearch</groupId>
84+
<artifactId>elasticsearch</artifactId>
85+
<version>${es.version}</version>
86+
</dependency>
87+
<dependency>
88+
<groupId>org.apache.logging.log4j</groupId>
89+
<artifactId>log4j-api</artifactId>
90+
<version>2.16.0</version>
91+
</dependency>
92+
<!-- pin jackson-dataformat-cbor for CVE - the version comes from confluentinc/common -->
93+
<dependency>
94+
<groupId>com.fasterxml.jackson.dataformat</groupId>
95+
<artifactId>jackson-dataformat-cbor</artifactId>
96+
</dependency>
97+
<!-- pin commons-codec for CVE -->
98+
<dependency>
99+
<groupId>commons-codec</groupId>
100+
<artifactId>commons-codec</artifactId>
101+
<version>1.15</version>
102+
</dependency>
103+
<!-- pin snakeyaml for CVE -->
104+
<dependency>
105+
<groupId>org.yaml</groupId>
106+
<artifactId>snakeyaml</artifactId>
107+
<version>1.27</version>
108+
</dependency>
109+
<!-- pin httpclient for CVE -->
110+
<dependency>
111+
<groupId>org.apache.httpcomponents</groupId>
112+
<artifactId>httpclient</artifactId>
113+
<version>4.5.13</version>
114+
</dependency>
115+
<dependency>
116+
<groupId>com.google.code.gson</groupId>
117+
<artifactId>gson</artifactId>
118+
<version>${gson.version}</version>
119+
<scope>test</scope>
80120
</dependency>
81121
<dependency>
82122
<groupId>org.apache.httpcomponents</groupId>
@@ -102,7 +142,7 @@
102142
</dependency>
103143
<dependency>
104144
<groupId>org.mockito</groupId>
105-
<artifactId>mockito-core</artifactId>
145+
<artifactId>mockito-inline</artifactId>
106146
<version>${mockito.version}</version>
107147
<scope>test</scope>
108148
</dependency>
@@ -118,36 +158,6 @@
118158
</exclusions>
119159
<scope>test</scope>
120160
</dependency>
121-
<dependency>
122-
<groupId>org.apache.lucene</groupId>
123-
<artifactId>lucene-test-framework</artifactId>
124-
<version>${lucene.version}</version>
125-
<scope>test</scope>
126-
</dependency>
127-
<dependency>
128-
<groupId>org.elasticsearch</groupId>
129-
<artifactId>elasticsearch</artifactId>
130-
<version>${es.version}</version>
131-
<scope>test</scope>
132-
<type>test-jar</type>
133-
</dependency>
134-
<dependency>
135-
<groupId>org.elasticsearch</groupId>
136-
<artifactId>elasticsearch</artifactId>
137-
<version>${es.version}</version>
138-
<scope>test</scope>
139-
</dependency>
140-
<dependency>
141-
<groupId>org.apache.lucene</groupId>
142-
<artifactId>lucene-expressions</artifactId>
143-
<version>${lucene.version}</version>
144-
<scope>test</scope>
145-
</dependency>
146-
<dependency>
147-
<groupId>com.google.guava</groupId>
148-
<artifactId>guava</artifactId>
149-
<version>${guava.version}</version>
150-
</dependency>
151161
<dependency>
152162
<groupId>org.apache.kafka</groupId>
153163
<artifactId>connect-runtime</artifactId>
@@ -197,9 +207,27 @@
197207
<scope>test</scope>
198208
</dependency>
199209
<dependency>
200-
<groupId>org.yaml</groupId>
201-
<artifactId>snakeyaml</artifactId>
202-
<version>${snakeyaml.version}</version>
210+
<groupId>org.apache.hadoop</groupId>
211+
<artifactId>hadoop-minikdc</artifactId>
212+
<version>${hadoop.version}</version>
213+
<scope>test</scope>
214+
</dependency>
215+
<dependency>
216+
<groupId>org.assertj</groupId>
217+
<artifactId>assertj-core</artifactId>
218+
<version>3.20.2</version>
219+
<scope>test</scope>
220+
</dependency>
221+
<dependency>
222+
<groupId>org.awaitility</groupId>
223+
<artifactId>awaitility</artifactId>
224+
<version>4.1.0</version>
225+
<scope>test</scope>
226+
</dependency>
227+
<dependency>
228+
<groupId>com.github.tomakehurst</groupId>
229+
<artifactId>wiremock-jre8</artifactId>
230+
<version>2.30.1</version>
203231
<scope>test</scope>
204232
</dependency>
205233
<dependency>
@@ -235,6 +263,16 @@
235263
</dependency>
236264
</dependencies>
237265

266+
<dependencyManagement>
267+
<dependencies>
268+
<dependency>
269+
<groupId>com.fasterxml.jackson.core</groupId>
270+
<artifactId>jackson-databind</artifactId>
271+
<version>${jackson.databind.version}</version>
272+
</dependency>
273+
</dependencies>
274+
</dependencyManagement>
275+
238276
<build>
239277
<plugins>
240278
<plugin>
@@ -358,7 +396,7 @@
358396
<logo>logos/elasticsearch.jpg</logo>
359397

360398
<supportProviderName>Confluent, Inc.</supportProviderName>
361-
<supportSummary>Confluent supports the Elasticsearch sink connector alongside community members as part of its Confluent Platform offering.</supportSummary>
399+
<supportSummary><![CDATA[This connector is <a href="https://www.confluent.io/subscription/">supported by Confluent</a> as part of a <a href="https://www.confluent.io/product/confluent-platform/">Confluent Platform</a> subscription.]]></supportSummary>
362400
<supportUrl>https://docs.confluent.io/home/overview.html</supportUrl>
363401
<supportLogo>logos/confluent.png</supportLogo>
364402

@@ -381,7 +419,7 @@
381419
</tags>
382420

383421
<requirements>
384-
<requirement>Elasticsearch 2.x, 5.x, 6.x, or 7.x</requirement>
422+
<requirement>Elasticsearch 7.x</requirement>
385423
</requirements>
386424

387425
<deliveryGuarantee>
@@ -498,7 +536,7 @@
498536
enabled and disabled cases with the same cert. So, disable this IT
499537
in jenkins.
500538
-->
501-
<exclude>**/ElasticsearchConnectorSecureIT.java</exclude>
539+
<exclude>**/ElasticsearchConnectorSslIT.java</exclude>
502540
</excludes>
503541
</configuration>
504542
</plugin>

src/main/java/io/confluent/connect/elasticsearch/BulkIndexingClient.java

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

0 commit comments

Comments
 (0)