fix max objects per request
This commit is contained in:
parent
260c5d4390
commit
d76593e55b
2 changed files with 4 additions and 4 deletions
|
@ -220,7 +220,7 @@ public class BucketSelect extends AppCompatActivity {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
//Your code goes here
|
//Your code goes here
|
||||||
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(8000);
|
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(1000);
|
||||||
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
||||||
ObjectListing result = s3client.listObjects(orequest);
|
ObjectListing result = s3client.listObjects(orequest);
|
||||||
ArrayList<String> objectl = new ArrayList<String>();
|
ArrayList<String> objectl = new ArrayList<String>();
|
||||||
|
|
|
@ -106,9 +106,9 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
//List<Bucket> buckets = s3client.listBuckets();
|
//List<Bucket> buckets = s3client.listBuckets();
|
||||||
ListObjectsRequest orequest;
|
ListObjectsRequest orequest;
|
||||||
if (treelevel == 0) {
|
if (treelevel == 0) {
|
||||||
orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(8000).withDelimiter("/");
|
orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(1000).withDelimiter("/");
|
||||||
} else {
|
} else {
|
||||||
orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(prefix).withMaxKeys(8000).withDelimiter("/");
|
orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(prefix).withMaxKeys(1000).withDelimiter("/");
|
||||||
}
|
}
|
||||||
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
||||||
ObjectListing result = s3client.listObjects(orequest);
|
ObjectListing result = s3client.listObjects(orequest);
|
||||||
|
@ -578,7 +578,7 @@ public class ObjectSelect extends AppCompatActivity {
|
||||||
//Your code goes here
|
//Your code goes here
|
||||||
//List<Bucket> buckets = s3client.listBuckets();
|
//List<Bucket> buckets = s3client.listBuckets();
|
||||||
if (folder) {
|
if (folder) {
|
||||||
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(object).withMaxKeys(8000);
|
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(object).withMaxKeys(1000);
|
||||||
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
|
||||||
ObjectListing result = s3client.listObjects(orequest);
|
ObjectListing result = s3client.listObjects(orequest);
|
||||||
ArrayList<String> objectl = new ArrayList<String>();
|
ArrayList<String> objectl = new ArrayList<String>();
|
||||||
|
|
Loading…
Reference in a new issue