[英]Class Tap requires Type Parameters
Scala noob here. 斯卡拉诺布在这里。
I'm integrating a webcrawler that uses cascading internally ( bixo ). 我正在集成一个内部使用级联( bixo )的webcrawler。 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 Tap
s. 到目前为止,我几乎没有取得任何进展,我坚持的一件事是在sinkMap
,基本上是级联Tap
的地图。
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. 欢迎任何指针。
According to the documentation the Tap
class requires three type parameters, so you need to specify them in your map type. 根据文档 , Tap
类需要三个类型参数,因此您需要在地图类型中指定它们。
eg Map[String, Tap[Scheme, BasePath, SinkMode]]
例如Map[String, Tap[Scheme, BasePath, SinkMode]]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.