This is an automated email from the ASF dual-hosted git repository.
domgarguilo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git
The following commit(s) were added to refs/heads/main by this push:
new 6e586e1 Correctly render Text output in randomwalk debug message
(#300)
6e586e1 is described below
commit 6e586e1f0936f01c24c873f931b7b1bc10a99d5a
Author: Dom G. <[email protected]>
AuthorDate: Wed Oct 22 12:03:21 2025 -0400
Correctly render Text output in randomwalk debug message (#300)
Add a case to the randomwalk debug state output to correctly render Text
objects
---
src/main/java/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 bb78a5b..574dfb3 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.Schema;
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 @@ public class Module extends Node {
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;