flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From balidani <...@git.apache.org>
Subject [GitHub] flink pull request: Added Local Clustering Coefficient Example (He...
Date Thu, 19 Feb 2015 14:03:03 GMT
GitHub user balidani opened a pull request:


    Added Local Clustering Coefficient Example (Help needed)

    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
        with generic variables only in cases where all variables in the return type can be
        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:


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 <balijanosdaniel@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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message