-
Notifications
You must be signed in to change notification settings - Fork 44
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
How to handle exception with blob_clent_wrapper #114
Comments
@Gaurav-Karu hi, cpplite is going to be deprecated in favor of Track2 storage SDK. |
@Jinming-Hu : Yes I am aware of that as it has been conveyed to us by [email protected] , But Does the Track2 storage is in production ? Note: we have already given the dates to client ....so what I can do and we cannot experiments until and unless the new SDK is under production ? we are switching from azure-iot-sdk-c to azure-cpplite because cpplite has a support for proxy |
|
and
|
Not yet, but it's the latest beta8 is considered RC release. So there won't be too many breaking changes between this version and production release (GA). |
@Jinming-Hu ...Is there a way I can recompile cpplite and return errno in another wrapper class which I can use in my code to check the errno....because using assert is dangerous in the production code. Can u please suggest ? |
You don't have to use asserts. Just check client.create_container(your_container_name);
int ret = errno;
if (ret == 0) {
// succeeded
} else if (ret == container_already_exists) {
// container already exists
} there's a list of error numbers here or if you want to wrap code above into a function int create_container_wrapper(const std::string& container_name) {
client.create_container(container_name);
return errno;
} |
Hi Thanks for the update...I have one more query if the files are larger size (Let say 800MB) it will tgake some time to upload in blob storage....Now if the user suspend the upload and resume back. (Do such handling is there ?) |
why blob_client_wrapper obj is not made accessible directly ? And do we need to use only one object blob_client_wrapper to handle upload, Download and delete or we can create different blob_client_wrapper object for handling ? |
Nope, there's no way to suspend or resume for now. But there is a workaround. We have Put Block and Put Block List API. You can split that 800MB data into small chunks, and upload one or a few chunks at a time.
You can use single client_wrapper for multiple operations, even perform these operations from multiple threads. |
How to get the size of committed and uncommitted block if I am using blob_client_wrapper function upload_file_to_blob |
@Gaurav-Karu take a look at this API |
what is the alternative for this api in cpplite ? /// Returns an enumerable collection of the blob's blocks, using the specified block list filter. /// /// One of the enumeration values that indicates whether to return /// committed blocks, uncommitted blocks, or both. /// An object that represents the access condition for the operation. /// An object that specifies additional options for the request. /// An object that represents the context for the current operation. /// An enumerable collection of objects implementing . std::vector<block_list_item> download_block_list(block_listing_filter listing_filter, const access_condition& condition, const blob_request_options& options, operation_context context) const { |
Do I need to call upload again or any specific api in cpplite who does similar ? |
Sorry I didn't get what you mean |
alternative for the below in cpplite? void upload_block_list(const std::vector<block_list_item>& block_list, const access_condition& condition, const blob_request_options& options, operation_context context) |
yeah, put_block_list |
@Jinming-Hu can I use cpprestsdk with azure0cpplite, Because I remember old azure-sdk library supports cpprestsdk , Because cpprestsdk internally uses casablanca So can I use cpprest sdk feature api like... |
I think so, you can use both sdk side-by-side |
@Jinming-Hu I need a small confirmation from you...I am using the below api for Download and Upload.
Note: Please suggest some points to improve the performance |
@Jinming-Hu BT TRACE |
Blob_clent_wrapper return void ....and If I go with blob_clent the volume of download I cannot achieve concurrency....like parallel upload.
Please suggest we need to integrate cpplite as azure-iot-sdk do not have a support for proxy.
Please share some sample code as sample2.cpp doesn't seem to be enough
The text was updated successfully, but these errors were encountered: