Skip to content

Commit

Permalink
[hotfix] Make internal KafkaProducer11 details package private
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed Nov 1, 2017
1 parent 0e92b66 commit 0e97220
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -958,25 +958,25 @@ public int compare(PartitionInfo o1, PartitionInfo o2) {
/**
* State for handling transactions.
*/
public static class KafkaTransactionState {
static class KafkaTransactionState {

private final transient FlinkKafkaProducer<byte[], byte[]> producer;

@Nullable
public final String transactionalId;
final String transactionalId;

public final long producerId;
final long producerId;

public final short epoch;
final short epoch;

public KafkaTransactionState(String transactionalId, FlinkKafkaProducer<byte[], byte[]> producer) {
KafkaTransactionState(String transactionalId, FlinkKafkaProducer<byte[], byte[]> producer) {
this.producer = producer;
this.transactionalId = transactionalId;
this.producerId = producer.getProducerId();
this.epoch = producer.getEpoch();
}

public KafkaTransactionState(FlinkKafkaProducer<byte[], byte[]> producer) {
KafkaTransactionState(FlinkKafkaProducer<byte[], byte[]> producer) {
this.producer = producer;
this.transactionalId = null;
this.producerId = -1;
Expand All @@ -993,14 +993,16 @@ public String toString() {
* Context associated to this instance of the {@link FlinkKafkaProducer011}. User for keeping track of the
* transactionalIds.
*/
public static class KafkaTransactionContext {
public final Set<String> transactionalIds;
static class KafkaTransactionContext {
final Set<String> transactionalIds;

public KafkaTransactionContext(Set<String> transactionalIds) {
KafkaTransactionContext(Set<String> transactionalIds) {
this.transactionalIds = transactionalIds;
}
}



static class ProducersPool implements Closeable {
private final LinkedBlockingDeque<FlinkKafkaProducer<byte[], byte[]>> pool = new LinkedBlockingDeque<>();

Expand Down

0 comments on commit 0e97220

Please sign in to comment.