kennknowles commented on code in PR #26422:
URL: https://github.com/apache/beam/pull/26422#discussion_r1178212952
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java:
##########
@@ -839,16 +850,16 @@ public CheckpointMark getCheckpointMark() {
}
private Object createCacheKey(
- UnboundedSource<OutputT, CheckpointT> source, CheckpointT
checkpoint) {
- checkNotNull(restrictionCoder);
+ UnboundedSource<OutputT, CheckpointT> source, @Nullable CheckpointT
checkpoint) {
+ checkStateNotNull(restrictionCoder);
// For caching reader, we don't care about the watermark.
return restrictionCoder.structuralValue(
UnboundedSourceRestriction.create(
source, checkpoint, BoundedWindow.TIMESTAMP_MIN_VALUE));
}
private void initializeCurrentReader() throws IOException {
- Preconditions.checkState(currentReader == null);
+ checkStateNotNull(currentReader);
Review Comment:
oops
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]