Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 值getText不是类型参数T的成员_Scala_Apache Spark - Fatal编程技术网

Scala 值getText不是类型参数T的成员

Scala 值getText不是类型参数T的成员,scala,apache-spark,Scala,Apache Spark,我在写下下面一行之后收到了这个错误 val stream = TwitterUtils.createStream(ssc, None, filters) val hashTags = stream.flatMap(status => status.getText.split(" ").filter(.startsWith("#"))) 谁能帮我解决这个问题吗。我不知道这是否是因为flatMap函数,但即使在我使用map函数时,也会出现相同的错误消息。可能是您应该导入org.apache.

我在写下下面一行之后收到了这个错误

val stream = TwitterUtils.createStream(ssc, None, filters)
val hashTags = stream.flatMap(status => status.getText.split(" ").filter(.startsWith("#")))

谁能帮我解决这个问题吗。我不知道这是否是因为flatMap函数,但即使在我使用map函数时,也会出现相同的错误消息。

可能是您应该导入org.apache.spark.streaming.twitter。\uz,看看这个问题,它与YouTunk you@Mehrez的情况相同。我尝试添加了它的依赖项,结果成功了