Yes -- it seems like the java property should override the environment variable, not vice versa as you currently have it.

On Sep 28, 2013, at 7:10 PM, Saisai Shao <notifications@github.com> wrote:

> In core/src/main/scala/org/apache/spark/SparkContext.scala:
> 
> > @@ -144,6 +144,11 @@ class SparkContext(
> >      executorEnvs ++= environment
> >    }
> >  
> > +  // Set SPARK_USER for user who running SparkContext.
> > +  val sparkUser = Option(System.getenv("SPARK_USER"))
> > +    .getOrElse(System.getProperty("user.name", "<unknown>"))
> Hi @kayousterhout , did you mean checking both environment variable and Java property, java property can override system variable?
> 
> —
> Reply to this email directly or view it on GitHub.