keith-turner commented on code in PR #4735:
URL: https://github.com/apache/accumulo/pull/4735#discussion_r1672721259
##########
core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java:
##########
@@ -154,6 +154,15 @@ public int offset() {
return offset;
}
+ /**
+ * Reset the backing array for this byte sequence object. This is useful for
object re-use.
+ */
+ public void reset(byte[] data) {
Review Comment:
> I found MutableByteSequence.setArray after making these changes. Is
ArrayByteSequence supposed to be immutable? There's no mention of it being so
in the class and changes to the backing array are reflected in the object, so
I'm thinking not.
I agree its not immutable since the backing array can easily be modified.
Adding this method seems useful, could add it to ArrayByteSequence and delete
MutableByteSequence. Not sure how big of a change the would be, did not look
at what uses MutableByteSequence
--
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]