Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HttpStore (#3294) #3380

Merged
merged 1 commit into from Dec 22, 2022
Merged

Add HttpStore (#3294) #3380

merged 1 commit into from Dec 22, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Dec 20, 2022

Which issue does this PR close?

Closes #3294

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the object-store Object Store Interface label Dec 20, 2022
@tustvold tustvold marked this pull request as ready for review December 21, 2022 11:23
@tustvold
Copy link
Contributor Author

@roeap not sure if this is something you might be interested in reviewing, absolutely no pressure though 😅

Copy link
Contributor

@roeap roeap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Had only few cosmetic comments.

One question that is likely somehow taken care of is deleting directories. SInce the http store has a concept of directories, what happens (or should happen) to these when we delete an object that has parent directories that are empty. From what I can tell these would just keep on existing. Since we exclude directories when listing files, no harm done, but what happens to the common_prefixes ? Was not 100% sue from the code :)

Comment on lines +302 to +308
match self.prop_stat.status.contains("200 OK") {
true => Ok(()),
false => Err(Error::PropStatus {
href: self.href.clone(),
status: self.prop_stat.status.clone(),
}
.into()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that be simpler as if / else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ends up being more lines of code, so I'm inclined to leave it

Comment on lines +145 to +148
match response.is_dir() {
true => Err(Error::IsDirectory.into()),
false => response.object_meta(self.client.base_url()),
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before, albeit here I fine the match syntax quite concise 😆

retry_config: RetryConfig,
}

impl HttpBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a from_env method here as well, to pick up the HTTP_URL variable? That said, while i don't see much conflicting configs in the env, HTTP_URL is about as generic as it gets 😆 - is something like HTTP_STORE_URL maybe more telling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think unlike S3 or GCP there aren't standard environment variables to use for this purpose, mirroring those used by an SDK, so I think best to leave it for now

@tustvold
Copy link
Contributor Author

From what I can tell these would just keep on existing

Yeah, it is not an ideal situation, but is consistent with how we handle this, or more specifically don't handle this, for LocalFileSystem.

@tustvold tustvold merged commit 98bba9c into apache:master Dec 22, 2022
@ursabot
Copy link

ursabot commented Dec 22, 2022

Benchmark runs are scheduled for baseline = e7fc073 and contender = 98bba9c. 98bba9c is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
object-store Object Store Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HttpStore
3 participants