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

    https://github.com/apache/spark/pull/19277#discussion_r139664703
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
    @@ -347,15 +347,14 @@ private[spark] object EventLoggingListener extends 
Logging {
       def openEventLog(log: Path, fs: FileSystem): InputStream = {
         val in = new BufferedInputStream(fs.open(log))
     
    -    // Compression codec is encoded as an extension, e.g. app_123.lzf
    -    // Since we sanitize the app ID to not include periods, it is safe to 
split on it
    -    val logName = log.getName.stripSuffix(IN_PROGRESS)
    -    val codecName: Option[String] = logName.split("\\.").tail.lastOption
    -    val codec = codecName.map { c =>
    -      codecMap.getOrElseUpdate(c, CompressionCodec.createCodec(new 
SparkConf, c))
    -    }
    -
         try {
    +      // Compression codec is encoded as an extension, e.g. app_123.lzf
    +      // Since we sanitize the app ID to not include periods, it is safe 
to split on it
    +      val logName = log.getName.stripSuffix(IN_PROGRESS)
    +      val codecName: Option[String] = logName.split("\\.").tail.lastOption
    --- End diff --
    
    These two lines don't need to be in the try block. Best to keep it small.


---

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

Reply via email to