各位请问一下does not take parameters是什么意思,我该怎么做呀
问题描述:
scala> val pagetypeCodeList=pagetypeRDD.map(x=>(userZipCode01Map(x._1),keywordZipCode01(x._2),x._3,x._4)).sortBy(x=>x._4)
:29: error: org.apache.spark.rdd.RDD[(String, Int)] does not take parameters
答
要初始化无参数方法,您需要使用带def关键字的名称,但不带“()”括号。 在调用该方法时,我们也将避免使用“()”括号。
scala重载无参构造方法_Scala中的无参数方法_cumt951045的博客-CSDN博客
scala重载无参构造方法 Scala无参数方法 (Scala parameterless method)A method which accepts no parameters from the calling code. It also denotes that there will not be any empty parentheses. These are special types ...
https://blog.csdn.net/cumt951045/article/details/107764897