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

    https://github.com/apache/spark/pull/4371#discussion_r24295477
  
    --- Diff: 
external/flume/src/test/scala/org/apache/spark/streaming/flume/FlumeStreamSuite.scala
 ---
    @@ -138,14 +138,13 @@ class FlumeStreamSuite extends FunSuite with 
BeforeAndAfter with Matchers with L
           status should be (avro.Status.OK)
         }
         
    -    val decoder = Charset.forName("UTF-8").newDecoder()    
         eventually(timeout(10 seconds), interval(100 milliseconds)) {
           val outputEvents = outputBuffer.flatten.map { _.event }
           outputEvents.foreach {
             event =>
               event.getHeaders.get("test") should be("header")
           }
    -      val output = outputEvents.map(event => 
decoder.decode(event.getBody()).toString)
    +      val output = outputEvents.map(event => new 
String(event.getBody.array(), "UTF-8"))
    --- End diff --
    
    For consistency with similar code elsewhere in Spark, this could reference 
`Charsets.UTF_8` instead of using a string literal; import this from 
`com.google.common.base.Charsets.UTF_8`.


---
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