@deprecated Use #fullPath(String, PigContext) instead
(String fileName, DataStorage storage)
| 319 | * @deprecated Use {@link #fullPath(String, PigContext)} instead |
| 320 | */ |
| 321 | @Deprecated |
| 322 | public static String fullPath(String fileName, DataStorage storage) { |
| 323 | String fullPath; |
| 324 | try { |
| 325 | if (fileName.charAt(0) != '/') { |
| 326 | ElementDescriptor currentDir = storage.getActiveContainer(); |
| 327 | ElementDescriptor elem = storage.asElement(currentDir.toString(), fileName); |
| 328 | |
| 329 | fullPath = elem.toString(); |
| 330 | } else { |
| 331 | fullPath = fileName; |
| 332 | } |
| 333 | } catch (DataStorageException e) { |
| 334 | fullPath = fileName; |
| 335 | } |
| 336 | return fullPath; |
| 337 | } |
| 338 | |
| 339 | static public InputStream open(String fileSpec, PigContext pigContext) throws IOException { |
| 340 | fileSpec = checkDefaultPrefix(pigContext.getExecType(), fileSpec); |