Skip to content

Commit

Permalink
TEZ-4516: Fix log lines with incorrect placeholders.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtkn committed Oct 4, 2023
1 parent 2ad10b6 commit f5aef4e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ TaskCommunicator createUberTaskCommunicator(TaskCommunicatorContext taskCommunic
TaskCommunicator createCustomTaskCommunicator(TaskCommunicatorContext taskCommunicatorContext,
NamedEntityDescriptor taskCommDescriptor)
throws TezException {
LOG.info("Creating TaskCommunicator {}:{} " + taskCommDescriptor.getEntityName(),
taskCommDescriptor.getClassName());
LOG.info("Creating TaskCommunicator {}:{} ", taskCommDescriptor.getEntityName(), taskCommDescriptor.getClassName());
Class<? extends TaskCommunicator> taskCommClazz =
(Class<? extends TaskCommunicator>) ReflectionUtils
.getClazz(taskCommDescriptor.getClassName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ private void handleReuseContainerWhenIdle(HeldContainer hc, boolean isSession) {
}

if (sessionContainers.contains(hc)) {
LOG.info("Retaining container {} since it is a session container");
LOG.info("Retaining container {} since it is a session container", hc);
hc.resetMatchingLevel();
} else {
long now = now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,7 @@ public void reportError(int taskSchedulerIndex, ServicePluginError servicePlugin
DagInfo dagInfo) {
if (servicePluginError == YarnTaskSchedulerServiceError.RESOURCEMANAGER_ERROR) {
LOG.info("Error reported by scheduler {} - {}",
Utils.getTaskSchedulerIdentifierString(taskSchedulerIndex, appContext) + ": " +
diagnostics);
Utils.getTaskSchedulerIdentifierString(taskSchedulerIndex, appContext), diagnostics);
if (taskSchedulerDescriptors[taskSchedulerIndex].getEntityName()
.equals(TezConstants.getTezYarnServicePluginName())) {
LOG.warn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ public void evaluate() throws Throwable {
.contains(UNIT_EXCEPTION_MESSAGE)))) {
throw caughtThrowable;
}
LOG.warn("{} : Failed. Retries remaining: ",
description.getDisplayName(),
retryCount.toString());
LOG.warn("{} : Failed. Retries remaining: {}", description.getDisplayName(), retryCount.toString());
} else {
throw caughtThrowable;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,8 @@ public void cleanup() throws InterruptedException {
LOG.info("Resetting interrupt for processor");
Thread.currentThread().interrupt();
} catch (Throwable e) {
LOG.warn(
"Ignoring Exception when closing processor(cleanup). Exception class={}, message={}" +
e.getClass().getName(), e.getMessage());
LOG.warn("Ignoring Exception when closing processor(cleanup). Exception class={}, message={}" + e.getClass()
.getName(), e.getClass(), e.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public boolean connect() throws IOException, InterruptedException {
Request request = rb.setUrl(url.toString()).build();

//for debugging
LOG.debug("Request url={}, encHash={}, id={}", url, encHash);
LOG.debug("Request url={}, encHash={}", url, encHash);

try {
//Blocks calling thread until it receives headers, but have the option to defer response body
Expand All @@ -176,7 +176,7 @@ public boolean connect() throws IOException, InterruptedException {
//verify the response
int rc = response.getStatusCode();
if (rc != HttpURLConnection.HTTP_OK) {
LOG.debug("Request url={}, id={}", response.getUri());
LOG.debug("Request url={}", response.getUri());
throw new IOException("Got invalid response code " + rc + " from "
+ url + ": " + response.getStatusText());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ protected Void callInternal() throws InterruptedException {
}

if (LOG.isDebugEnabled()) {
LOG.debug(srcNameTrimmed + ": " + "NumCompletedInputs: {}" + (numInputs - remainingMaps.get()));
LOG.debug("{}: NumCompletedInputs: {}", srcNameTrimmed, (numInputs - remainingMaps.get()));
}

// Ensure there's memory available before scheduling the next Fetcher.
Expand Down

0 comments on commit f5aef4e

Please sign in to comment.