Apache9 commented on PR #5353:
URL: https://github.com/apache/hbase/pull/5353#issuecomment-1688182122

   > > > oh sorry ... have no idea what went wrong, so let me copy the reply 
here.
   > > > Yes. From the perspective of fallback, it's better to make 
`flushAsync` method private in `HBaseAdmin`, but I introduce this method in 
`Admin` interface based on the following consideration a. it is not a good 
practice to call asynchronous functions in a synchronous api b. it still works 
if the master supports and enables `FlushTablePRocedure` c. if an unsupported 
exception is thrown, the user can perceive it and handle it in the upper layer, 
just like a normal `IOException`.
   > > 
   > > 
   > > XXXAsync methods are common in the Admin interface so we should provide 
it.
   > > And how could our users handle the unsupported exception in upper layer? 
We do not expose the legacyFlush method to them, they can only retry on the 
same method and then get the same exception again?
   > 
   > Our user can fallback to the old flush implementation by calling **flush** 
method. If our users really need asynchronous calls, maybe we can suggest them 
to consider **AsyncHBaseAdmin#flush** API in the doc.
   > 
   > Do you think it is necessary for us to implement fallback logic in the 
**HBaseAdmin#flushAsync** method?
   
   It will be confusing to users that flush and flushAsync are different. We 
should support the fallback logic also in flushAsync.


-- 
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]

Reply via email to