Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: fixes #486: Missing generics in JStreamParallelStreamProcessor #491

Merged
merged 4 commits into from
Dec 7, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public interface JStreamParallelStreamProcessor<K, V> extends DrainingCloseable {

static JStreamParallelStreamProcessor createJStreamEosStreamProcessor(ParallelConsumerOptions<?, ?> options) {
static <K, V> JStreamParallelStreamProcessor<K, V> createJStreamEosStreamProcessor(ParallelConsumerOptions<K, V> options) {
return new JStreamParallelEoSStreamProcessor<>(options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
// end::javadoc[]
public interface ParallelConsumer<K, V> extends DrainingCloseable {

/**
* @return true if the system has either closed, or has crashed
*/
boolean isClosedOrFailed();

/**
* @see KafkaConsumer#subscribe(Collection)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@

/**
* The options for the {@link AbstractParallelEoSStreamProcessor} system.
* <p>
* The important options to look at are:
* <p>
* {@link #ordering}, {@link #maxConcurrency} and {@link #batchSize}.
* <p>
* If you want to go deeper, look at {@link #defaultMessageRetryDelay}, {@link #retryDelayProvider} and
* {@link #commitMode}.
* <p>
* Note: The only required option is the {@link #consumer} ({@link #producer} is only needed if you use the Produce
* flows). All other options have sensible defaults.
*
* @author Antony Stubbs
* @see #builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public static <K, V> ControllerEventMessage<K, V> of(WorkContainer<K, V> work) {
*/
private Instant lastCommitTime;

@Override
public boolean isClosedOrFailed() {
boolean closed = state == State.closed;
boolean doneOrCancelled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ protected void commitOffsets(final Map<TopicPartition, OffsetAndMetadata> offset
}
});
}
default -> {
throw new IllegalArgumentException("Cannot use " + commitMode + " when using " + this.getClass().getSimpleName());
}
default ->
throw new IllegalArgumentException("Cannot use " + commitMode + " when using " + this.getClass().getSimpleName());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public abstract class BrokerIntegrationTest<K, V> {
public static KafkaContainer kafkaContainer = createKafkaContainer(null);

public static KafkaContainer createKafkaContainer(String logSegmentSize) {
KafkaContainer base = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:7.2.2"))
KafkaContainer base = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:7.3.0"))
.withEnv("KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR", "1") //transaction.state.log.replication.factor
.withEnv("KAFKA_TRANSACTION_STATE_LOG_MIN_ISR", "1") //transaction.state.log.min.isr
.withEnv("KAFKA_TRANSACTION_STATE_LOG_NUM_PARTITIONS", "1") //transaction.state.log.num.partitions
Expand Down