busbey commented on a change in pull request #623: HBASE-22749: Distributed MOB compactions URL: https://github.com/apache/hbase/pull/623#discussion_r327291310
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java ########## @@ -242,6 +243,28 @@ public void appendMetadata(final long maxSequenceId, final boolean majorCompacti appendTrackedTimestampsToMetadata(); } + /** + * Appends MOB - specific metadata + * @param mobRefSet - set of MOB file names + * @throws IOException problem writing to FS + */ + public void appendMobMetadata(Set<String> mobRefSet) throws IOException { + if (mobRefSet.isEmpty()) { + return; + } + StringBuilder sb = new StringBuilder(2 * mobRefSet.size() - 1); + String[] arr = new String[mobRefSet.size()]; + arr = mobRefSet.toArray(arr); + for (int i = 0; i < arr.length; i++) { + sb.append(arr[i]); + if (i < arr.length - 1) { + sb.append(","); + } + } + byte[] bytes = sb.toString().getBytes(); Review comment: this should be `Bytes.toBytes(String)` instead of relying on the platform encoding. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services