The Scala way of writing this would be 
```
val client: AvroSourceProtocol = {
   if (enableCompression) {
      SpecificRequester.getClient( .... )
   } else {
      SpecificRequester.getClieant(.....)
   }
}
```