flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: Flink cannot compile my join code...
Date Tue, 10 Feb 2015 09:19:07 GMT
Hi,
do you have this import?

import org.apache.flink.api.scala._

You could also just import
org.apache.flink.api.scala.createTypeInformation but most of the other
stuff in the package is required anyways.

Cheers,
Aljoscha

On Tue, Feb 10, 2015 at 10:05 AM, Sebastian <ssc.open@googlemail.com> wrote:
> Hi,
>
> I'm trying to write a simple join in flink-scala but for some reasons flink
> fails to compile my code. I've tried several reformulations but can't get
> rid of the error. Can you tell me how to fix this piece of code? I'm using
> flink 0.8.0.
>
> Sebastian
>
> ---------------------------------------------------------------------
>
> Error:(24, 53) not enough arguments for method apply: (implicit evidence$1:
> org.apache.flink.api.common.typeinfo.TypeInformation[(String, Long)],
> implicit evidence$2: scala.reflect.ClassTag[(String,
> Long)])org.apache.flink.api.scala.DataSet[(String, Long)] in class
> JoinDataSet.
> Unspecified value parameters evidence$1, evidence$2.
>       topTrackers.join(domains).where(0).equalTo(1) { (topTracker, domain)
> => domain.annotation -> topTracker._2 }
>                                                     ^
> Error:(24, 53) could not find implicit value for evidence parameter of type
> org.apache.flink.api.common.typeinfo.TypeInformation[(String, Long)]
>       topTrackers.join(domains).where(0).equalTo(1) { (topTracker, domain)
> => domain.annotation -> topTracker._2 }
>                                                     ^
> ---------------------------------------------------------------------
>
> def computeDistribution(trackingGraphFile: String,
>     domainIndexFile: String) = {
>
>   implicit val env = ExecutionEnvironment.getExecutionEnvironment
>
>   val edges = GraphUtils.readEdges(trackingGraphFile)
>   val domains = GraphUtils.readVertices(domainIndexFile)
>
>   val trackersWithNumDomainsTracked =
>     FlinkUtils.countByKey(edges, { edge: Edge => edge.src })
>
>   val topTrackers =
>     trackersWithNumDomainsTracked.filter { _._2 >= 10000 }
>
>   val topTrackerDomains =
>       topTrackers.join(domains).where(0).equalTo(1) {
>         (topTracker, domain) => domain.annotation -> topTracker._2 }
>
>   topTrackerDomains.print()
>
>   env.execute()
> }
>

Mime
View raw message