You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by wang yuan <wa...@zte.com.cn> on 2017/09/28 01:38:13 UTC
Review Request 62650: Object HTableDescriptor can be used directly at
getTableList() method for HBaseClient class
-----------------------------------------------------------
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
Re: Review Request 62650: Object HTableDescriptor can be used
directly at getTableList() method for HBaseClient class
Posted by Colm O hEigeartaigh <co...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62650/#review186544
-----------------------------------------------------------
Ship it!
Ship It!
- Colm O hEigeartaigh
On Sept. 28, 2017, 1:38 a.m., wang yuan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62650/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2017, 1:38 a.m.)
>
>
> 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
>
>