I should have followed this patch more closely earlier. Sorry!
This logic should not be in JobClient, but rather in InputFormatBase. The kernel should know very little about how inputs are specified, it should delegate all of that to the InputFormat. Inputs will usually be files in a Hadoop FileSystem, but they could be something else entirely, that is, e.g., not easily modelled by Hadoop's FileSystem API. So in mapred kernel code, like JobClient, we shouldn't assume that inputs are from a FileSystem.
I have not been as good at enforcing this distinction in the past. For example, JobConf.addInputPath(Path) should be a static InputFormatBase.addInputPath(JobConf,Path). The method is provided on JobConf as a convenience, for jobs that specify their inputs with FileSystem paths, so this isn't a gross violation: applications are not forced to use this method.
More seriously, the InputFormat method areValidInputDirectories(Path) should be more abstract: we must not assume that inputs are always named with FileSystem Paths. Rather, this method should probably be something like hasValidInput(JobConf). Then InputFormatBase can implement it to glob, etc. To make this even more clear, we should rename InputFormatBase to be FileSystemInputFormat.
But those changes are beyond the scope of this issue and should be made under separate issues. For this issue we need to move as much of the logic as possible out of JobClient and into InputFormatBase.