public List < FileStatusExtended > getRandomFilesSample ( double percentage ) { if ( ! ( percentage > 0 && percentage <= 1.0 ) ) { throw new IllegalArgumentException ( "Invalid percentage : " + percentage + " value should be between (0 - 1.0]" ) ; } LOG . info ( "Sampling : " + ( percentage * 100 ) + " percent of files" ) ; return namesystem . getRandomFiles ( percentage ) ; }
Get a sample of the total files in the FileSystem . The sampling is done randomly .