bmcclureii opened a new issue #2356:
URL: https://github.com/apache/accumulo/issues/2356
I have experienced an issue using the getsplits command in the accumulo
shell. It occurs when the tableId of the table happens to be a single letter
("w" for example ) and there are other tables in the system that start with
that letter ("w1", "w3" for example). The result is the output of getsplits is
displaying splits for other tables. This has produced outputs with multiple
default tablets for example and has been demonstrated in multiple installations.
Looking at the current getsplits code,
https://github.com/apache/accumulo/blob/6cfb9180a0d3e5115922314ff2062e0706ef0795/shell/src/main/java/org/apache/accumulo/shell/commands/GetSplitsCommand.java#L72-L76
it seems to be scanning a range where the start and end of the range are:
<tableId>, <tableId>+'<'. For our example above this amounts to:
accumulo shell -u <user>
table <my table>
scan -b w -e w<
And this can be shown to pick up tablets from tables w1, w3 etc.
**Versions**
Affected version(s) of this project: 1.9.2 but seems to be still in the
code-base as of Nov 12 2021
**To Reproduce**
1. Require to have a table with a single character tableId such as w or
3 and a table with a multiple character tableId that start with it, such as w1
or 33.
2. accumulo shell -u \<user\>
3. table \<table\>
4. getsplits -v -o /tmp/splits.txt
5. See error: There may be observed splits for tables that are not the
current table.
**Expected behavior**
Only splits for the current table should be displayed.
**Fix**
It has been suggested to add a line after line 73 above:
`start.append(new byte[] {';'}, 0, 1);
`
--
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]