From 54373e427157fe896339d47edd466a32ec154321 Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Wed, 22 Oct 2025 11:30:21 -0400 Subject: [PATCH] Correctly render Text output in randomwalk debug message --- .../org/apache/accumulo/testing/randomwalk/Module.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/accumulo/testing/randomwalk/Module.java b/src/main/java/org/apache/accumulo/testing/randomwalk/Module.java index bb78a5b8..574dfb3b 100644 --- a/src/main/java/org/apache/accumulo/testing/randomwalk/Module.java +++ b/src/main/java/org/apache/accumulo/testing/randomwalk/Module.java @@ -44,7 +44,9 @@ import javax.xml.validation.SchemaFactory; import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.util.threads.ThreadPools; +import org.apache.hadoop.io.Text; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; @@ -354,7 +356,11 @@ else if (value instanceof String || value instanceof Map || value instanceof Col logMsg += value; else if (value instanceof byte[]) logMsg += new String((byte[]) value, UTF_8); - else if (value instanceof PasswordToken) + else if (value instanceof Text) { + Text text = (Text) value; + logMsg += + Key.toPrintableString(text.getBytes(), 0, text.getLength(), text.getLength()); + } else if (value instanceof PasswordToken) logMsg += new String(((PasswordToken) value).getPassword(), UTF_8); else logMsg += value.getClass() + " - " + value;