[
https://issues.apache.org/jira/browse/RANGER-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colm O hEigeartaigh resolved RANGER-1812.
-----------------------------------------
Resolution: Fixed
> Object HTableDescriptor can be used directly at getTableList() method for
> HBaseClient class
> -------------------------------------------------------------------------------------------
>
> Key: RANGER-1812
> URL: https://issues.apache.org/jira/browse/RANGER-1812
> Project: Ranger
> Issue Type: Bug
> Components: plugins, Ranger
> Affects Versions: master
> Reporter: WangYuan
> Assignee: WangYuan
> Priority: Minor
> Fix For: 1.0.0
>
> Attachments:
> 0001-RANGER-1812-Object-HTableDescriptor-can-be-used-dire.patch
>
>
> Object HTableDescriptor can be used directly at getTableList() method for
> HBaseClient class
> {code:title=HBaseClient.java}
> public List<String> getTableList(final String tableNameMatching, final
> List<String> existingTableList ) throws HadoopException {
> ... ...
> HTableDescriptor [] htds = admin.listTables(tableNameMatching);
> if (htds != null) {
> for (HTableDescriptor htd : admin.listTables(tableNameMatching)) {
> // The object htds can be used directly inestead of listTables once
> again
> // for (HTableDescriptor htd : htds )
> String tableName = htd.getNameAsString();
> if (existingTableList != null &&
> existingTableList.contains(tableName)) {
> continue;
> } else {
> tableList.add(htd.getNameAsString());
> }
> }
> }
> ... ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)