MCPcopy Create free account
hub / github.com/apache/pig / fullPath

Method fullPath

src/org/apache/pig/impl/io/FileLocalizer.java:321–337  ·  view source on GitHub ↗

@deprecated Use #fullPath(String, PigContext) instead

(String fileName, DataStorage storage)

Source from the content-addressed store, hash-verified

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);

Callers 11

testMapOnlyMethod · 0.95
testMapOnlyBinStorageMethod · 0.95
testMapReduceOnlyMethod · 0.95
testMapCombineReduceMethod · 0.95
testMultipleMRJobsMethod · 0.95
openMethod · 0.95
findMetaFileMethod · 0.95

Calls 4

getDfsMethod · 0.80
getActiveContainerMethod · 0.65
asElementMethod · 0.65
toStringMethod · 0.45

Tested by 9

testMapOnlyMethod · 0.76
testMapOnlyBinStorageMethod · 0.76
testMapReduceOnlyMethod · 0.76
testMapCombineReduceMethod · 0.76
testMultipleMRJobsMethod · 0.76