isunjin commented on issue #6739: [FLINK-10289] [JobManager] Classify 
Exceptions to different category for apply different failover strategy
URL: https://github.com/apache/flink/pull/6739#issuecomment-424127134
 
 
   > I really like this idea in principle.
   > 
   > Instead of attaching an enum classifier, could we solve this by exception 
inheritance? Having exceptions that represent the categories and then making 
the specific exceptions subclasses of the category exceptions?
   
   Thanks Stephan, use exception inheritance certainly a good way, however:
   - enum explicitly tell that there are four types of exceptions, while 
exception is more scattered. 
   - Java doesn't support multi-inherits that will make subclasses a little 
harder but we can also use Java interface or Java annotation 
   - There is a high level class need to consume this classification logic, so 
the ThrowableClassifier here is simply the logic, eg: if we use annotation, we 
need a logic to extract the annotation.
   
   so i would propose to mix those ideas together, keep the classify logic and 
use Java annotation/interface, @StephanEwen let me know what you think.
   
   Jin

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to