virajjasani commented on a change in pull request #2215:
URL: https://github.com/apache/hbase/pull/2215#discussion_r468532412
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
##########
@@ -2293,6 +2293,13 @@ public static TableName
toTableName(HBaseProtos.TableName tableNamePB) {
.setQualifier(UnsafeByteOperations.unsafeWrap(tableName.getQualifier())).build();
}
+ public static List<HBaseProtos.TableName>
toProtoTableNameList(List<TableName> tableNameList) {
+ if (tableNameList == null) {
+ return new ArrayList<>();
Review comment:
For the purpose of this PR, if we return non-modifiable collection,
`getTableDescriptors` in HMaster will interpret it as expected: `if
(tableNameList == null || tableNameList.isEmpty()) {`, however since this is
generic method and we are following the same approach for majority of util
methods on this class, we can keep it same way.
All good here.
> Even if not, probably these ArrayLists should be replaced with LinkedList.
You meant as separate task right? +1
----------------------------------------------------------------
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:
[email protected]