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

Method getSplitComparable

src/org/apache/pig/FileInputLoadFunc.java:38–52  ·  view source on GitHub ↗
(InputSplit split)

Source from the content-addressed store, hash-verified

36public abstract class FileInputLoadFunc extends LoadFunc implements OrderedLoadFunc {
37
38 @Override
39 public WritableComparable<?> getSplitComparable(InputSplit split)
40 throws IOException{
41 FileSplit fileSplit = null;
42 if(split instanceof FileSplit){
43 fileSplit = (FileSplit)split;
44 }else{
45 throw new RuntimeException("LoadFunc expected split of type FileSplit");
46 }
47
48 return new FileSplitComparable(
49 fileSplit.getPath().toString(),
50 fileSplit.getStart()
51 );
52 }
53
54}

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected