Don't need to explicitly match on the option here, you can just:

```scala
  codec.foreach { c =>
    conf.setCompressedMapOutput(true)
    conf.set("mapred.output.compress", true)
    conf.setMapOutputCompressorClass(c)
    conf.set("mapred.output.compression.codec", c.getCanonicalName)
    conf.set("mapred.output.compression.type", CompressionType.BLOCK.toString)
  }
```