| 15 | } |
| 16 | |
| 17 | void S3BucketReader::open(const S3Params& params) { |
| 18 | this->params = params; |
| 19 | |
| 20 | this->keyIndex = s3ext_segid; // we may change it in unit tests |
| 21 | |
| 22 | S3_CHECK_OR_DIE(this->s3Interface != NULL, S3RuntimeError, "s3Interface is NULL"); |
| 23 | |
| 24 | S3Url& s3Url = this->params.getS3Url(); |
| 25 | |
| 26 | S3_CHECK_OR_DIE(s3Url.isValidUrl(), S3ConfigError, s3Url.getFullUrlForCurl() + " is not valid", |
| 27 | s3Url.getFullUrlForCurl()); |
| 28 | |
| 29 | this->keyList = this->s3Interface->listBucket(s3Url); |
| 30 | } |
| 31 | |
| 32 | BucketContent& S3BucketReader::getNextKey() { |
| 33 | BucketContent& key = this->keyList.contents[this->keyIndex]; |
no test coverage detected