This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new 860d7a7 Amend HBASE-22377 Provide API to check the existence of a
namespace which does not require ADMIN permissions
860d7a7 is described below
commit 860d7a746e4840f2e69ae013317e32388a68f81b
Author: Andrew Purtell <[email protected]>
AuthorDate: Tue May 14 13:54:51 2019 -0700
Amend HBASE-22377 Provide API to check the existence of a namespace which
does not require ADMIN permissions
Bring back late review feedback from branch-2 version: use toArray in
listNamespaces
---
.../src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index a194e0b..499a8dc 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -3148,11 +3148,7 @@ public class HBaseAdmin implements Admin {
controller.setCallTimeout(callTimeout);
List<String> list = master.listNamespaces(controller,
ListNamespacesRequest.newBuilder().build()).getNamespaceNameList();
- String[] res = new String[list.size()];
- for(int i = 0; i < list.size(); i++) {
- res[i] = list.get(i);
- }
- return res;
+ return list.toArray(new String[list.size()]);
}
});
}