Path path = ((FileSplit) context.getInputSplit()).getPath();
String name = path.getName();
System.out.println(name+"---------------------");
String fileName = path.getParent().toString();
System.out.println(fileName+"=====================");
输出内容
english.txt---------------------
file:/F:/210test=====================