File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
hadoop-tools/hadoop-azure/src
main/java/org/apache/hadoop/fs/azurebfs/constants
test/java/org/apache/hadoop/fs/azurebfs Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public final class FileSystemConfigurations {
6363 public static final int MAX_BUFFER_SIZE = 100 * ONE_MB ; // 100 MB
6464 public static final long MAX_AZURE_BLOCK_SIZE = 256 * 1024 * 1024L ; // changing default abfs blocksize to 256MB
6565 public static final String AZURE_BLOCK_LOCATION_HOST_DEFAULT = "localhost" ;
66- public static final int DEFAULT_AZURE_LIST_MAX_RESULTS = 500 ;
66+ public static final int DEFAULT_AZURE_LIST_MAX_RESULTS = 5000 ;
6767
6868 public static final int MAX_CONCURRENT_READ_THREADS = 12 ;
6969 public static final int MAX_CONCURRENT_WRITE_THREADS = 8 ;
Original file line number Diff line number Diff line change @@ -848,7 +848,7 @@ Please refer the following links for further information.
848848listStatus API fetches the FileStatus information from server in a page by page
849849manner. The config ` fs.azure.list.max.results ` used to set the maxResults URI
850850 param which sets the pagesize(maximum results per call). The value should
851- be > 0. By default this will be 500 . Server has a maximum value for this
851+ be > 0. By default this will be 5000 . Server has a maximum value for this
852852 parameter as 5000. So even if the config is above 5000 the response will only
853853contain 5000 entries. Please refer the following link for further information.
854854https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/list
Original file line number Diff line number Diff line change 2929
3030import org .junit .Test ;
3131
32+ import org .apache .hadoop .conf .Configuration ;
33+ import org .apache .hadoop .fs .FileSystem ;
3234import org .apache .hadoop .fs .FSDataOutputStream ;
3335import org .apache .hadoop .fs .FileStatus ;
3436import org .apache .hadoop .fs .LocatedFileStatus ;
3537import org .apache .hadoop .fs .Path ;
3638import org .apache .hadoop .fs .contract .ContractTestUtils ;
3739
40+ import static org .apache .hadoop .fs .azurebfs .constants .ConfigurationKeys .AZURE_LIST_MAX_RESULTS ;
3841import static org .apache .hadoop .fs .contract .ContractTestUtils .assertMkdirs ;
3942import static org .apache .hadoop .fs .contract .ContractTestUtils .createFile ;
4043import static org .apache .hadoop .fs .contract .ContractTestUtils .assertPathExists ;
@@ -55,7 +58,10 @@ public ITestAzureBlobFileSystemListStatus() throws Exception {
5558
5659 @ Test
5760 public void testListPath () throws Exception {
58- final AzureBlobFileSystem fs = getFileSystem ();
61+ Configuration config = new Configuration (this .getRawConfiguration ());
62+ config .set (AZURE_LIST_MAX_RESULTS , "5000" );
63+ final AzureBlobFileSystem fs = (AzureBlobFileSystem ) FileSystem
64+ .newInstance (getFileSystem ().getUri (), config );
5965 final List <Future <Void >> tasks = new ArrayList <>();
6066
6167 ExecutorService es = Executors .newFixedThreadPool (10 );
You can’t perform that action at this time.
0 commit comments