Skip to content

Commit

Permalink
[FLINK-4000] [RabbitMQ] Style cleanups in MessageAcknowledgingSourceBase
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Jun 8, 2016
1 parent ae679bb commit 6afb2b0
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ public abstract class MessageAcknowledgingSourceBase<Type, UId>
*/
private transient Set<UId> idsProcessedButNotAcknowledged;

protected int numCheckpointsToKeep = 10;

// ------------------------------------------------------------------------

/**
Expand All @@ -127,10 +125,12 @@ protected MessageAcknowledgingSourceBase(TypeInformation<UId> idTypeInfo) {
@Override
public void open(Configuration parameters) throws Exception {
idsForCurrentCheckpoint = new ArrayList<>(64);
if (pendingCheckpoints == null)
pendingCheckpoints = new ArrayDeque<>(numCheckpointsToKeep);
if (idsProcessedButNotAcknowledged == null)
if (pendingCheckpoints == null) {
pendingCheckpoints = new ArrayDeque<>();
}
if (idsProcessedButNotAcknowledged == null) {
idsProcessedButNotAcknowledged = new HashSet<>();
}
}

@Override
Expand Down

0 comments on commit 6afb2b0

Please sign in to comment.