[FLINK-4257] [gelly] Handle delegating algorithm change of class#2474
Closed
greghogan wants to merge 2 commits into
Closed
[FLINK-4257] [gelly] Handle delegating algorithm change of class#2474greghogan wants to merge 2 commits into
greghogan wants to merge 2 commits into
Conversation
…e of class A class created by ProxyFactory can intercept and reinterpret method calls using its MethodHandler, but is restricted in that * the type of the proxy class cannot be changed * method return types must be honored We have algorithms such as VertexDegree and TriangleListing that change return type depending on configuration, even between single and dual input functions. This can be problematic, e.g. in OperatorTranslation where we test dataSet instanceof SingleInputOperator or dataSet instanceof TwoInputOperator. Even simply changing operator can be problematic, e.g. MapOperator.translateToDataFlow returns MapOperatorBase whereas ReduceOperator.translateToDataFlow returns SingleInputOperator. Making changes only within Gelly we can append a "no-op" pass-through MapFunction to any algorithm output which is not a SingleInputOperator. And Delegate can also walk the superclass hierarchy such we are always proxying SingleInputOperator. There is one additional issue. When we call DataSet.output the delegate's MethodHandler must reinterpret this call to add itself to the list of sinks.
Replaces Delegate with NoOpOperator.
chobeat
pushed a commit
to radicalbit/flink
that referenced
this pull request
Sep 9, 2016
Replaces Delegate with NoOpOperator. This closes apache#2474
chobeat
pushed a commit
to radicalbit/flink
that referenced
this pull request
Sep 9, 2016
Replaces Delegate with NoOpOperator. This closes apache#2474
haoch
pushed a commit
to haoch/flink
that referenced
this pull request
Sep 10, 2016
Replaces Delegate with NoOpOperator. This closes apache#2474
liuyuzhong
pushed a commit
to liuyuzhong/flink
that referenced
this pull request
Dec 5, 2016
Replaces Delegate with NoOpOperator. This closes apache#2474
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Delegate with NoOpOperator.