String[] locations = getPathStrings(location);
for (String loc : locations) {
// since local mode now is implemented as hadoop's local mode
// we can treat either local or hadoop mode as hadoop mode - hence
// we can use HDataStorage and FileLocalizer.openDFSFile below
HDataStorage storage;
try {
storage = new HDataStorage(new URI(loc), props);
} catch (URISyntaxException e) {
throw new IOException(e);
}
if (!FileLocalizer.fileExists(loc, storage)) {
return null;