Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5030#discussion_r29555715
  
    --- Diff: core/src/test/scala/org/apache/spark/FileSuite.scala ---
    @@ -169,6 +169,27 @@ class FileSuite extends FunSuite with 
LocalSparkContext {
         assert(output.collect().toList === List(1, 2, 3, 4))
       }
     
    +  test("object files compressed") {
    +    sc = new SparkContext("local", "test")
    +    val normalDir = new File(tempDir, "output_normal").getAbsolutePath
    +    val compressedOutputDir = new File(tempDir, 
"output_compressed").getAbsolutePath
    +    val codec = new DefaultCodec()
    +    
    +    val nums = sc.makeRDD(1 to 4)
    +    nums.saveAsObjectFile(normalDir)
    +    nums.saveAsObjectFile(compressedOutputDir, classOf[DefaultCodec])
    +    
    +    // Try reading the output back as an object file
    +    val normalFile = new File(normalDir, "part-00000")
    +    val normalContent = sc.objectFile[Int](normalDir)
    +    assert(normalContent.collect().toList === List(1, 2, 3, 4))
    +    
    +    val compressedFile = new File(compressedOutputDir, "part-00000" + 
codec.getDefaultExtension)
    --- End diff --
    
    Does this really test if the file is compressed though? It shows it's 
readable, at least.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to