Skip to content

Commit

Permalink
Fix grammar in log warnings.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Aug 9, 2024
1 parent 4a735ea commit e86b5ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void queryExceedResourceLimitShouldFail() throws IOException {
assertEquals(500, exception.getResponse().getStatusLine().getStatusCode());
assertThat(
exception.getMessage(),
Matchers.containsString("resource is not enough to run the" + " query, quit."));
Matchers.containsString("insufficient resources to run the" + " query, quit."));

// update plugins.ppl.query.memory_limit to default value 85%
updateClusterSettings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public <R, C> R accept(PhysicalPlanNodeVisitor<R, C> visitor, C context) {
@Override
public void open() {
if (!this.monitor.isHealthy()) {
throw new IllegalStateException("resource is not enough to run the query, quit.");
throw new IllegalStateException("insufficient resources to run the query, quit.");
}
delegate.open();
}
Expand All @@ -68,7 +68,7 @@ public boolean hasNext() {
public ExprValue next() {
boolean shouldCheck = (++nextCallCount % NUMBER_OF_NEXT_CALL_TO_CHECK == 0);
if (shouldCheck && !this.monitor.isHealthy()) {
throw new IllegalStateException("resource is not enough to load next row, quit.");
throw new IllegalStateException("insufficient resources to load next row, quit.");
}
return delegate.next();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public boolean isMemoryHealthy(long limitBytes) {
} else {
log.warn("Memory usage:{} exceed limit:{}", memoryUsage, limitBytes);
if (randomFail.shouldFail()) {
log.warn("Fast failure the current request");
log.warn("Fast failing the current request");
throw new MemoryUsageExceedFastFailureException();
} else {
throw new MemoryUsageExceedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void openExceedResourceLimit() {

IllegalStateException exception =
assertThrows(IllegalStateException.class, () -> monitorPlan.open());
assertEquals("resource is not enough to run the query, quit.", exception.getMessage());
assertEquals("insufficient resources to run the query, quit.", exception.getMessage());
}

@Test
Expand Down Expand Up @@ -79,7 +79,7 @@ void nextExceedResourceLimit() {

IllegalStateException exception =
assertThrows(IllegalStateException.class, () -> monitorPlan.next());
assertEquals("resource is not enough to load next row, quit.", exception.getMessage());
assertEquals("insufficient resources to load next row, quit.", exception.getMessage());
}

@Test
Expand Down

0 comments on commit e86b5ee

Please sign in to comment.