将数据框插入hbase问题

时间:2017-06-05 12:29:41

标签: apache-spark dataframe hbase

当我尝试使用此tutorial将数据框插入hbase时。 添加此脚本后。

object HBaseRecord
{                                                                                                             
   def apply(i: Int, t: String): HBaseRecord = {
      val s = s"""row${"%03d".format(i)}"""       
      HBaseRecord(s,
      i % 2 == 0,
      i.toDouble,
      i.toFloat,  
      i,
      i.toLong,
      i.toShort,  
      s"String$i: $t",      
      i.toByte)
  }
}

我收到了这个错误:

error: too many arguments for method apply: (i: Int, t: String)HBaseRecord in object HBaseRecord
<console>:1: error: ';' expected but 'for' found.

我如何解决此错误

0 个答案:

没有答案