-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect scan range in Accumulo shell getsplits command. #2356
Comments
jmark99
added a commit
to jmark99/accumulo
that referenced
this issue
Nov 29, 2021
In the Accumulo shell, calling getsplits with the verbose option can result in incorret output. It occurs when the tableId of the table happens to be a single character and there are other tables where the tableId starts with the same character. This results in the output of getsplits displaying splits for the other tables as well. Closes apache#2356
jmark99
added a commit
to jmark99/accumulo
that referenced
this issue
Nov 29, 2021
In the Accumulo shell, calling getsplits with the verbose option can result in incorret output. It occurs when the tableId of the table happens to be a single character and there are other tables where the tableId starts with the same character. This results in the output of getsplits displaying splits for the other tables as well. Closes apache#2356
This was referenced Nov 29, 2021
jmark99
added a commit
to jmark99/accumulo
that referenced
this issue
Nov 29, 2021
Correcting some formatting issues. Closes apache#2356
jmark99
added a commit
that referenced
this issue
Nov 29, 2021
In the Accumulo shell, calling getsplits with the verbose option can result in incorret output. It occurs when the tableId of the table happens to be a single character and there are other tables where the tableId starts with the same character. This results in the output of getsplits displaying splits for the other tables as well. Closes #2356 Co-authored-by: Mike Miller <mmiller@apache.org>
jmark99
added a commit
that referenced
this issue
Nov 29, 2021
In the Accumulo shell, calling getsplits with the verbose option can result in incorret output. It occurs when the tableId of the table happens to be a single character and there are other tables where the tableId starts with the same character. This results in the output of getsplits displaying splits for the other tables as well. Added a couple of grammatical fixes based upon @millerruntime suggestions. Closes #2356
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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,
accumulo/shell/src/main/java/org/apache/accumulo/shell/commands/GetSplitsCommand.java
Lines 72 to 76 in 6cfb918
it seems to be scanning a range where the start and end of the range are: , +'<'. For our example above this amounts to:
accumulo shell -u
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);
The text was updated successfully, but these errors were encountered: