Hmm, I see. Forgot that shell had various hadoop falvors support. So, definitely keep this piece of logic, and maybe enhance with what is in beforeInvocation?

That ExecutionProcessor usage was copy/pasted from Spring Hadoop shell commands as is, not sure we want it everywhere. Especially if we want to use ExecutionProcessor for Exception handling, then we may force a base class for all commands.