Thanks Duo and Ted! bq. The coprocessor related methods are in RawAsyncTable interface. I'll add this to the spreadsheet.
bq. I think that changing the return type only doesn't have to be done in this iteration. I agree, I will skip this part. On Fri, Oct 13, 2017 at 5:48 PM, Ted Yu <yuzhih...@gmail.com> wrote: > Nice spreadsheet, Peter. > > w.r.t. Different return types, I took a look at the discussion > on HBASE-18912. > > I think that changing the return type only doesn't have to be done in this > iteration. > > Cheers > > On Fri, Oct 13, 2017 at 5:16 PM, Peter Somogyi <psomo...@cloudera.com> > wrote: > > > Hi, > > > > I started to work on HBASE-18978 (Align the methods in Table and > > AsyncTable) and I would appreciate some feedback from you. > > > > To make it simpler to compare the differences between Table and > AsyncTable > > I put together a spreadsheet. > > https://docs.google.com/spreadsheets/d/15DdDp3Yljlb_ > > Mrd3BQuoyzqnhomJhTM8bHvmEa6t6Jc/edit?usp=sharing > > > > I categorized them into the following groups: > > > > * RPC timeouts > > - Both interfaces have the same functionality, however, in AsyncTable the > > TimeUnit can be set for each method. > > - The getRpcTimeout is deprecated in Table from version 2.0.0, but it is > > not deprecated in AsyncTable. > > We can make the RPC timeout handling aligned in the 2 interfaces. My > > recommendation is to go with the ones in AsyncTable. > > > > * Coprocessor > > - Methods that are related to Coprocessors are only available in Table. > > What is the reason for this? > > > > * List with xAll operations > > - We have the ability to run operation (get, delete, put, batch) in batch > > mode using a List input parameter in both interfaces. AsyncTable has > > additional methods called xAll(List) (e.g. getAll) where we have the same > > operations but the whole operation fails if there are any failures. > > - The methods related to {exists} differ from the previous operations. To > > compare it with {get}: > > Table | AsyncTable > > ------------------------------------------------------------ > > ------------------------------------------------------------------- > > Result get(Get get) | CompletableFuture<Result> > > get(Get get) > > Result[] get(List<Get> gets) | List<CompletableFuture<Result> > > > > get(List<Get> gets) > > - | > > CompletableFuture<List<Result>> getAll(List<Get> gets) > > ------------------------------------------------------------ > > ------------------------------------------------------------------- > > boolean exists(Get get) | CompletableFuture<Boolean> > > exists(Get get) > > boolean[] existsAll(List<Get> gets) | List<CompletableFuture<Boolean>> > > exists(List<Get> gets) > > - | > > CompletableFuture<List<Boolean>> existsAll(List<Get> gets) > > Should we align these methods? > > > > - Method {batch} is also similar to these operations, however, the > > signature is different between Table and AsyncTable interfaces. > > Additionally, Table had a method {batchCallback} which is missing from > > AsyncTable. > > > > * Checks > > Check and mutate methods are way different. Table has checkAndx methods > > (some of them are deprecated), but AsyncTable has an interface called > > CheckAndMutateBuilder and these kind of operations are handled through > > that. > > > > * Scan > > Both interfaces include getScanner methods with the same signature. > > Additionally, AsyncTable has {scan} and {scanAll} methods which are not > > part of Table interface. > > > > * Different return types > > There are 2 methods that does the same in the 2 interfaces but have > > different return types. The ones in Table return with an array and the > ones > > from AsyncTable return with a List. HBASE-18912 is a similar issue on > Admin > > interface. Changing only return type is difficult. Do we need to deal > with > > this problem? > > > > Thanks, > > Peter > > >