[jira] [Commented] (FLINK-2033) Add overloaded methods with explicit TypeInformation parameters to Gelly
[ https://issues.apache.org/jira/browse/FLINK-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14964914#comment-14964914 ] PJ Van Aeken commented on FLINK-2033: - Totally forgot about this one, sorry. Yes it's ok now. Gelly has the explicit declarations. > Add overloaded methods with explicit TypeInformation parameters to Gelly > > > Key: FLINK-2033 > URL: https://issues.apache.org/jira/browse/FLINK-2033 > Project: Flink > Issue Type: Task > Components: Gelly >Affects Versions: 0.9 >Reporter: PJ Van Aeken >Assignee: PJ Van Aeken > Fix For: 0.10 > > > For the implementation of the Scala API for Gelly (FLINK-1962), we need to > pass explicit TypeInformation since the Java TypeExtractor does not work for > all Scala Types (see FLINK-2023). > To do this, the java Gelly API needs to be expanded with methods that allow > for explicit passing of TypeInformation. > An example with mapVertices: > {code} > public GraphmapVertices(final MapFunction , > NV> mapper) { > TypeInformation keyType = ((TupleTypeInfo) > vertices.getType()).getTypeAt(0); > String callLocation = Utils.getCallLocationName(); > TypeInformation valueType = > TypeExtractor.getMapReturnTypes(mapper, vertices.getType(), callLocation, > false); > TypeInformation > returnType = > (TypeInformation >) new TupleTypeInfo( > Vertex.class, keyType, valueType); > return mapVertices(mapper,returnType); > } > public Graph mapVertices(final MapFunction , > NV> mapper, TypeInformation > returnType) { > DataSet > mappedVertices = vertices.map( > new MapFunction , Vertex >() { > public Vertex map(Vertex value) throws > Exception { > return new Vertex (value.f0, mapper.map(value)); > } > }).returns(returnType); > return new Graph (mappedVertices, this.edges, this.context); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2033) Add overloaded methods with explicit TypeInformation parameters to Gelly
[ https://issues.apache.org/jira/browse/FLINK-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14708099#comment-14708099 ] Vasia Kalavri commented on FLINK-2033: -- I can close this one now, right [~vanaepi]? Add overloaded methods with explicit TypeInformation parameters to Gelly Key: FLINK-2033 URL: https://issues.apache.org/jira/browse/FLINK-2033 Project: Flink Issue Type: Task Components: Gelly Affects Versions: 0.9 Reporter: PJ Van Aeken Assignee: PJ Van Aeken For the implementation of the Scala API for Gelly (FLINK-1962), we need to pass explicit TypeInformation since the Java TypeExtractor does not work for all Scala Types (see FLINK-2023). To do this, the java Gelly API needs to be expanded with methods that allow for explicit passing of TypeInformation. An example with mapVertices: {code} public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper) { TypeInformationK keyType = ((TupleTypeInfo?) vertices.getType()).getTypeAt(0); String callLocation = Utils.getCallLocationName(); TypeInformationNV valueType = TypeExtractor.getMapReturnTypes(mapper, vertices.getType(), callLocation, false); TypeInformationVertexK, NV returnType = (TypeInformationVertexK, NV) new TupleTypeInfo( Vertex.class, keyType, valueType); return mapVertices(mapper,returnType); } public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper, TypeInformationVertexK, NV returnType) { DataSetVertexK, NV mappedVertices = vertices.map( new MapFunctionVertexK, VV, VertexK, NV() { public VertexK, NV map(VertexK, VV value) throws Exception { return new VertexK, NV(value.f0, mapper.map(value)); } }).returns(returnType); return new GraphK, NV, EV(mappedVertices, this.edges, this.context); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2033) Add overloaded methods with explicit TypeInformation parameters to Gelly
[ https://issues.apache.org/jira/browse/FLINK-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14580225#comment-14580225 ] PJ Van Aeken commented on FLINK-2033: - If the PR for FLINK-1962 gets accepted, this can be marked as resolved Add overloaded methods with explicit TypeInformation parameters to Gelly Key: FLINK-2033 URL: https://issues.apache.org/jira/browse/FLINK-2033 Project: Flink Issue Type: Task Components: Gelly Affects Versions: 0.9 Reporter: PJ Van Aeken Assignee: PJ Van Aeken For the implementation of the Scala API for Gelly (FLINK-1962), we need to pass explicit TypeInformation since the Java TypeExtractor does not work for all Scala Types (see FLINK-2023). To do this, the java Gelly API needs to be expanded with methods that allow for explicit passing of TypeInformation. An example with mapVertices: {code} public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper) { TypeInformationK keyType = ((TupleTypeInfo?) vertices.getType()).getTypeAt(0); String callLocation = Utils.getCallLocationName(); TypeInformationNV valueType = TypeExtractor.getMapReturnTypes(mapper, vertices.getType(), callLocation, false); TypeInformationVertexK, NV returnType = (TypeInformationVertexK, NV) new TupleTypeInfo( Vertex.class, keyType, valueType); return mapVertices(mapper,returnType); } public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper, TypeInformationVertexK, NV returnType) { DataSetVertexK, NV mappedVertices = vertices.map( new MapFunctionVertexK, VV, VertexK, NV() { public VertexK, NV map(VertexK, VV value) throws Exception { return new VertexK, NV(value.f0, mapper.map(value)); } }).returns(returnType); return new GraphK, NV, EV(mappedVertices, this.edges, this.context); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2033) Add overloaded methods with explicit TypeInformation parameters to Gelly
[ https://issues.apache.org/jira/browse/FLINK-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14559213#comment-14559213 ] PJ Van Aeken commented on FLINK-2033: - I will add overloaded methods to the Java API on a need-to-have basis for implementing the Scala Gelly API. Progress can be followed here: https://github.com/PieterJanVanAeken/flink/tree/scala-gelly-api/ Add overloaded methods with explicit TypeInformation parameters to Gelly Key: FLINK-2033 URL: https://issues.apache.org/jira/browse/FLINK-2033 Project: Flink Issue Type: Task Components: Gelly Affects Versions: 0.9 Reporter: PJ Van Aeken Assignee: PJ Van Aeken For the implementation of the Scala API for Gelly (FLINK-1962), we need to pass explicit TypeInformation since the Java TypeExtractor does not work for all Scala Types (see FLINK-2023). To do this, the java Gelly API needs to be expanded with methods that allow for explicit passing of TypeInformation. An example with mapVertices: {code} public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper) { TypeInformationK keyType = ((TupleTypeInfo?) vertices.getType()).getTypeAt(0); String callLocation = Utils.getCallLocationName(); TypeInformationNV valueType = TypeExtractor.getMapReturnTypes(mapper, vertices.getType(), callLocation, false); TypeInformationVertexK, NV returnType = (TypeInformationVertexK, NV) new TupleTypeInfo( Vertex.class, keyType, valueType); return mapVertices(mapper,returnType); } public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper, TypeInformationVertexK, NV returnType) { DataSetVertexK, NV mappedVertices = vertices.map( new MapFunctionVertexK, VV, VertexK, NV() { public VertexK, NV map(VertexK, VV value) throws Exception { return new VertexK, NV(value.f0, mapper.map(value)); } }).returns(returnType); return new GraphK, NV, EV(mappedVertices, this.edges, this.context); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2033) Add overloaded methods with explicit TypeInformation parameters to Gelly
[ https://issues.apache.org/jira/browse/FLINK-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547985#comment-14547985 ] Aljoscha Krettek commented on FLINK-2033: - Yes, I think this is the right way to go. Add overloaded methods with explicit TypeInformation parameters to Gelly Key: FLINK-2033 URL: https://issues.apache.org/jira/browse/FLINK-2033 Project: Flink Issue Type: Task Components: Gelly Affects Versions: 0.9 Reporter: PJ Van Aeken For the implementation of the Scala API for Gelly (FLINK-1962), we need to pass explicit TypeInformation since the Java TypeExtractor does not work for all Scala Types (see FLINK-2023). To do this, the java Gelly API needs to be expanded with methods that allow for explicit passing of TypeInformation. An example with mapVertices: {code} public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper) { TypeInformationK keyType = ((TupleTypeInfo?) vertices.getType()).getTypeAt(0); String callLocation = Utils.getCallLocationName(); TypeInformationNV valueType = TypeExtractor.getMapReturnTypes(mapper, vertices.getType(), callLocation, false); TypeInformationVertexK, NV returnType = (TypeInformationVertexK, NV) new TupleTypeInfo( Vertex.class, keyType, valueType); return mapVertices(mapper,returnType); } public NV GraphK, NV, EV mapVertices(final MapFunctionVertexK, VV, NV mapper, TypeInformationVertexK, NV returnType) { DataSetVertexK, NV mappedVertices = vertices.map( new MapFunctionVertexK, VV, VertexK, NV() { public VertexK, NV map(VertexK, VV value) throws Exception { return new VertexK, NV(value.f0, mapper.map(value)); } }).returns(returnType); return new GraphK, NV, EV(mappedVertices, this.edges, this.context); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)