This function returns an input stream to a local file system file or a file residing on Hadoop's DFS @param fileName The filename to open @param execType execType indicating whether executing in local mode or MapReduce mode (Hadoop) @param storage The DataStorage object used to open the fileSpec @re
(String fileName, ExecType execType, DataStorage storage)
| 302 | * @deprecated Use {@link #open(String, PigContext)} instead |
| 303 | */ |
| 304 | @Deprecated |
| 305 | static public InputStream open(String fileName, ExecType execType, DataStorage storage) throws IOException { |
| 306 | fileName = checkDefaultPrefix(execType, fileName); |
| 307 | if (!fileName.startsWith(LOCAL_PREFIX)) { |
| 308 | ElementDescriptor elem = storage.asElement(fullPath(fileName, storage)); |
| 309 | return openDFSFile(elem); |
| 310 | } |
| 311 | else { |
| 312 | fileName = fileName.substring(LOCAL_PREFIX.length()); |
| 313 | ElementDescriptor elem = storage.asElement(fullPath(fileName, storage)); |
| 314 | return openLFSFile(elem); |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * @deprecated Use {@link #fullPath(String, PigContext)} instead |