Skip to content

Commit 3acc1d3

Browse files
committed
more scalastyle off/on
1 parent ffbcbbb commit 3acc1d3

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ object FakeRackUtil {
8585
* a list of "live" executors and their hostnames for isExecutorAlive and hasExecutorsAliveOnHost
8686
* to work, and these are required for locality in TaskSetManager.
8787
*/
88+
// scalastyle:off
8889
class FakeTaskScheduler(sc: SparkContext, liveExecutors: (String, String)* /* execId, host */)
8990
extends TaskSchedulerImpl(sc)
91+
// scalastyle:on
9092
{
9193
val startedTasks = new ArrayBuffer[Long]
9294
val endedTasks = new mutable.HashMap[Long, TaskEndReason]

core/src/test/scala/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriterSuite.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ class BypassMergeSortShuffleWriterSuite extends SparkFunSuite with BeforeAndAfte
140140
conf
141141
)
142142
writer.write(Iterator.empty)
143+
// scalastyle:off
143144
writer.stop(/* success = */ true)
145+
// scalastyle:on
144146
assert(writer.getPartitionLengths.sum === 0)
145147
assert(outputFile.exists())
146148
assert(outputFile.length() === 0)
@@ -164,7 +166,9 @@ class BypassMergeSortShuffleWriterSuite extends SparkFunSuite with BeforeAndAfte
164166
conf
165167
)
166168
writer.write(records)
169+
// scalastyle:off
167170
writer.stop(/* success = */ true)
171+
// scalastyle:on
168172
assert(temporaryFilesCreated.nonEmpty)
169173
assert(writer.getPartitionLengths.sum === outputFile.length())
170174
assert(writer.getPartitionLengths.count(_ == 0L) === 4) // should be 4 zero length files
@@ -206,8 +210,9 @@ class BypassMergeSortShuffleWriterSuite extends SparkFunSuite with BeforeAndAfte
206210
assert(temporaryFilesCreated.nonEmpty)
207211
// Only 3 temp shuffle files will be created
208212
assert(temporaryFilesCreated.count(_.exists()) === 3)
209-
213+
// scalastyle:off
210214
writer.stop(/* success = */ false)
215+
// scalastyle:on
211216
assert(temporaryFilesCreated.count(_.exists()) === 0) // check that temporary files were deleted
212217
}
213218

@@ -229,7 +234,9 @@ class BypassMergeSortShuffleWriterSuite extends SparkFunSuite with BeforeAndAfte
229234
}))
230235
}
231236
assert(temporaryFilesCreated.nonEmpty)
237+
// scalastyle:off
232238
writer.stop(/* success = */ false)
239+
// scalastyle:on
233240
assert(temporaryFilesCreated.count(_.exists()) === 0)
234241
}
235242

sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,9 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
12321232
f2.setLastModified(f1.lastModified + 3600 * 1000 /* 1 hour later */)
12331233

12341234
runTwoBatchesAndVerifyResults(src, latestFirst = true, firstBatch = "2", secondBatch = "1",
1235+
// scalastyle:off
12351236
maxFileAge = Some("1m") /* 1 minute */)
1237+
// scalastyle:on
12361238
}
12371239
}
12381240

sql/hive/src/test/scala/org/apache/spark/sql/hive/PartitionedTablePerfStatsSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ class PartitionedTablePerfStatsSuite
241241
genericTest("file status cache respects size limit") { spec =>
242242
withSQLConf(
243243
SQLConf.HIVE_MANAGE_FILESOURCE_PARTITIONS.key -> "true",
244+
//scalastyle:off
244245
SQLConf.HIVE_FILESOURCE_PARTITION_FILE_CACHE_SIZE.key -> "1" /* 1 byte */) {
246+
//scalastyle:on
245247
withTable("test") {
246248
withTempDir { dir =>
247249
spec.setupTable("test", dir)

0 commit comments

Comments
 (0)