ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-1812) Object HTableDescriptor can be used directly at getTableList() method for HBaseClient class
Date Thu, 28 Sep 2017 11:41:00 GMT

     [ https://issues.apache.org/jira/browse/RANGER-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Colm O hEigeartaigh updated RANGER-1812:
----------------------------------------
    Fix Version/s: 1.0.0

> 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)

Mime
View raw message