Skip to content

Commit b3752ee

Browse files
committed
修复阿里云只能导出100个文件的bug
1 parent 2ac2fa7 commit b3752ee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/common/aliyun/product/OSS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ public static List<OSSObjectSummary> getAllFileLists(Key key, com.domain.Bucket
138138
String nextMarker = null;
139139
ObjectListing objectListing;
140140
do {
141-
objectListing = ossClient.listObjects(new ListObjectsRequest(bucket.getName()).withMarker(nextMarker).withMaxKeys(200));
142-
141+
objectListing = ossClient.listObjects(new ListObjectsRequest(bucket.getName()).withMarker(nextMarker).withMaxKeys(1000));
143142
List<OSSObjectSummary> sums = objectListing.getObjectSummaries();
144143
result.addAll(sums);
144+
logger.info("获取到存储桶" + bucket.getName() + "文件数量:" + sums.size());
145145
nextMarker = objectListing.getNextMarker();
146146
} while (objectListing.isTruncated());
147147
}catch (Exception e){

src/main/java/com/config/ExecutorServiceConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public class ExecutorServiceConfiguration {
1313

1414
@Bean
1515
public ExecutorService executorService() {
16-
return Executors.newFixedThreadPool(200);
16+
return Executors.newFixedThreadPool(20);
1717
}
1818
}

0 commit comments

Comments
 (0)