We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a scala program in which I define custom keys and create custom partitioners. How can I do this using flambo?
Specifically I want the following code to be transformed into clojure using flambo:
case class RFMCKey(cId: String, R: Double, F: Double, M: Double, C: Double) class RFMCPartitioner(partitions: Int) extends Partitioner { require(partitions >= 0, "Number of partitions ($partitions) cannot be negative.") override def numPartitions: Int = partitions override def getPartition(key: Any): Int = { val k = key.asInstanceOf[RFMCKey] k.cId.hashCode() % numPartitions } } object RFMCKey { implicit def orderingByIdAirportIdDelay[A <: RFMCKey] : Ordering[A] = { Ordering.by(k => (k.R, k.F * -1, k.M * -1, k.C * -1)) } }
How can I do this?
The text was updated successfully, but these errors were encountered:
I noticed that you already posted this question to the flambo-user mailing list, which is the appropriate place rather than an issue here.
Sorry, something went wrong.
No branches or pull requests
I have a scala program in which I define custom keys and create custom partitioners. How can I do this using flambo?
Specifically I want the following code to be transformed into clojure using flambo:
How can I do this?
The text was updated successfully, but these errors were encountered: