Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Using the new Cache implementation.

- Removed unused code related to dualMode (deprecated).
  • Loading branch information...
commit c9cad03c319d950d8e8c4c34e7474c170b4c3aac 1 parent 73714da
Mosharaf Chowdhury authored
View
2  src/scala/spark/Broadcast.scala
@@ -67,7 +67,7 @@ extends Logging {
@serializable
case class SourceInfo (val hostAddress: String, val listenPort: Int,
- val totalBlocks: Int, val totalBytes: Int, val replicaID: Int)
+ val totalBlocks: Int, val totalBytes: Int)
extends Comparable [SourceInfo] with Logging {
var currentLeechers = 0
View
10 src/scala/spark/ChainedBroadcast.scala
@@ -1,7 +1,5 @@
package spark
-import com.google.common.collect.MapMaker
-
import java.io._
import java.net._
import java.util.{Comparator, PriorityQueue, Random, UUID}
@@ -84,7 +82,7 @@ extends Broadcast with Logging {
pqOfSources = new PriorityQueue[SourceInfo]
val masterSource_0 =
- SourceInfo (hostAddress, listenPort, totalBlocks, totalBytes, 0)
+ SourceInfo (hostAddress, listenPort, totalBlocks, totalBytes)
pqOfSources.add (masterSource_0)
// Register with the Tracker
@@ -288,7 +286,7 @@ extends Broadcast with Logging {
logInfo ("Connected to Master's guiding object")
// Send local source information
- oosMaster.writeObject(SourceInfo (hostAddress, listenPort, -1, -1, 0))
+ oosMaster.writeObject(SourceInfo (hostAddress, listenPort, -1, -1))
oosMaster.flush
// Receive source information from Master
@@ -520,7 +518,7 @@ extends Broadcast with Logging {
// Add this new (if it can finish) source to the PQ of sources
thisWorkerInfo = SourceInfo (sourceInfo.hostAddress,
- sourceInfo.listenPort, totalBlocks, totalBytes, 0)
+ sourceInfo.listenPort, totalBlocks, totalBytes)
logInfo ("Adding possible new source to pqOfSources: " + thisWorkerInfo)
pqOfSources.add (thisWorkerInfo)
}
@@ -713,7 +711,7 @@ extends Broadcast with Logging {
private object ChainedBroadcast
extends Logging {
- val values = new MapMaker ().softValues ().makeMap[UUID, Any]
+ val values = Cache.newKeySpace()
var valueToGuidePortMap = Map[UUID, Int] ()
View
4 src/scala/spark/DfsBroadcast.scala
@@ -1,7 +1,5 @@
package spark
-import com.google.common.collect.MapMaker
-
import java.io._
import java.net._
import java.util.UUID
@@ -56,7 +54,7 @@ extends Broadcast with Logging {
private object DfsBroadcast
extends Logging {
- val values = new MapMaker ().softValues ().makeMap[UUID, Any]
+ val values = Cache.newKeySpace()
private var initialized = false
Please sign in to comment.
Something went wrong with that request. Please try again.