Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/prs_and_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ jobs:
distribution: 'adopt'
java-version: 17
cache: maven
- name: License header check
run: |
mvn -ntp license:remove license:format
if [[ -n $(git status -s) ]]; then
echo 1>&2 'Some files do not have the correct license header:'
git diff --name-only 1>&2
echo 1>&2 'Please update the license headers for these files by running `mvn license:remove license:format`'
exit 1
fi
- name: Build (Maven)
run: mvn -ntp -P ci --batch-mode clean package -DskipTests
- name: Unit tests (Maven)
Expand Down
37 changes: 37 additions & 0 deletions big-query-rat-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<rat-config>
<families>
<family id="AvnBQ" name="Aiven BigQuery License" />
</families>
<licenses>
<license family="AvnBQ" id="AvnBQ" name ="Aiven BigQuery License" >
<all>
<copyright owner="Aiven Oy and bigquery-connector-for-apache-kafka project contributors" />
<text>
This software contains code derived from the Confluent BigQuery
Kafka Connector, Copyright Confluent, Inc, which in turn
contains code derived from the WePay BigQuery Kafka Connector,
Copyright WePay, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
</text>
<any>
<text>http://www.apache.org/licenses/LICENSE-2.0</text>
<text>https://www.apache.org/licenses/LICENSE-2.0</text>
</any>
<text>
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
</text>
</all>
</license>
</licenses>
<approved>
<family license_ref='AvnBQ' />
</approved>
</rat-config>
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import com.wepay.kafka.connect.bigquery.write.storage.StorageWriteApiBase;
import com.wepay.kafka.connect.bigquery.write.storage.StorageWriteApiDefaultStream;
import java.net.SocketTimeoutException;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,16 @@ protected Map<String, String> baseConnectorProps(int tasksMax) {
}

protected BigQuery newBigQuery() {
return new GcpClientBuilder.BigQueryBuilder()
.withKey(keyFile())
.withKeySource(GcpClientBuilder.KeySource.valueOf(keySource()))
.withProject(project())
.build();
try {
return new GcpClientBuilder.BigQueryBuilder()
.withKey(keyFile())
.withKeySource(GcpClientBuilder.KeySource.valueOf(keySource()))
.withProject(project())
.build();
} catch (RuntimeException e) {
LoggerFactory.getLogger(BaseConnectorIT.class).error("query error", e);
throw e;
}
}

protected void waitForCommittedRecords(
Expand Down
73 changes: 32 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<name>Veli Can Ünal</name>
<email>[email protected]</email>
<timezone>Europe/Berlin</timezone>
</contributor>
</contributor>
</contributors>

<repositories>
Expand Down Expand Up @@ -328,9 +328,19 @@
<version>3.3.1</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.17</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.17</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquerystorage</artifactId>
Expand All @@ -348,47 +358,28 @@
<build>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.17</version>
<executions>
<execution>
<id>rat-checks</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<inlineHeader>
Copyright 2024 Copyright 2022 Aiven Oy and
bigquery-connector-for-apache-kafka project contributors

This software contains code derived from the Confluent BigQuery
Kafka Connector, Copyright Confluent, Inc, which in turn
contains code derived from the WePay BigQuery Kafka Connector,
Copyright WePay, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
</inlineHeader>
<headerDefinitions>
<headerDefinition>${main.dir}/config/copyright/custom-header-styles.xml</headerDefinition>
</headerDefinitions>
<mapping>
<java>CUSTOM_JAVA_STYLE</java>
<Jenkinsfile>JENKINSFILE_STYLE</Jenkinsfile>
</mapping>
<excludes>
<exclude>**/*.vm</exclude>
<exclude>**/*.properties</exclude>
<exclude>LICENSE.md</exclude>
<exclude>*.log</exclude>
<exclude>config/checkstyle/google_checks.xml</exclude>
<exclude>**/VersionInfo.java</exclude>
</excludes>
<excludeSubProjects>false</excludeSubProjects>
<!-- <configurationNoDefaults>true</configurationNoDefaults> -->
<config>big-query-rat-config.xml</config>
<inputExclude>**/*.vm</inputExclude>
<inputExclude>**/*.properties</inputExclude>
<inputExclude>LICENSE.md</inputExclude>
<inputExclude>README.md</inputExclude>
<inputExclude>/docs/**</inputExclude>
<inputExclude>**/META-INF/services/**</inputExclude>
</configuration>
</plugin>
<plugin>
Expand Down
Loading