@@ -20,10 +20,9 @@ package org.apache.spark.sql.sources
2020import scala .collection .mutable
2121
2222import com .google .common .base .Objects
23- import org .apache .hadoop .conf .Configuration
2423import org .apache .hadoop .fs .{FileSystem , Path }
25- import org .apache .hadoop .mapreduce .{ TaskAttemptContext , OutputFormat }
26- import org .apache .hadoop .mapreduce .lib .output .TextOutputFormat
24+ import org .apache .hadoop .mapreduce .TaskAttemptContext
25+ import org .apache .hadoop .mapreduce .lib .output .{ FileOutputFormat , TextOutputFormat }
2726import org .scalatest .BeforeAndAfter
2827
2928import org .apache .spark .rdd .RDD
@@ -110,7 +109,7 @@ class SimpleFSBasedRelation
110109
111110 override def outputWriterClass : Class [_ <: OutputWriter ] = classOf [SimpleOutputWriter ]
112111
113- override def outputFormatClass : Class [_ <: OutputFormat [Void , Row ]] = {
112+ override def outputFormatClass : Class [_ <: FileOutputFormat [Void , Row ]] = {
114113 // This is just a mock, not used within this test suite.
115114 classOf [TextOutputFormat [Void , Row ]]
116115 }
@@ -268,7 +267,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
268267 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
269268
270269 TestResult .synchronized {
271- assert(TestResult .writerPaths.size === 2 )
270+ assert(TestResult .writerPaths.size === 4 )
272271 assert(TestResult .writtenRows === expectedRows.toSet)
273272 }
274273 }
@@ -295,7 +294,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
295294 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
296295
297296 TestResult .synchronized {
298- assert(TestResult .writerPaths.size === 2 )
297+ assert(TestResult .writerPaths.size === 4 )
299298 assert(TestResult .writtenRows === expectedRows.toSet)
300299 }
301300 }
@@ -328,7 +327,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
328327 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 4 ) yield Row (i, s " val_ $i" )
329328
330329 TestResult .synchronized {
331- assert(TestResult .writerPaths.size === 4 )
330+ assert(TestResult .writerPaths.size === 8 )
332331 assert(TestResult .writtenRows === expectedRows.toSet)
333332 }
334333 }
@@ -381,7 +380,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
381380 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
382381
383382 TestResult .synchronized {
384- assert(TestResult .writerPaths.size === 2 )
383+ assert(TestResult .writerPaths.size === 4 )
385384 assert(TestResult .writtenRows === expectedRows.toSet)
386385 }
387386
@@ -443,7 +442,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
443442 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
444443
445444 TestResult .synchronized {
446- assert(TestResult .writerPaths.size === 2 )
445+ assert(TestResult .writerPaths.size === 4 )
447446 assert(TestResult .writtenRows === expectedRows.toSet)
448447 }
449448
@@ -472,7 +471,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
472471 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
473472
474473 TestResult .synchronized {
475- assert(TestResult .writerPaths.size === 2 )
474+ assert(TestResult .writerPaths.size === 4 )
476475 assert(TestResult .writtenRows === expectedRows.toSet)
477476 }
478477
@@ -493,7 +492,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
493492 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
494493
495494 TestResult .synchronized {
496- assert(TestResult .writerPaths.size === 2 )
495+ assert(TestResult .writerPaths.size === 8 )
497496 assert(TestResult .writtenRows === expectedRows.toSet)
498497 }
499498
@@ -535,7 +534,7 @@ class FSBasedRelationSuite extends QueryTest with BeforeAndAfter {
535534 val expectedRows = for (i <- 1 to 3 ; _ <- 1 to 2 ) yield Row (i, s " val_ $i" )
536535
537536 TestResult .synchronized {
538- assert(TestResult .writerPaths.size === 2 )
537+ assert(TestResult .writerPaths.size === 4 )
539538 assert(TestResult .writtenRows === expectedRows.toSet)
540539 }
541540
0 commit comments