Skip to content

Commit

Permalink
Rename project to connor
Browse files Browse the repository at this point in the history
  • Loading branch information
helpermethod committed Aug 12, 2021
1 parent 06aa5c1 commit a2db20e
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 36 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ jobs:
- name: Upload distribution
uses: actions/upload-artifact@v2
with:
name: connect-offset-reset-${{ matrix.target }}-x86_64.zip
path: target/connect-offset-reset-*.zip
name: connor-${{ matrix.target }}-x86_64.zip
path: target/connor-*.zip
release:
needs: assemble
runs-on: ubuntu-20.04
Expand All @@ -103,17 +103,17 @@ jobs:
- name: Download linux distribution
uses: actions/download-artifact@v2
with:
name: connect-offset-reset-linux-x86_64.zip
name: connor-linux-x86_64.zip
path: target
- name: Download osx distribution
uses: actions/download-artifact@v2
with:
name: connect-offset-reset-osx-x86_64.zip
name: connor-osx-x86_64.zip
path: target
- name: Download windows distribution
uses: actions/download-artifact@v2
with:
name: connect-offset-reset-windows-x86_64.zip
name: connor-windows-x86_64.zip
path: target
- name: Setup Java
uses: actions/setup-java@v2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Connor

[![ci](https://github.com/helpermethod/connect-offset-reset/actions/workflows/ci.yml/badge.svg)](https://github.com/helpermethod/connect-offset-reset/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/helpermethod/connect-offset-reset/branch/main/graph/badge.svg?token=niYlJRkALi)](https://codecov.io/gh/helpermethod/connect-offset-reset)
[![license](https://badgen.net/badge/license/Apache%20Licence%202.0/blue)](https://github.com/helpermethod/connect-offset-reset/blob/main/LICENSE)
[![ci](https://github.com/helpermethod/connor/actions/workflows/ci.yml/badge.svg)](https://github.com/helpermethod/connor/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/helpermethod/connor/branch/main/graph/badge.svg?token=niYlJRkALi)](https://codecov.io/gh/helpermethod/connor)
[![license](https://badgen.net/badge/license/Apache%20Licence%202.0/blue)](https://github.com/helpermethod/connor/blob/main/LICENSE)

Connor (short for: **Conn**ect**O**ffset**R**eset) is commandline tool for resetting Kafka Connect source connector offsets.

Expand Down
9 changes: 4 additions & 5 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
project:
name: connect-offset-reset
name: connor
description: A commandline tool for resetting Kafka Connect source connector offsets.
website: https://github.com/helpermethod/connect-offset-reset
website: https://github.com/helpermethod/connor
authors:
- Oliver Weiler
license: Apache-2
extraProperties:
inceptionYear: 2021

distributions:
connect-offset-reset:
type: BINARY
connor:
type: NATIVE_IMAGE
artifacts:
- path: target/{{distributionName}}-{{projectVersion}}-linux-x86_64.zip
platform: linux-x86_64
Expand All @@ -29,4 +29,3 @@ distributions:
announce:
twitter:
active: ALWAYS
status: 🚀 connect-offset-reset {{projectVersion}} has been released! {{releaseNotesUrl}}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.helpermethod</groupId>
<artifactId>connect-offset-reset</artifactId>
<artifactId>connor</artifactId>
<version>${revision}</version>

<properties>
Expand Down Expand Up @@ -173,7 +173,7 @@
</execution>
</executions>
<configuration>
<mainClass>com.github.helpermethod.connect.offset.reset.ConnectOffsetReset</mainClass>
<mainClass>com.github.helpermethod.connor.Connor</mainClass>
<imageName>${project.artifactId}</imageName>
<buildArgs>
<buildArg>-H:+AllowIncompleteClasspath</buildArg>
Expand All @@ -191,7 +191,7 @@
<jacoco.skip>true</jacoco.skip>
</properties>
<build>
<finalName>connect-offset-reset-${project.version}-${os.detected.name}-${os.detected.arch}</finalName>
<finalName>connor-${project.version}-${os.detected.name}-${os.detected.arch}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<directory>${project.build.directory}</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>connect-offset-reset</include>
<include>connect-offset-reset.exe</include>
<include>connor</include>
<include>connor.exe</include>
</includes>
</fileSet>
<fileSet>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import com.fasterxml.jackson.jr.ob.JSON;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.KafkaConsumer;
Expand All @@ -18,8 +18,8 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

@Command(name = "connect-offset-reset", mixinStandardHelpOptions = true, version = "0.2.0")
public class ConnectOffsetReset implements Runnable {
@Command(name = "connor", mixinStandardHelpOptions = true, version = "0.7.0")
public class Connor implements Runnable {
@Option(names = {"-b", "--bootstrap-servers"}, required = true, description = "A comma-separated list of broker urls.")
private String bootstrapServers;
@Option(names = {"-t", "--offset-topic"}, required = true, description = "The topic where Kafka Connect stores its Source Connector offsets.")
Expand All @@ -42,7 +42,7 @@ public void run() {
private KafkaConsumer<String, byte[]> createConsumer() {
var consumerConfig = Map.<String, Object>of(
ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers,
ConsumerConfig.GROUP_ID_CONFIG, "connect-offset-reset-" + new Random().nextInt(100_000),
ConsumerConfig.GROUP_ID_CONFIG, "connor-" + new Random().nextInt(100_000),
ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false,
ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"
);
Expand All @@ -57,6 +57,6 @@ private KafkaProducer<String, byte[]> createProducer() {
}

public static void main(String[] args) {
System.exit(new CommandLine(new ConnectOffsetReset()).execute(args));
System.exit(new CommandLine(new Connor()).execute(args));
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerRecords;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset.substitutions;
package com.github.helpermethod.connor.substitutions;


import com.oracle.svm.core.annotate.Substitute;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset.substitutions;
package com.github.helpermethod.connor.substitutions;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/access-filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"excludeClasses": "ch.qos.logback.**"
},
{
"excludeClasses": "com.github.helpermethod.connect.offset.reset.JacksonTest"
"excludeClasses": "com.github.helpermethod.connor.JacksonTest"
},
{
"excludeClasses": "com.github.helpermethod.connect.offset.reset.ConnectOffsetResetTest"
"excludeClasses": "com.github.helpermethod.connor.ConnerTest"
},
{
"excludeClasses": "com.github.helpermethod.connect.offset.reset.OffsetResetterTest"
"excludeClasses": "com.github.helpermethod.conner.OffsetResetterTest"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import org.apache.kafka.clients.admin.AdminClient;
import org.apache.kafka.clients.admin.AdminClientConfig;
Expand Down Expand Up @@ -32,7 +32,7 @@

@DisplayNameGeneration(ReplaceUnderscores.class)
@Testcontainers
class ConnectOffsetResetTest {
class ConnorTest {
static final String CONNECT_OFFSETS = "connect-offsets";

@Container
Expand All @@ -53,7 +53,7 @@ void should_send_a_tombstone_to_the_correct_partition() throws InterruptedExcept
.send(new ProducerRecord<>(CONNECT_OFFSETS, "[\"jdbc-source\", {}]", "{}"))
.get(5, SECONDS);

new CommandLine(new ConnectOffsetReset())
new CommandLine(new Connor())
.execute(
"--bootstrap-servers", kafka.getBootstrapServers(),
"--offset-topic", CONNECT_OFFSETS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.Test;

import java.io.IOException;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.helpermethod.connect.offset.reset;
package com.github.helpermethod.connor;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.MockConsumer;
Expand Down

0 comments on commit a2db20e

Please sign in to comment.