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

Method getFirstPartFile

test/org/apache/pig/test/Util.java:1527–1536  ·  view source on GitHub ↗
(Path path)

Source from the content-addressed store, hash-verified

1525 }
1526
1527 public static Path getFirstPartFile(Path path) throws Exception {
1528 FileStatus[] parts = FileSystem.get(path.toUri(), new Configuration()).listStatus(path,
1529 new PathFilter() {
1530 @Override
1531 public boolean accept(Path path) {
1532 return path.getName().startsWith("part-");
1533 }
1534 });
1535 return parts[0].getPath();
1536 }
1537
1538 public static File getFirstPartFile(File dir) throws Exception {
1539 File[] parts = dir.listFiles(new FilenameFilter() {

Callers 9

storeJsonMethod · 0.95
testJsonLoaderStorageMethod · 0.95
testJsonStorageLimitMethod · 0.95
testSimpleStoreMethod · 0.95
testMultiStoreMethod · 0.95

Calls 3

getMethod · 0.65
listStatusMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected