guluo2016 commented on code in PR #5692:
URL: https://github.com/apache/hbase/pull/5692#discussion_r1766744770
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java:
##########
@@ -975,29 +978,51 @@ public CompletableFuture<Void> flush(TableName tableName,
List<byte[]> columnFam
// If the server version is lower than the client version, it's possible
that the
// flushTable method is not present in the server side, if so, we need to
fall back
// to the old implementation.
+ Preconditions.checkNotNull(columnFamilyList,
+ "columnFamily is null, If you don't specify a columnFamily, use
flush(TableName) instead.");
List<byte[]> columnFamilies = columnFamilyList.stream()
.filter(cf -> cf != null && cf.length >
0).distinct().collect(Collectors.toList());
- FlushTableRequest request =
RequestConverter.buildFlushTableRequest(tableName, columnFamilies,
- ng.getNonceGroup(), ng.newNonce());
- CompletableFuture<Void> procFuture = this.<FlushTableRequest,
FlushTableResponse> procedureCall(
- tableName, request, (s, c, req, done) -> s.flushTable(c, req, done),
- (resp) -> resp.getProcId(), new
FlushTableProcedureBiConsumer(tableName));
CompletableFuture<Void> future = new CompletableFuture<>();
- addListener(procFuture, (ret, error) -> {
+ addListener(getDescriptor(tableName), (tDesc, error) -> {
Review Comment:
I will refactor this part of the code later based on your good suggestions
Thank you both for your review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]