AmatyaAvadhanula commented on code in PR #16182:
URL: https://github.com/apache/druid/pull/16182#discussion_r1535526176
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java:
##########
@@ -1000,11 +997,13 @@ public Optional<Task> getActiveTask(String id) throws
JsonProcessingException
if (task != null) {
try {
// Write and read the value using a mapper with password redaction
mixin.
- task = jsonMapper.readValue(jsonMapper.writeValueAsString(task),
Task.class);
+ task =
PASSWORD_REDACTING_MAPPER.readValue(PASSWORD_REDACTING_MAPPER.writeValueAsString(task),
Task.class);
}
catch (JsonProcessingException e) {
- log.error(e, "Failed to serialize or deserialize task with id [%s].",
task.getId());
- throw e;
+ log.error(e, "Failed to serialize or deserialize task with id [%s].",
task.getId());
+ throw DruidException.forPersona(DruidException.Persona.USER)
+
.ofCategory(DruidException.Category.RUNTIME_FAILURE)
+ .build(e, "Failed to serialize or deserialize
task.");
Review Comment:
Done
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java:
##########
@@ -122,6 +121,7 @@ public class TaskQueue
private final TaskActionClientFactory taskActionClientFactory;
private final TaskLockbox taskLockbox;
private final ServiceEmitter emitter;
+ private final ObjectMapper PASSWORD_REDACTING_MAPPER;
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]