diff options
author | Azeem Jiva <azeemj@gmail.com> | 2016-04-26 11:49:04 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-04-26 11:49:04 +0100 |
commit | de6e633420aba1fe5d806a2725a95e610699ae7d (patch) | |
tree | 4d7d0ddc183404e27f56f723efa7929c981b78ea /yarn/src/main/scala/org/apache | |
parent | f70e4fff0e7adb8d6fe774daf11fb0dfb080cf31 (diff) | |
download | spark-de6e633420aba1fe5d806a2725a95e610699ae7d.tar.gz spark-de6e633420aba1fe5d806a2725a95e610699ae7d.tar.bz2 spark-de6e633420aba1fe5d806a2725a95e610699ae7d.zip |
[SPARK-14756][CORE] Use parseLong instead of valueOf
## What changes were proposed in this pull request?
Use Long.parseLong which returns a primative.
Use a series of appends() reduces the creation of an extra StringBuilder type
## How was this patch tested?
Unit tests
Author: Azeem Jiva <azeemj@gmail.com>
Closes #12520 from javawithjiva/minor.
Diffstat (limited to 'yarn/src/main/scala/org/apache')
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala index 4b36da309d..ee002f6223 100644 --- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala +++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala @@ -345,7 +345,7 @@ object YarnSparkHadoopUtil { val RM_REQUEST_PRIORITY = Priority.newInstance(1) def get: YarnSparkHadoopUtil = { - val yarnMode = java.lang.Boolean.valueOf( + val yarnMode = java.lang.Boolean.parseBoolean( System.getProperty("SPARK_YARN_MODE", System.getenv("SPARK_YARN_MODE"))) if (!yarnMode) { throw new SparkException("YarnSparkHadoopUtil is not available in non-YARN mode!") |