Skip to content

Commit

Permalink
修复阿里云只能导出100个文件的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
libaibaia committed Oct 30, 2023
1 parent 2ac2fa7 commit b3752ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/common/aliyun/product/OSS.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ public static List<OSSObjectSummary> getAllFileLists(Key key, com.domain.Bucket
String nextMarker = null;
ObjectListing objectListing;
do {
objectListing = ossClient.listObjects(new ListObjectsRequest(bucket.getName()).withMarker(nextMarker).withMaxKeys(200));

objectListing = ossClient.listObjects(new ListObjectsRequest(bucket.getName()).withMarker(nextMarker).withMaxKeys(1000));
List<OSSObjectSummary> sums = objectListing.getObjectSummaries();
result.addAll(sums);
logger.info("获取到存储桶" + bucket.getName() + "文件数量:" + sums.size());
nextMarker = objectListing.getNextMarker();
} while (objectListing.isTruncated());
}catch (Exception e){
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/config/ExecutorServiceConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public class ExecutorServiceConfiguration {

@Bean
public ExecutorService executorService() {
return Executors.newFixedThreadPool(200);
return Executors.newFixedThreadPool(20);
}
}

0 comments on commit b3752ee

Please sign in to comment.