-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62650/
-----------------------------------------------------------

Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
Neethiraj, Velmurugan Periasamy, and Qiang Zhang.


Bugs: RANGER-1812
    https://issues.apache.org/jira/browse/RANGER-1812


Repository: ranger


Description
-------

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}


Diffs
-----

  
hbase-agent/src/main/java/org/apache/ranger/services/hbase/client/HBaseClient.java
 d9870e39 


Diff: https://reviews.apache.org/r/62650/diff/1/


Testing
-------


Thanks,

wang yuan

Reply via email to