diff options
author | Holden Karau <holden@us.ibm.com> | 2016-08-08 15:54:03 -0700 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2016-08-08 15:54:03 -0700 |
commit | 9216901d52c9c763bfb908013587dcf5e781f15b (patch) | |
tree | 7e6e639340f1aef0048e586aa055b97470cafb42 /yarn | |
parent | 8650239050ade91689ffa0672ea094de2594e37c (diff) | |
download | spark-9216901d52c9c763bfb908013587dcf5e781f15b.tar.gz spark-9216901d52c9c763bfb908013587dcf5e781f15b.tar.bz2 spark-9216901d52c9c763bfb908013587dcf5e781f15b.zip |
[SPARK-16779][TRIVIAL] Avoid using postfix operators where they do not add much and remove whitelisting
## What changes were proposed in this pull request?
Avoid using postfix operation for command execution in SQLQuerySuite where it wasn't whitelisted and audit existing whitelistings removing postfix operators from most places. Some notable places where postfix operation remains is in the XML parsing & time units (seconds, millis, etc.) where it arguably can improve readability.
## How was this patch tested?
Existing tests.
Author: Holden Karau <holden@us.ibm.com>
Closes #14407 from holdenk/SPARK-16779.
Diffstat (limited to 'yarn')
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/deploy/yarn/AMDelegationTokenRenewer.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/AMDelegationTokenRenewer.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/AMDelegationTokenRenewer.scala index a6a4fec3ba..310a7a6b05 100644 --- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/AMDelegationTokenRenewer.scala +++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/AMDelegationTokenRenewer.scala @@ -19,8 +19,6 @@ package org.apache.spark.deploy.yarn import java.security.PrivilegedExceptionAction import java.util.concurrent.{Executors, TimeUnit} -import scala.language.postfixOps - import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.hadoop.security.UserGroupInformation @@ -128,7 +126,7 @@ private[yarn] class AMDelegationTokenRenewer( try { val remoteFs = FileSystem.get(freshHadoopConf) val credentialsPath = new Path(credentialsFile) - val thresholdTime = System.currentTimeMillis() - (daysToKeepFiles days).toMillis + val thresholdTime = System.currentTimeMillis() - (daysToKeepFiles.days).toMillis hadoopUtil.listFilesSorted( remoteFs, credentialsPath.getParent, credentialsPath.getName, SparkHadoopUtil.SPARK_YARN_CREDS_TEMP_EXTENSION) |