I am writing a MapReduce job in Scalding and having difficulties compiling code that looks perfectly legitimate to me.
val persistenceBins = List[Int](1000 * 60 * 60, 2 * 1000 * 60 * 60, 4 * 1000 * 60 * 60)
val persistenceValues = persistenceBins.map(bin: Int => (bin, getPersistenceValues(connections, bin)) )
connections is RichPipe. getPersistenceValues is defined in the same class as the above code, as:
def getPersistenceValues(connections: RichPipe, binSize: Int): RichPipe = { ... }
I keep getting errors of the kind:
Error:(45, 87) ')' expected but '(' found.
val persistenceValues = persistenceBins.map(bin: Int => (bin, getPersistenceValues(connections, bin)) )
^
Error:(45, 107) ';' expected but ')' found.
val persistenceValues = persistenceBins.map(bin: Int => (bin, getPersistenceValues(connections, bin)) )
^
I can't figure out what's going on. The errors look meaningless to me. What am I doing wrong?