cshannon commented on PR #2967:
URL: https://github.com/apache/accumulo/pull/2967#issuecomment-1264030707

   > > I was thinking of something like:
   > 
   > I think it might be useful to have the Future return something useful, 
like number of retries that occurred before success, or how long it took to 
succeed. Okay, maybe not those... but maybe there's something else useful? 
Also, I'm wondering if we can override the cancel method on the future to 
specifically cancel the retries by setting a flag and breaking out of the retry 
loop, rather than relying on interrupting the thread and dealing with exception 
handling when we cancel.
   
   I'm not sure I like the idea of overriding the cancel method. Handling the 
InterruptedException is the standard way of handling a canceled future so I 
don't think we should deviate from that pattern as that's the intended way for 
handling it.
   
   In terms of returning something useful the main thing the user cares about 
is it succeeded so I don't see a problem just returning nothing or true. I 
don't think returning number of retrys or anything like that would provide a 
lot of value. Maybe you could return a map of the properties after update which 
would be the current state of all the properties at the scope (instance, 
namespace, table, etc)? The user would already know the specific properties 
that were changed and their values as they were supplied in the mapMutator so I 
don't think it makes sense to return that but returning the state of all 
properties might be nice. Of course the user could also just call the get 
properties method if they really wanted to see that.


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