mirror of https://github.com/apache/druid.git
Remove workerId parameter from postWorkerError. (#17072)
* Remove workerId parameter from postWorkerError. It was redundant to MSQErrorReport#getTaskId. * Fix javadoc.
This commit is contained in:
parent
2e4d596d82
commit
c56e23ec37
|
@ -84,7 +84,7 @@ public interface Controller
|
|||
* taskId, not by query/stage/worker, because system errors are associated
|
||||
* with a task rather than a specific query/stage/worker execution context.
|
||||
*
|
||||
* @see ControllerClient#postWorkerError(String, MSQErrorReport)
|
||||
* @see ControllerClient#postWorkerError(MSQErrorReport)
|
||||
*/
|
||||
void workerError(MSQErrorReport errorReport);
|
||||
|
||||
|
|
|
@ -83,10 +83,7 @@ public interface ControllerClient extends Closeable
|
|||
/**
|
||||
* Client side method to inform the controller that the error has occured in the given worker.
|
||||
*/
|
||||
void postWorkerError(
|
||||
String workerId,
|
||||
MSQErrorReport errorWrapper
|
||||
) throws IOException;
|
||||
void postWorkerError(MSQErrorReport errorWrapper) throws IOException;
|
||||
|
||||
/**
|
||||
* Client side method to inform the controller about the warnings generated by the given worker.
|
||||
|
|
|
@ -202,7 +202,7 @@ public class WorkerImpl implements Worker
|
|||
log.warn("%s", logMessage);
|
||||
|
||||
if (controllerAlive) {
|
||||
controllerClient.postWorkerError(context.workerId(), errorReport);
|
||||
controllerClient.postWorkerError(errorReport);
|
||||
}
|
||||
|
||||
if (t != null) {
|
||||
|
|
|
@ -125,11 +125,11 @@ public class IndexerControllerClient implements ControllerClient
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postWorkerError(String workerId, MSQErrorReport errorWrapper) throws IOException
|
||||
public void postWorkerError(MSQErrorReport errorWrapper) throws IOException
|
||||
{
|
||||
final String path = StringUtils.format(
|
||||
"/workerError/%s",
|
||||
StringUtils.urlEncode(workerId)
|
||||
StringUtils.urlEncode(errorWrapper.getTaskId())
|
||||
);
|
||||
|
||||
doRequest(
|
||||
|
|
|
@ -97,7 +97,7 @@ public class MSQWarningReportLimiterPublisher implements MSQWarningReportPublish
|
|||
// Send the warning as an error if it is disallowed altogether
|
||||
if (criticalWarningCodes.contains(errorCode)) {
|
||||
try {
|
||||
controllerClient.postWorkerError(workerId, MSQErrorReport.fromException(workerId, host, stageNumber, e));
|
||||
controllerClient.postWorkerError(MSQErrorReport.fromException(workerId, host, stageNumber, e));
|
||||
}
|
||||
catch (IOException postException) {
|
||||
throw new RE(postException, "Failed to post the worker error [%s] to the controller", errorCode);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class MSQTestControllerClient implements ControllerClient
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postWorkerError(String workerId, MSQErrorReport errorWrapper)
|
||||
public void postWorkerError(MSQErrorReport errorWrapper)
|
||||
{
|
||||
controller.workerError(errorWrapper);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue