spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Vanzin <van...@cloudera.com>
Subject Re: SparkSubmit.scala and stderr
Date Tue, 03 Feb 2015 22:18:10 GMT
Hi Jay,

On Tue, Feb 3, 2015 at 6:28 AM, jayhutfles <jayhutfles@gmail.com> wrote:
>     // Exposed for testing
>     private[spark] var printStream: PrintStream = System.err

> But as the comment states that it's for testing, maybe I'm
> misunderstanding its intent...

The comment is there to tell someone reading the code that this field
is a `var` and not private just because test code (SparkSubmitSuite in
this case) needs to modify it, otherwise it wouldn't exist or would be
private. Similar in spirit to this annotation:

http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/annotations/VisibleForTesting.html

(Which I'd probably have used in this case, but is not really common
in Spark code.)

-- 
Marcelo

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org


Mime
View raw message