Jean-Daniel Cryans has posted comments on this change. Change subject: RFC [java client] Redo how we manage exceptions ......................................................................
Patch Set 1: (3 comments) > (3 comments) > > I'm generally a fan of inserting Status into our exceptions. It's > more or less the same amount of information but it's far more > structured, so it's actually usable by applications. > > I'd also like to see us refine the "throws Exception" in nearly > each method to "throws KuduException", though I wonder about how > bad that will be for API compatibility. Yeah that's where I want to go too. It'll probably require folks to recompile their code, so I want to be really sure that this change is what we want and not have to break things again within the next year. http://gerrit.cloudera.org:8080/#/c/3055/1//COMMIT_MSG Commit Message: Line 15: This patch is the third of a series of attempts at simplifying this. With this > Would be useful to provide the other two attempts as context. k will do Line 16: patch we now only have two kinds of concrete exceptions. Here's the tree: > Hmm, but we still have PleaseThrottleException. True... mmm, should I just make it a RecoverableException? The special thing about it is that it has a Deferred that you can join on to know when you can resume inserting. Need to think about this more. http://gerrit.cloudera.org:8080/#/c/3055/1/java/kudu-client/src/main/java/org/kududb/client/KuduException.java File java/kudu-client/src/main/java/org/kududb/client/KuduException.java: Line 37: public abstract class KuduException extends RuntimeException { > Out of curiosity, why does KuduException extend RuntimeException and not Ex It's an asynchbase legacy. We can break API compat before 1.0, it's our last chance for a while. Of course we don't want to do it if we can find another way around. But, I'm pretty sure we haven't been directly exposing KuduExceptions's daughter classes in our APIs since due to Deferreds everything ends up being a plain Exception. -- To view, visit http://gerrit.cloudera.org:8080/3055 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba6e8a022d7a5391c3657cbdc9d3f06f951be048 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Jean-Daniel Cryans Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
