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

Method open

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

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)

Source from the content-addressed store, hash-verified

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

Callers 11

testStoreFunctionMethod · 0.95
storeFunctionMethod · 0.95
testStoreFunctionMethod · 0.95
storeFunctionMethod · 0.95
testMapOnlyMethod · 0.95
testMapOnlyBinStorageMethod · 0.95
testMapReduceOnlyMethod · 0.95
testMapCombineReduceMethod · 0.95
testMultipleMRJobsMethod · 0.95

Calls 15

checkDefaultPrefixMethod · 0.95
fullPathMethod · 0.95
openDFSFileMethod · 0.95
openLFSFileMethod · 0.95
existsMethod · 0.95
getDataStorageMethod · 0.95
systemElementMethod · 0.95
sopenMethod · 0.95
seekMethod · 0.95
lengthMethod · 0.80
getDfsMethod · 0.80
getLfsMethod · 0.80

Tested by 11

testStoreFunctionMethod · 0.76
storeFunctionMethod · 0.76
testStoreFunctionMethod · 0.76
storeFunctionMethod · 0.76
testMapOnlyMethod · 0.76
testMapOnlyBinStorageMethod · 0.76
testMapReduceOnlyMethod · 0.76
testMapCombineReduceMethod · 0.76
testMultipleMRJobsMethod · 0.76