(InputSplit split)
| 36 | public 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 | } |