From first glance Client1 and Client2 are differ only by ‘code refactoring’. However, if the same invocations are done in map (or any other) function on RDD, this small refactoring cause additional serialization of Service object.
Result of decompiling each client:
So, first client doesn’t require Service object to be serialiazed, while the second does. It is happening as Scala compiler performs eta-expantion on method given in Client2. Compiler generates new Function that calls process directly on concreate Service instance.