Skip to content

Commit

Permalink
Fix grammar in log warnings. (#2928) (#3088)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0e3e57c)

Signed-off-by: dblock <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 69bacd1 commit 24b90ab
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 24b90ab

Please sign in to comment.