Skip to content

Commit da9ab59

Browse files
author
Donald Tregonning
authored
Release/1.1.x (splunk#176)
merge 1.1.0 release to master Features include: - Header Support - Sticky Session Improvement - Support for Structured Records(JSON & AVRO converter support) - Custom Java key store location
1 parent 2d01c6f commit da9ab59

Some content is hidden

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

47 files changed

+3613
-894
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Compiled class file
23
*.class
34

@@ -22,8 +23,10 @@
2223
hs_err_pid*
2324
target/*
2425
.idea/*
26+
.DS_Store
2527

26-
kafka-connect-splunk/
28+
splunk-kafka-connect/
2729
pom.xml.versionsBackup
2830
.classpath
29-
.project
31+
.project
32+
*.iml

README.md

Lines changed: 102 additions & 577 deletions
Large diffs are not rendered by default.

build.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
# variables
4-
kafkaversion=0.11.0.2
5-
builddir=/tmp/kafka-connect-splunk-build/kafka-connect-splunk
4+
kafkaversion=2.0.0
5+
builddir=/tmp/splunk-kafka-connect-build/splunk-kafka-connect
66

77
githash=`git rev-parse --short HEAD 2>/dev/null | sed "s/\(.*\)/@\1/"` # get current git hash
88
gitbranch=`git rev-parse --abbrev-ref HEAD` # get current git branch
@@ -15,7 +15,7 @@ if [[ -z "$gitversion" ]]; then
1515
jarversion=${gitversion}-SNAPSHOT
1616
fi
1717

18-
packagename=kafka-connect-splunk-${gitversion}.tar.gz
18+
packagename=splunk-kafka-connect-${gitversion}.tar.gz
1919

2020
# record git info in version.properties file under resources folder
2121
resourcedir='src/main/resources'
@@ -39,8 +39,8 @@ mvn versions:set -DnewVersion=${jarversion}
3939
mvn package > /dev/null
4040

4141
# Copy over the pacakge
42-
echo "Copy over kafka-connect-splunk jar ..."
43-
cp target/kafka-connect-splunk-${jarversion}.jar ${builddir}/connectors
42+
echo "Copy over splunk-kafka-connect jar ..."
43+
cp target/splunk-kafka-connect-${jarversion}.jar ${builddir}/connectors
4444
cp config/* ${builddir}/config
4545
cp README.md ${builddir}
4646
cp LICENSE ${builddir}
@@ -64,19 +64,19 @@ echo "Clean up ..."
6464

6565
# Package up
6666
echo "Package ${packagename} ..."
67-
cd .. && tar czf ${packagename} kafka-connect-splunk
67+
cd .. && tar czf ${packagename} splunk-kafka-connect
6868

6969
echo "Copy package ${packagename} to ${curdir} ..."
7070
cp ${packagename} ${curdir}
7171

72-
/bin/rm -rf kafka-connect-splunk ${packagename}
72+
/bin/rm -rf splunk-kafka-connect ${packagename}
7373
echo "Done with build & packaging"
7474

7575
echo
7676

7777
cat << EOP
78-
To run the kafka-connect-splunk, do the following steps:
79-
1. untar the package: tar xzf kafka-connect-splunk.tar.gz
78+
To run the splunk-kafka-connect, do the following steps:
79+
1. untar the package: tar xzf splunk-kafka-connect.tar.gz
8080
2. config config/connect-distributed.properties according to your env
8181
3. run: bash bin/connect-distributed.sh config/connect-distributed.properties
8282
4. Use Kafka Connect REST api to create data collection tasks

ci/Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.splunk.tool.plugin.docker.extension.BadDockerExitCode;
66
def dockerReq = new DockerRequest(steps,
77
currentBuild,
88
env,
9-
[imageName: "repo.splunk.com/splunk/products/splact",
9+
[imageName: "repo.splunk.com/splunk/products/splact:1.0.9",
1010
userId: "10777",
1111
repoName: "[email protected]:splunk/kafka-connect-splunk.git",
1212
runner: "yarn",
@@ -26,7 +26,7 @@ withSplunkWrapNode("master") {
2626
"""
2727
pip install splunk_orca==0.8.0 -i https://repo.splunk.com/artifactory/api/pypi/pypi-virtual/simple
2828
cd ci
29-
python kafka_orca_gen.py --data_gen_size 1 --data_gen_eps 100000 --broker_size 3 --zookeeper_size 3 --kafka_connect_size 1 --kafka_connect_max_tasks 20 --indexer_size 3 --default_partitions 10 --perf 0
29+
python kafka_orca_gen.py --data_gen_eps 50000 --data_gen_total_events 100000000 --broker_size 5 --zookeeper_size 3 --kafka_connect_size 1 --default_partitions 30 --kafka_connect_max_jvm_memory 8G --kafka_connect_hec_mode raw_and_event --kafka_connect_ack_mode ack_and_no_ack --metric_dest_hec_uri https://kchen-ubu-001:8088 --metric_dest_hec_token 00000000-0000-0000-0000-000000000000 --indexer_size 10 --perf 0
3030
splunk_orca create --sc kafka-connect
3131
""";
3232
}

dependency-reduced-pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.github.splunk.kafka.connect</groupId>
5-
<artifactId>kafka-connect-splunk</artifactId>
6-
<name>kafka-connect-splunk</name>
7-
<version>dev-SNAPSHOT</version>
5+
<artifactId>splunk-kafka-connect</artifactId>
6+
<name>splunk-kafka-connect</name>
7+
<version>v1.1.0</version>
88
<build>
99
<plugins>
1010
<plugin>
@@ -179,6 +179,12 @@
179179
</exclusion>
180180
</exclusions>
181181
</dependency>
182+
<dependency>
183+
<groupId>org.slf4j</groupId>
184+
<artifactId>slf4j-simple</artifactId>
185+
<version>1.7.25</version>
186+
<scope>test</scope>
187+
</dependency>
182188
<dependency>
183189
<groupId>org.apiguardian</groupId>
184190
<artifactId>apiguardian-api</artifactId>

kafka-connect-splunk.iml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
88
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
99
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10+
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
1011
<excludeFolder url="file://$MODULE_DIR$/target" />
1112
</content>
1213
<orderEntry type="inheritedJdk" />
1314
<orderEntry type="sourceFolder" forTests="false" />
14-
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.2" level="project" />
15-
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.2" level="project" />
15+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.5" level="project" />
16+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.5" level="project" />
1617
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
17-
<orderEntry type="library" name="Maven: org.apache.kafka:connect-api:0.11.0.1" level="project" />
18-
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:0.11.0.1" level="project" />
19-
<orderEntry type="library" name="Maven: net.jpountz.lz4:lz4:1.3.0" level="project" />
20-
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.2.6" level="project" />
18+
<orderEntry type="library" name="Maven: org.apache.kafka:connect-api:2.0.0" level="project" />
19+
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.0.0" level="project" />
20+
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.4.1" level="project" />
21+
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.1" level="project" />
22+
<orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.1" level="project" />
2123
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.0.1" level="project" />
2224
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.0.0" level="project" />
2325
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.0.1" level="project" />
@@ -30,10 +32,11 @@
3032
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.3" level="project" />
3133
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
3234
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
33-
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.9" level="project" />
34-
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
35+
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
36+
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
3537
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
3638
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
3739
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.0.0" level="project" />
40+
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
3841
</component>
3942
</module>

pom.xml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>com.github.splunk.kafka.connect</groupId>
8-
<artifactId>kafka-connect-splunk</artifactId>
9-
<version>dev-SNAPSHOT</version>
10-
<name>kafka-connect-splunk</name>
8+
<artifactId>splunk-kafka-connect</artifactId>
9+
<version>v1.1.0-LAR</version>
10+
<name>splunk-kafka-connect</name>
1111

1212
<properties>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -18,25 +18,29 @@
1818
<junit.jupiter.version>5.0.1</junit.jupiter.version>
1919
<junit.vintage.version>${junit.version}.1</junit.vintage.version>
2020
<junit.platform.version>1.0.1</junit.platform.version>
21+
2122
</properties>
2223

2324
<dependencies>
2425
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
2526
<dependency>
2627
<groupId>com.fasterxml.jackson.core</groupId>
2728
<artifactId>jackson-core</artifactId>
28-
<version>2.9.2</version>
29+
<version>2.9.5</version>
30+
<scope>compile</scope>
2931
</dependency>
3032
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
3133
<dependency>
3234
<groupId>com.fasterxml.jackson.core</groupId>
3335
<artifactId>jackson-databind</artifactId>
34-
<version>2.9.2</version>
36+
<version>2.9.5</version>
37+
<scope>compile</scope>
3538
</dependency>
3639
<dependency>
3740
<groupId>org.apache.kafka</groupId>
3841
<artifactId>connect-api</artifactId>
39-
<version>0.11.0.1</version>
42+
<version>2.0.0</version>
43+
<scope>compile</scope>
4044
</dependency>
4145
<dependency>
4246
<groupId>org.junit.jupiter</groupId>
@@ -76,18 +80,45 @@
7680
<groupId>org.apache.httpcomponents</groupId>
7781
<artifactId>httpclient</artifactId>
7882
<version>4.5.3</version>
83+
<exclusions>
84+
<exclusion>
85+
<groupId>commons-logging</groupId>
86+
<artifactId>commons-logging</artifactId>
87+
</exclusion>
88+
<exclusion>
89+
<groupId>commons-codec</groupId>
90+
<artifactId>commons-codec</artifactId>
91+
</exclusion>
92+
</exclusions>
93+
</dependency>
94+
<!-- commons-logging and commons-codec are both in the AK packages.
95+
Use the version already in the classpath -->
96+
<dependency>
97+
<groupId>commons-logging</groupId>
98+
<artifactId>commons-logging</artifactId>
99+
<version>1.2</version>
100+
<scope>compile</scope>
101+
</dependency>
102+
<dependency>
103+
<groupId>commons-codec</groupId>
104+
<artifactId>commons-codec</artifactId>
105+
<version>1.11</version>
106+
<scope>compile</scope>
79107
</dependency>
108+
80109
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
81110
<dependency>
82111
<groupId>org.slf4j</groupId>
83112
<artifactId>slf4j-simple</artifactId>
84113
<version>1.7.25</version>
114+
<scope>test</scope>
85115
</dependency>
86116
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
87117
<dependency>
88118
<groupId>org.slf4j</groupId>
89119
<artifactId>slf4j-api</artifactId>
90120
<version>1.7.25</version>
121+
<scope>compile</scope>
91122
</dependency>
92123
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
93124
<dependency>
@@ -102,6 +133,13 @@
102133
<version>1.0.0</version>
103134
<scope>test</scope>
104135
</dependency>
136+
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
137+
<dependency>
138+
<groupId>org.apache.commons</groupId>
139+
<artifactId>commons-lang3</artifactId>
140+
<version>3.7</version>
141+
<scope>compile</scope>
142+
</dependency>
105143
</dependencies>
106144

107145
<reporting>
@@ -190,7 +228,8 @@
190228
</goals>
191229
<configuration>
192230
<!-- Sets the path to the file which contains the execution data. -->
193-
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
231+
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec
232+
</destFile>
194233
<!--
195234
Sets the name of the property containing the settings
196235
for JaCoCo runtime agent.
@@ -210,9 +249,11 @@
210249
</goals>
211250
<configuration>
212251
<!-- Sets the path to the file which contains the execution data. -->
213-
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
252+
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec
253+
</dataFile>
214254
<!-- Sets the output directory for the code coverage report. -->
215-
<outputDirectory>${project.build.directory}/coverage-reports/jacoco-ut</outputDirectory>
255+
<outputDirectory>${project.build.directory}/coverage-reports/jacoco-ut
256+
</outputDirectory>
216257
</configuration>
217258
</execution>
218259
</executions>

0 commit comments

Comments
 (0)