You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/08/13 20:49:22 UTC
git commit: replace println to log4j
Repository: spark
Updated Branches:
refs/heads/branch-1.0 bae35b12e -> afb56843d
replace println to log4j
Our program needs to receive a large amount of data and run for a long
time.
We set the log level to WARN but "Storing iterator" "received single"
as such message written to the log file. (over yarn)
Author: fireflyc <fi...@126.com>
Closes #1372 from fireflyc/fix-replace-stdout-log and squashes the following commits:
e684140 [fireflyc] 'info' modified into the 'debug'
fa22a38 [fireflyc] replace println to log4j
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/afb56843
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/afb56843
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/afb56843
Branch: refs/heads/branch-1.0
Commit: afb56843d449e5aa2e09282f4ea695f593ab0215
Parents: bae35b1
Author: fireflyc <fi...@126.com>
Authored: Fri Jul 25 10:47:52 2014 -0700
Committer: Matei Zaharia <ma...@databricks.com>
Committed: Wed Aug 13 11:49:12 2014 -0700
----------------------------------------------------------------------
.../apache/spark/streaming/receiver/ActorReceiver.scala | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/afb56843/streaming/src/main/scala/org/apache/spark/streaming/receiver/ActorReceiver.scala
----------------------------------------------------------------------
diff --git a/streaming/src/main/scala/org/apache/spark/streaming/receiver/ActorReceiver.scala b/streaming/src/main/scala/org/apache/spark/streaming/receiver/ActorReceiver.scala
index 743be58..1868a1e 100644
--- a/streaming/src/main/scala/org/apache/spark/streaming/receiver/ActorReceiver.scala
+++ b/streaming/src/main/scala/org/apache/spark/streaming/receiver/ActorReceiver.scala
@@ -68,13 +68,13 @@ object ActorSupervisorStrategy {
* should be same.
*/
@DeveloperApi
-trait ActorHelper {
+trait ActorHelper extends Logging{
self: Actor => // to ensure that this can be added to Actor classes only
/** Store an iterator of received data as a data block into Spark's memory. */
def store[T](iter: Iterator[T]) {
- println("Storing iterator")
+ logDebug("Storing iterator")
context.parent ! IteratorData(iter)
}
@@ -84,6 +84,7 @@ trait ActorHelper {
* that Spark is configured to use.
*/
def store(bytes: ByteBuffer) {
+ logDebug("Storing Bytes")
context.parent ! ByteBufferData(bytes)
}
@@ -93,7 +94,7 @@ trait ActorHelper {
* being pushed into Spark's memory.
*/
def store[T](item: T) {
- println("Storing item")
+ logDebug("Storing item")
context.parent ! SingleItemData(item)
}
}
@@ -157,15 +158,16 @@ private[streaming] class ActorReceiver[T: ClassTag](
def receive = {
case IteratorData(iterator) =>
- println("received iterator")
+ logDebug("received iterator")
store(iterator.asInstanceOf[Iterator[T]])
case SingleItemData(msg) =>
- println("received single")
+ logDebug("received single")
store(msg.asInstanceOf[T])
n.incrementAndGet
case ByteBufferData(bytes) =>
+ logDebug("received bytes")
store(bytes)
case props: Props =>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org