Repository navigation
[BEAM-4775] mv function pkg from fn-harness to java-core - #7866
Conversation
mxm
left a comment
There was a problem hiding this comment.
Could you explain why this is necessary? I'm assuming it has to do with the dependency structure.
|
Yea, sorry it's not clear. I need to think more about metrics/proto package-structures in #7823 that may affect this. Let me do that and circle back. In the meantime, here's some context for the package-move, as it currently stands:
parameterizing ThrowingConsumer
|
mxm
left a comment
There was a problem hiding this comment.
Thanks for clarifying. I think moving them to the core makes sense.
| public interface ThrowingConsumer<T> { | ||
| void accept(T t) throws Exception; | ||
| public interface ThrowingConsumer<ExceptionT extends Exception, T> { | ||
| void accept(T t) throws ExceptionT; |
There was a problem hiding this comment.
What is the use case for this change? It looks like you only pass Exception as ExceptionT. Do you want to define contracts for other subclasses of Exception?
There was a problem hiding this comment.
There was a note at the end of this comment about that part.
It's not used here, but I do have a motivating case for a ThrowingConsumer<IOException, T> in #7823.
|
I think this can be decoupled from metrics/module concerns, and is good to go, if you agree that java/core is a more logical place for such generic language-level helpers. Even if the metrics code that uses it ends up somewhere higher-up than java/core, having it depend on these helpers in java/core seems reasonable. Pulling things like this back out of java/core to dedicated packages later seems fine and good as well, if necessary. |
|
Looks good. Thanks! |
also: parameterize ThrowingConsumer by Exception type
This is factored out of #7823, where a use-case for a
ThrowingConsumer<IOException, …>exists, in Jackson JSON serde code.R: @robertwb, @mxm
Post-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.