Hi,
I want to debug my code in Scala IDE with local execution. I tested with the word count example, which created by
curl
http://flink.apache.org/q/quickstart-scala.sh | bash
First: there is an error at “fromElement”, “can't expand macros compiled by previous versions of Scala”.
Second: the console shows that “Error: Could not find or load main class org.myorg.quickstart.WordCount”
Scala version: 2.10.4
Scala eclipse version: 4.3.0
Thank you for your help.
Best regards,
lolo
_____________________________________________________________________
object WordCount {
def main(args: Array[String]) {
// set up the execution environment
val env = ExecutionEnvironment.createLocalEnvironment()
// get input data
val text = env.fromElements("To be, or not to be,--that is the question:--",
"Whether 'tis nobler in the mind to suffer", "The slings and arrows of outrageous fortune",
"Or to take arms against a sea of troubles,")
val counts = text.flatMap { _.toLowerCase.split("\\W+") }
.map { (_, 1) }
.groupBy(0)
.sum(1)
// execute and print result
counts.print()
}
}
____________________________________________________________________