zsx*_*ing 14
在FileInputFormat
使用以下hiddenFileFilter默认情况下:
private static final PathFilter hiddenFileFilter = new PathFilter(){
public boolean accept(Path p){
String name = p.getName();
return !name.startsWith("_") && !name.startsWith(".");
}
};
Run Code Online (Sandbox Code Playgroud)
所以,如果你使用的任何FileInputFormat
(例如TextInputFormat
,KeyValueTextInputFormat
,SequenceFileInputFormat
),隐藏文件(文件名以"_"或"")将被忽略.
您可以使用FileInputFormat.setInputPathFilter来设置自定义PathFilter
.请记住,hiddenFileFilter
它始终是活跃的.
归档时间: |
|
查看次数: |
3896 次 |
最近记录: |