[ 
https://issues.apache.org/jira/browse/HBASE-14998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163054#comment-16163054
 ] 

Balazs Meszaros commented on HBASE-14998:
-----------------------------------------

[~stack] Yes, I am working on it. I have also noticed that:
- deprecated methods has been removed,
- async methods have the same signature as their synchronous equivalent expect 
takeSnapshotAsync (it should be renamed to snapshotAsync),
- this listTableDescriptor is also wierd.

But why do we need async methods in Admin, if we have a full asynchronous 
AsyncAdmin API?

And here come the problems, because I think we should provide the same methods 
in AsyncAdmin as in Admin. I have compared them, and added the missing 
functions to AsyncAdmin. There are also some differences, what we should 
address:
- the return values are arrays in Admin at some places (e.g. 
Admin.listTableNames) and List in AsyncAdmin (e.g. AsyncAdmin.listTableNames),
- there are some Optional<> stuff in AsyncAdmin, what we should remove in my 
opinion,
- there are some different parameters like Admin.stopRegionServer vs 
AsyncAdmin.stopRegionServer, Admin.getQuotaRetriever vs AsyncAdmin.getQuota, 
etc,
- I renamed (deprecate the old ones and create new ones) some functions in 
Admin, like setSplitOn, etc...

I think we should unify these two APIs too, before beta1.

> Unify synchronous and asynchronous methods in Admin and cleanup
> ---------------------------------------------------------------
>
>                 Key: HBASE-14998
>                 URL: https://issues.apache.org/jira/browse/HBASE-14998
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Enis Soztutar
>            Assignee: Balazs Meszaros
>            Priority: Blocker
>             Fix For: 2.0.0-alpha-3
>
>         Attachments: 14998.txt
>
>
> Admin has a bunch of methods, some are asnyc, some are sync. Needs some 
> unification in method naming, and method signatures. 
>  - We use modify and alter interchangeably. Pick one and stick with it 
> (modifyTable(), versus getAlterStatus()). Shell uses {{alter}}. 
>  - Remove getAlterStatus(), should not be needed. 
>  - remove already deprecated methods 
>  -  isTableAvailable(TableName tableName, byte[][] splitKeys) should be 
> removed. 
>  - Consistently use Aysnc as a prefix for all async methods. 
>  - Other ideas? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to