Skip to content

Commit 32aaa91

Browse files
committed
fix scalastyle errors
1 parent 6fce24f commit 32aaa91

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

core/src/test/scala/org/apache/spark/util/LyftUtilsSuite.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@
1717

1818
package org.apache.spark.util
1919

20-
import org.apache.spark.{SparkException, SparkFunSuite}
20+
import org.apache.spark.{SparkFunSuite}
2121
import org.apache.spark.internal.Logging
2222

2323
object TestObjectLyftUtils {
2424
var testVar = 0L
25-
def setVal() = {
25+
def setVal(): Unit = {
2626
testVar = 1L
2727
}
2828
}
2929

3030
class LyftUtilsSuite extends SparkFunSuite with ResetSystemProperties with Logging {
3131

3232
test("callObjectMethodNoArguments") {
33-
// Test calling the method using reflection 1
34-
val v = LyftUtils.callObjectMethodNoArguments("org.apache.spark.util.TestObjectLyftUtils$", "setVal")
33+
// Test calling the method using reflection
34+
val v = LyftUtils.callObjectMethodNoArguments(
35+
"org.apache.spark.util.TestObjectLyftUtils$", "setVal")
3536
assert(v === true)
3637
assert(TestObjectLyftUtils.testVar === 1)
37-
assert(false ==
38-
LyftUtils.callObjectMethodNoArguments("org.apache.spark.util.TestObjectLyftUtils$", "setVal1"))
38+
assert(false == LyftUtils.callObjectMethodNoArguments(
39+
"org.apache.spark.util.TestObjectLyftUtils$", "setVal1"))
3940
}
4041
}

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,11 @@ class ExecutorPodsAllocator(
467467
val resources = replacePVCsIfNeeded(
468468
podWithAttachedContainer, resolvedExecutorSpec.executorKubernetesResources, reusablePVCs)
469469
val createdExecutorPod = kubernetesClient.pods().create(podWithAttachedContainer)
470-
470+
471471
org.apache.spark.util.LyftUtils.callObjectMethodNoArguments(
472472
"com.lyft.data.spark.AppMetrics$",
473473
"setFirstExecutorAllocationTime")
474-
474+
475475
try {
476476
addOwnerReference(createdExecutorPod, resources)
477477
resources

0 commit comments

Comments
 (0)