keith-turner commented on a change in pull request #7: ACCUMULO-4717 Use public
API
URL: https://github.com/apache/accumulo-testing/pull/7#discussion_r145509955
##########
File path:
core/src/main/java/org/apache/accumulo/testing/core/randomwalk/shard/BulkInsert.java
##########
@@ -172,7 +171,7 @@ private void sort(State state, RandWalkEnv env, FileSystem
fs, String tableName,
Collection<Text> splits = conn.tableOperations().listSplits(tableName,
maxSplits);
for (Text split : splits)
-
out.println(Base64.getEncoder().encodeToString(TextUtil.getBytes(split)));
+ out.println(Base64.getEncoder().encodeToString(split.getBytes()));
Review comment:
Be careful here. Text has length. The getBytes() method may return the
internal byte array, which may be longer than the length. I think this is the
reason that TextUtil.getBytes() exists.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services