Skip to content
Open
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 @@ -136,23 +136,26 @@ void validate() {
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID) {
Preconditions.checkArgument(
startSnapshotId != null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
"Invalid starting snapshot id for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotTimestamp == null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for %s strategy: not null",
startingStrategy);
}
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP) {
Preconditions.checkArgument(
startSnapshotTimestamp != null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotId == null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot id for %s strategy: not null",
startingStrategy);
}

Preconditions.checkArgument(
tag == null,
String.format("Cannot scan table using ref %s configured for streaming reader", tag));
tag == null, "Cannot scan table using ref %s configured for streaming reader", tag);
Preconditions.checkArgument(
snapshotId == null, "Cannot set snapshot-id option for streaming reader");
Preconditions.checkArgument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testIncrementalFromSnapshotId() {
.startingStrategy(StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
context, "Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_ID strategy: null");

context =
ScanContext.builder()
Expand All @@ -42,7 +42,7 @@ void testIncrementalFromSnapshotId() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_ID strategy: not null");
}

@Test
Expand All @@ -54,7 +54,7 @@ void testIncrementalFromSnapshotTimestamp() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: null");

context =
ScanContext.builder()
Expand All @@ -64,7 +64,8 @@ void testIncrementalFromSnapshotTimestamp() {
.startSnapshotTimestamp(1L)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
context,
"Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: not null");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,26 @@ void validate() {
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID) {
Preconditions.checkArgument(
startSnapshotId != null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
"Invalid starting snapshot id for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotTimestamp == null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for %s strategy: not null",
startingStrategy);
}
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP) {
Preconditions.checkArgument(
startSnapshotTimestamp != null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotId == null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot id for %s strategy: not null",
startingStrategy);
}

Preconditions.checkArgument(
tag == null,
String.format("Cannot scan table using ref %s configured for streaming reader", tag));
tag == null, "Cannot scan table using ref %s configured for streaming reader", tag);
Preconditions.checkArgument(
snapshotId == null, "Cannot set snapshot-id option for streaming reader");
Preconditions.checkArgument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testIncrementalFromSnapshotId() {
.startingStrategy(StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
context, "Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_ID strategy: null");

context =
ScanContext.builder()
Expand All @@ -42,7 +42,7 @@ void testIncrementalFromSnapshotId() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_ID strategy: not null");
}

@Test
Expand All @@ -54,7 +54,7 @@ void testIncrementalFromSnapshotTimestamp() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: null");

context =
ScanContext.builder()
Expand All @@ -64,7 +64,8 @@ void testIncrementalFromSnapshotTimestamp() {
.startSnapshotTimestamp(1L)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
context,
"Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: not null");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,26 @@ void validate() {
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID) {
Preconditions.checkArgument(
startSnapshotId != null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
"Invalid starting snapshot id for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotTimestamp == null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for %s strategy: not null",
startingStrategy);
}
if (startingStrategy == StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP) {
Preconditions.checkArgument(
startSnapshotTimestamp != null,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for %s strategy: null",
startingStrategy);
Preconditions.checkArgument(
startSnapshotId == null,
"Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot id for %s strategy: not null",
startingStrategy);
}

Preconditions.checkArgument(
tag == null,
String.format("Cannot scan table using ref %s configured for streaming reader", tag));
tag == null, "Cannot scan table using ref %s configured for streaming reader", tag);
Preconditions.checkArgument(
snapshotId == null, "Cannot set snapshot-id option for streaming reader");
Preconditions.checkArgument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testIncrementalFromSnapshotId() {
.startingStrategy(StreamingStartingStrategy.INCREMENTAL_FROM_SNAPSHOT_ID)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: null");
context, "Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_ID strategy: null");

context =
ScanContext.builder()
Expand All @@ -42,7 +42,7 @@ void testIncrementalFromSnapshotId() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_ID strategy: not null");
}

@Test
Expand All @@ -54,7 +54,7 @@ void testIncrementalFromSnapshotTimestamp() {
.build();
assertException(
context,
"Invalid starting snapshot timestamp for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: null");
"Invalid starting snapshot timestamp for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: null");

context =
ScanContext.builder()
Expand All @@ -64,7 +64,8 @@ void testIncrementalFromSnapshotTimestamp() {
.startSnapshotTimestamp(1L)
.build();
assertException(
context, "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null");
context,
"Invalid starting snapshot id for INCREMENTAL_FROM_SNAPSHOT_TIMESTAMP strategy: not null");
}

@Test
Expand Down