ashish
ashish

Reputation: 125

flink: sortPartition(0, Order.ASCENDING ) error: "not found: value Order"

I am running the following code and getting "error: not found: value Order" I am not able to figure out a reason. What am I doing wrong?

version : Flink v 0.9.1 (hadoop 1) not using hadoop: Local execution shell: scala shell

Scala-Flink> val data_avg = data_split.map{x=> ((x._1), (x._2._2/x._2._1))}.sortPartition(1, Order.ASCENDING).setParallelism(1)
<console>:16: error: not found: value Order
            val data_avg = data_split.map{x=> ((x._1), (x._2._2/x._2._1))}.sortPartition(0, Order.ASCENDING).setParallelism(1)

Upvotes: 3

Views: 220

Answers (1)

Till Rohrmann
Till Rohrmann

Reputation: 13346

The problem is that the enum Order is not automatically imported by Flink's Scala shell. Therefore, you have to add the following import manually.

import org.apache.flink.api.common.operators.Order

Upvotes: 4

Related Questions