You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GichanLee <gi...@git.apache.org> on 2017/10/25 02:05:04 UTC

[GitHub] zeppelin issue #780: [ZEPPELIN-658] Scala: not accepting companion objects i...

Github user GichanLee commented on the issue:

    https://github.com/apache/zeppelin/pull/780
  
    version 0.7.3 same issue, It can't find case class, I think the Interpreter support :paste mode.
    ```
    case class SensorRow(rowkey: String, sector: Double, steam: Double, usage: Double, Log: String, Status: String); 
    object SensorRow extends Serializable { 
        def parseSensorRow(result: Result): SensorRow = {
        val rowkey = Bytes.toString(result.getRow())
          // remove time from rowKey, stats row key is for day
          val p0 = rowkey.split(" ")(0)
          val p1 = Bytes.toDouble(result.getValue(cfDataBytes, Bytes.toBytes("sector")))
          val p2 = Bytes.toDouble(result.getValue(cfDataBytes, Bytes.toBytes("steam")))
          val p3 = Bytes.toDouble(result.getValue(cfDataBytes, Bytes.toBytes("usage")))
          val p4 = Bytes.toString(result.getValue(cfDataBytes, Bytes.toBytes("Log")))
          val p5 = Bytes.toString(result.getValue(cfDataBytes, Bytes.toBytes("Status")))
          SensorRow(p0, p1, p2, p3, p4, p5)
        }
    }
    ```
    ERROR console message
    ```
    defined class SensorRow
    <console>:183: error: SensorRow.type does not take parameters
                 SensorRow(p0, p1, p2, p3, p4, p5)
    
    ```


---