Pergunta

Scala noob here.

I'm integrating a webcrawler that uses cascading internally (bixo). So i've been investing some time in porting an example they provide (see here) line by line.

So far I'm making little progress, and one thing I'm stuck with is at the sinkMap, basically a Map of cascading Taps.

I written that line as:

val sinkMap: Map[String, Tap] = Map[String, Tap]()

and that particular line is throwing me

[ant:scalac] /home/matias/.../Crawler.scala:18: error: class Tap takes type parameters
[ant:scalac]     val sinkMap: Map[String, Tap] = Map[String, Tap]()
[ant:scalac]                              ^
[ant:scalac] /home/matias/.../Crawler.scala:18: error: class Tap takes type parameters
[ant:scalac]     val sinkMap: Map[String, Tap] = Map[String, Tap]()
[ant:scalac]                                                 ^

I programming by coincidence here. But I'm certain the above code should work as I expect...

Any pointer is welcome.

Foi útil?

Solução

According to the documentation the Tap class requires three type parameters, so you need to specify them in your map type.

e.g. Map[String, Tap[Scheme, BasePath, SinkMode]]

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top