Apache9 commented on code in PR #4643:
URL: https://github.com/apache/hbase/pull/4643#discussion_r929506481
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java:
##########
@@ -1720,7 +1726,8 @@ public String[] getListOfBackupIdsFromMergeOperation()
throws IOException {
if (val.length == 0) {
return null;
}
- return new String(val).split(",");
+ List<String> result = Splitter.on(',').splitToList(new String(val,
StandardCharsets.UTF_8));
Review Comment:
Splitter.on(',').splitToStream(new String(val,
StandardCharsets.UTF_8)).toArray(String[]::new)
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java:
##########
@@ -279,11 +283,12 @@ public static TableName[] parseTableNames(String tables) {
if (tables == null) {
return null;
}
- String[] tableArray =
tables.split(BackupRestoreConstants.TABLENAME_DELIMITER_IN_COMMAND);
-
- TableName[] ret = new TableName[tableArray.length];
- for (int i = 0; i < tableArray.length; i++) {
- ret[i] = TableName.valueOf(tableArray[i]);
+ List<String> list =
Review Comment:
return
Splitter.on(BackupRestoreConstants.TABLENAME_DELIMITER_IN_COMMAND).splitToStream(tables)
.map(TableName::valueOf).toArray(TableName[]::new);
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java:
##########
@@ -1639,7 +1645,7 @@ public String[] getListOfBackupIdsFromDeleteOperation()
throws IOException {
if (val.length == 0) {
return null;
}
- return new String(val).split(",");
+ return new String(val, StandardCharsets.UTF_8).split(",");
Review Comment:
Missed this one?
--
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]