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 {
63
63
public static final int MAX_BUFFER_SIZE = 100 * ONE_MB ; // 100 MB
64
64
public static final long MAX_AZURE_BLOCK_SIZE = 256 * 1024 * 1024L ; // changing default abfs blocksize to 256MB
65
65
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 ;
67
67
68
68
public static final int MAX_CONCURRENT_READ_THREADS = 12 ;
69
69
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.
848
848
listStatus API fetches the FileStatus information from server in a page by page
849
849
manner. The config ` fs.azure.list.max.results ` used to set the maxResults URI
850
850
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
852
852
parameter as 5000. So even if the config is above 5000 the response will only
853
853
contain 5000 entries. Please refer the following link for further information.
854
854
https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/list
Original file line number Diff line number Diff line change 29
29
30
30
import org .junit .Test ;
31
31
32
+ import org .apache .hadoop .conf .Configuration ;
33
+ import org .apache .hadoop .fs .FileSystem ;
32
34
import org .apache .hadoop .fs .FSDataOutputStream ;
33
35
import org .apache .hadoop .fs .FileStatus ;
34
36
import org .apache .hadoop .fs .LocatedFileStatus ;
35
37
import org .apache .hadoop .fs .Path ;
36
38
import org .apache .hadoop .fs .contract .ContractTestUtils ;
37
39
40
+ import static org .apache .hadoop .fs .azurebfs .constants .ConfigurationKeys .AZURE_LIST_MAX_RESULTS ;
38
41
import static org .apache .hadoop .fs .contract .ContractTestUtils .assertMkdirs ;
39
42
import static org .apache .hadoop .fs .contract .ContractTestUtils .createFile ;
40
43
import static org .apache .hadoop .fs .contract .ContractTestUtils .assertPathExists ;
@@ -55,7 +58,10 @@ public ITestAzureBlobFileSystemListStatus() throws Exception {
55
58
56
59
@ Test
57
60
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 );
59
65
final List <Future <Void >> tasks = new ArrayList <>();
60
66
61
67
ExecutorService es = Executors .newFixedThreadPool (10 );
You can’t perform that action at this time.
0 commit comments