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

Method delete

src/org/apache/pig/impl/io/FileLocalizer.java:420–430  ·  view source on GitHub ↗
(String fileSpec, PigContext pigContext)

Source from the content-addressed store, hash-verified

418 }
419
420 static public boolean delete(String fileSpec, PigContext pigContext) throws IOException{
421 fileSpec = checkDefaultPrefix(pigContext.getExecType(), fileSpec);
422 ElementDescriptor elem = null;
423 if (!fileSpec.startsWith(LOCAL_PREFIX)) {
424 elem = pigContext.getDfs().asElement(fileSpec);
425 } else {
426 elem = pigContext.getLfs().asElement(fileSpec);
427 }
428 elem.delete();
429 return true;
430 }
431
432 static Random r = new Random();
433

Callers 6

deleteOutputFilesMethod · 0.95
deleteOutputFilesMethod · 0.95
deleteOutputFilesMethod · 0.95
launchPigMethod · 0.95

Calls 6

checkDefaultPrefixMethod · 0.95
deleteMethod · 0.95
getDfsMethod · 0.80
getLfsMethod · 0.80
asElementMethod · 0.65
getExecTypeMethod · 0.45

Tested by 5

deleteOutputFilesMethod · 0.76
deleteOutputFilesMethod · 0.76
deleteOutputFilesMethod · 0.76