Skip to content

Commit

Permalink
Clean the codes
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Apr 21, 2015
1 parent b82ed1e commit a0458f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,6 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
}.toMap
}


/**
* Return event rate for all receivers together in each batch time. These are pairs of
* an event rate with a batch time.
*/
def eventRateForAllReceivers: Seq[(Long, Double)] = synchronized {
retainedBatches.take(batchInfoLimit).map { batchInfo =>
(batchInfo.batchTime.milliseconds, batchInfo.numRecords.toDouble * 1000 / batchDuration)
}
}

def lastReceivedBatchRecords: Map[Int, Long] = synchronized {
val lastReceivedBlockInfoOption = lastReceivedBatch.map(_.receivedBlockInfo)
lastReceivedBlockInfoOption.map { lastReceivedBlockInfo =>
Expand All @@ -195,7 +184,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
receiverInfos.get(receiverId)
}

def receiverLastErrorTimeo(receiverId: Int): Option[Long] = synchronized {
def receiverLastErrorTime(receiverId: Int): Option[Long] = synchronized {
receiverLastErrorTime.get(receiverId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
if (msg.size > 100) msg.take(97) + "..." else msg
}.getOrElse(emptyCell)
val receiverLastErrorTime =
listener.receiverLastErrorTimeo(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell)
listener.receiverLastErrorTime(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell)
val receivedRecords = listener.receivedRecordsWithBatchTime.get(receiverId).getOrElse(Seq())

val timelineForEventRate =
Expand Down

0 comments on commit a0458f9

Please sign in to comment.