GitHub user balidani opened a pull request: https://github.com/apache/flink/pull/420
Added Local Clustering Coefficient Example (Help needed) Hi! I closed https://github.com/apache/flink/pull/400 and created this instead, because the commit history was messed up. I have the following exception when running `LocalClusteringCoefficientExample` Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: Type of TypeVariable 'K' in 'class flink.graphs.library.LocalClusteringCoefficient $NeighborhoodEdgesFunction' could not be determined. This is most likely a type erasure problem. The type extraction currently supports types with generic variables only in cases where all variables in the return type can be deduced from the input type(s). I have no idea how to fix this though. This is @vasia's old reply: > The problem is here: > > DataSet<Tuple2<K, HashSet<K>>> neighborhoods = input.reduceOnEdges(new NeighborhoodEdgesFunction<K>(), EdgeDirection.OUT); > > and we try to get the return type `Tuple2<K, HashSet<K>>` like this: > > public TypeInformation<T> getProducedType() { > return TypeExtractor.createTypeInfo(EdgesFunction.class, function.getClass(), 2, null, null); > } > > Anyone have an idea? Is it because of the nested type parameter in `Tuple2<K, HashSet<K>>` ? Also, I tried propagating an additional parameter `Q extends HashSet<K>`, but it didn't help. Does anybody know what's wrong here? Thanks in advance! You can merge this pull request into a Git repository by running: $ git pull https://github.com/balidani/flink gelly-cc Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/420.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #420 ---- commit 4b9c6be36d2252f2348e4178a9e70d01ccb01e72 Author: Dániel Bali <balijanosdan...@gmail.com> Date: 2015-02-19T13:58:09Z Added Local Clustering Coefficient Example (failing) ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---