Skip to content

Correctly render Text output in randomwalk debug message#300

Merged
DomGarguilo merged 1 commit intoapache:mainfrom
DomGarguilo:fixTextPrinting
Oct 22, 2025
Merged

Correctly render Text output in randomwalk debug message#300
DomGarguilo merged 1 commit intoapache:mainfrom
DomGarguilo:fixTextPrinting

Conversation

@DomGarguilo
Copy link
Member

Fixes #217

When an exception occurs during randomwalk, some state information gets displayed. Here is the output in question before these changes:

lastIndexRow: class org.apache.hadoop.io.Text - ���B_�5�ϷKoΤ�����

and after:

lastIndexRow: %ff;%de;%88;%9f;%95;y*o%82;%08;%0a;%e5;i,%dc;%cc;%ea;h%02;%d1;

These changes use Key.toPrintableString() to correctly render the Text object. This is the same way we handle this in the main accumulo repo.

To see this output, I ran ./bin/rwalk Image.xml and deleted one of the tables that rwalk created which threw and exception and caused this state to be printed.

@DomGarguilo DomGarguilo self-assigned this Oct 22, 2025
@DomGarguilo DomGarguilo merged commit 6e586e1 into apache:main Oct 22, 2025
1 check passed
@DomGarguilo DomGarguilo deleted the fixTextPrinting branch October 22, 2025 16:03
DomGarguilo added a commit that referenced this pull request Oct 22, 2025
Add a case to the randomwalk debug state output to correctly render Text objects
@DomGarguilo
Copy link
Member Author

Realized this would also be helpful in the 2.1 branch so I backported in 0a364eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad formatting when logging state information

1 participant