public static PathFilter newIndexDirFilter ( Configuration conf ) { return new PathFilters . CompositePathFilter ( PathFilters . newExcludeFilesFilter ( conf ) , PathFilters . EXCLUDE_HIDDEN_PATHS_FILTER , new PathFilter ( ) { @ Override public boolean accept ( Path path ) { return path . getName ( ) . startsWith ( "index-" ) ; } } ) ; }
Creates a path filter that accepts non - hidden directories that start with index - This is what the indexes created by this output format look like so this is useful for finding them when traversing the file system