Dear HBase Developers, I am currently working on issue HBASE-13784 <https://issues.apache.org/jira/browse/HBASE-13784> to provide an Async Table api which builds on my previous work in HBASE-12684 <https://issues.apache.org/jira/browse/HBASE-12684> which added a new AsyncRpcClient.
For this I am proposing a new AsyncTable interface and implementation. This way the method signatures will not conflict with Table methods and AsyncTable can be more lightweight since it does not need Executors and more. Also some existing Table implementations like RemoteHTable are difficult to turn async so a new interface is easier. With a new interface we enable ourselves to rethink a bit of the API to be simpler. I am currently proposing the following methods in the simpler AsyncTable interface: exists(Get): ResponsePromise<Boolean> exists(List<Get>): ResponsePromise<Boolean[]> get(Get): ResponsePromise<Result> get(List<Get>): ResponsePromise<Result[]> mutate(Mutation): ResponsePromise<Void> - Instead of separate Put, Delete, Increment, IncrementValue and Append methods checkAndMutate(byte[], byte[], byte[], CompareOp, byte[], Mutation): ResponsePromise<Void> - Will not accept Append and Increment checkAndMutate(byte[], byte[], byte[], CompareOp, byte[], RowMutations): ResponsePromise<Void> - Will not accept Append and Increment getScanner(Scan): ResponsePromise<Void> - AsyncResultScanner coprocessorService(byte[]): AsyncCoprocessorRpcService coprocessorService(Class<T extends Service>, byte[] startkey, byte[] endkey, Batch.Call<T,R> callable): ResponsePromise<Map<byte[], R>> batchCoprocessorService(Descriptors.MethodDescriptor, Message, byte[] startKey, byte[] endKey, R responsePrototype): ResponsePromise<Map<byte[], R>> To send multiple mutations you need to use a BufferedMutator which handles writeBuffers internally. I will look into making it possible to use it with Promises. Batch operations will be able to be done by a PromiseKeeper which is a promise to which other promises can be added. There will be a new AsyncResultScanner which handles incoming batches of result. It will not be possible to do next on it since this does not makes sense in an async context. There will be however a way to request a new batch with a promise. If you have any insights/comments/suggestions/questions please add them to the issue. There is also already a first working patch with get and exists methods. https://issues.apache.org/jira/browse/HBASE-13784 <https://issues.apache.org/jira/browse/HBASE-13784> Thanks! Jurriaan