From 4ad6c5218ec6fc115c9e23a563c2bcfa7a2ff638 Mon Sep 17 00:00:00 2001 From: Mosharaf Chowdhury Date: Tue, 19 Oct 2010 15:31:27 -0700 Subject: [PATCH] Removed some commented sort/compare funtions from SourceInfo --- src/scala/spark/Broadcast.scala | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/scala/spark/Broadcast.scala b/src/scala/spark/Broadcast.scala index 2554106c03..aafbb73821 100644 --- a/src/scala/spark/Broadcast.scala +++ b/src/scala/spark/Broadcast.scala @@ -669,24 +669,7 @@ case class SourceInfo (val hostAddress: String, val listenPort: Int, var MBps: Double = BroadcastCS.MaxMBps // Ascending sort based on leecher count - def compareTo (o: SourceInfo): Int = (currentLeechers - o.currentLeechers) - - // Descending sort based on speed - // def compareTo (o: SourceInfo): Int = { - // if (MBps > o.MBps) -1 - // else if (MBps < o.MBps) 1 - // else 0 - // } - - // Descending sort based on globally stored speed - // def compareTo (o: SourceInfo): Int = { - // val mySpeed = BroadcastCS.getSourceSpeed (hostAddress) - // val urSpeed = BroadcastCS.getSourceSpeed (o.hostAddress) - - // if (mySpeed > urSpeed) -1 - // else if (mySpeed < urSpeed) 1 - // else 0 - // } + def compareTo (o: SourceInfo): Int = (currentLeechers - o.currentLeechers) } @serializable