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

Azure Azure Blob Interface #99

Merged
merged 5 commits into from
Jan 27, 2022
Merged

Azure Azure Blob Interface #99

merged 5 commits into from
Jan 27, 2022

Conversation

ShishirPatil
Copy link
Member

@ShishirPatil ShishirPatil commented Jan 27, 2022

Azure Blob storage interface.

Notes:

  • No buckets -> we have containers.
  • For downloading buckets, read_all() faster than stream.chunks()
  • Works for a single region that is mapped to the AZURE_STORAGE_CONNECTION_STRING read from OS environment.

Test with command:
python skylark/test/test_azure_interface.py

TODO:

@ShishirPatil ShishirPatil changed the title [WIP] Azure Interface Azure Interface Jan 27, 2022
@ShishirPatil ShishirPatil changed the title Azure Interface Azure Azure Blob Interface Jan 27, 2022
@ShishirPatil
Copy link
Member Author

Note: Do not use bob_client.exists() to check for existance of a file in azure_interface.py. During testing I found that the API is buggy and will return true even if the blob does not exist. The workaround is as implemented.

Copy link
Contributor

@parasj parasj left a comment

Choose a reason for hiding this comment

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

LGTM

skylark/cli/cli_helper.py Show resolved Hide resolved
skylark/obj_store/azure_interface.py Show resolved Hide resolved

self.container_client = None

# TODO:: Figure this out, since azure by default has 15 workers
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is parallelism in this setup? Does the Azure CLI internally dispatch parallel requests? Or are you explicitly managing this? Or is this nested parallelism?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, azure internally dispatches parallel requests. It is specified by the self.max_concurrency parameter.

skylark/obj_store/azure_interface.py Show resolved Hide resolved
src_object_name, dst_file_path = str(src_object_name), str(dst_file_path)
src_object_name = src_object_name if src_object_name[0] != "/" else src_object_name

def _download_object_helper(offset, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

How is offset used? I thought that the chunk interface you tested was slower than atomic objects?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. It's not used.

skylark/obj_store/azure_interface.py Outdated Show resolved Hide resolved
skylark/obj_store/azure_interface.py Show resolved Hide resolved
@ShishirPatil ShishirPatil merged commit 2c57c3d into main Jan 27, 2022
@ShishirPatil ShishirPatil deleted the azure-interface branch January 27, 2022 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants