data_lake_processor.c File Reference

Data lake processor module implementation file. More...

Include dependency graph for data_lake_processor.c:

Go to the source code of this file.

Macros

#define SINGLE_OBJECT_SIZE   1
 

Functions

static mcl_error_t _add_authorization_header (mcl_http_request_t *request, const char *access_token)
 
static data_lake_object_t ** _data_lake_object_list_to_array (mcl_list_t *object_list)
 
static mcl_error_t _generate_upload_urls (data_lake_processor_t *processor, data_lake_object_t **object_array, mcl_size_t array_size, const char *subtenant_id)
 
static void _clear_signed_urls (data_lake_object_t **object_array, mcl_size_t array_size)
 
static mcl_bool_t _check_url_if_it_is_for_azure_storage (data_lake_object_t *object)
 
mcl_error_t data_lake_processor_generate_upload_url (data_lake_processor_t *processor, data_lake_object_t *object, const char *subtenant_id)
 
mcl_error_t data_lake_processor_generate_upload_urls (data_lake_processor_t *processor, mcl_list_t *object_list, const char *subtenant_id)
 
mcl_error_t data_lake_processor_upload (data_lake_processor_t *processor, data_lake_object_t *object)
 

Variables

static const char bearer_format [] = "Bearer %s"
 
static const char string_identifier [] = "%s"
 
static const char application_json [] = "application/json"
 
static const char content_type [] = "Content-Type"
 
static const char azure_storage_url [] = "blob.core.windows.net"
 
static const char azure_header_blob_type [] = "x-ms-blob-type"
 
static const char azure_header_block_blob [] = "BlockBlob"
 

Detailed Description

Data lake processor module implementation file.

Definition in file data_lake_processor.c.

Macro Definition Documentation

#define SINGLE_OBJECT_SIZE   1

Definition at line 17 of file data_lake_processor.c.

Referenced by data_lake_processor_generate_upload_url().

Function Documentation

static mcl_error_t _add_authorization_header ( mcl_http_request_t request,
const char *  access_token 
)
static

Definition at line 168 of file data_lake_processor.c.

References bearer_format, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, mcl_http_request_add_header(), MCL_MALLOC, MCL_NULL, MCL_NULL_CHAR_SIZE, MCL_OK, MCL_OUT_OF_MEMORY, mcl_string_util_snprintf(), mcl_string_util_strlen(), and string_identifier.

Referenced by _generate_upload_urls().

Here is the call graph for this function:

Here is the caller graph for this function:

static mcl_bool_t _check_url_if_it_is_for_azure_storage ( data_lake_object_t object)
static

Definition at line 339 of file data_lake_processor.c.

References azure_storage_url, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FALSE, MCL_NULL_CHAR_SIZE, mcl_string_util_memcmp(), mcl_string_util_strlen(), MCL_TRUE, and data_lake_object_t::signed_url.

Referenced by data_lake_processor_upload().

Here is the call graph for this function:

Here is the caller graph for this function:

static void _clear_signed_urls ( data_lake_object_t **  object_array,
mcl_size_t  array_size 
)
static

Definition at line 297 of file data_lake_processor.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, and MCL_FREE.

Referenced by _generate_upload_urls().

Here is the caller graph for this function:

static data_lake_object_t ** _data_lake_object_list_to_array ( mcl_list_t object_list)
static

Definition at line 310 of file data_lake_processor.c.

References mcl_list_t::count, mcl_list_node_t::data, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, mcl_list_next(), MCL_MALLOC, and MCL_NULL.

Referenced by data_lake_processor_generate_upload_urls().

Here is the call graph for this function:

Here is the caller graph for this function:

mcl_error_t data_lake_processor_generate_upload_url ( data_lake_processor_t processor,
data_lake_object_t object,
const char *  subtenant_id 
)

This function gets the signed URL to upload data to.

Parameters
[in]processorData lake processor.
[in]objectData lake object.
[in]subtenant_idSubtenant ID.
Returns

Definition at line 43 of file data_lake_processor.c.

References _generate_upload_urls(), MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, and SINGLE_OBJECT_SIZE.

Referenced by mcl_data_lake_generate_upload_url(), and mcl_data_lake_generate_upload_url_for_subtenant().

Here is the call graph for this function:

Here is the caller graph for this function:

mcl_error_t data_lake_processor_generate_upload_urls ( data_lake_processor_t processor,
mcl_list_t object_list,
const char *  subtenant_id 
)

This function gets the signed URLs for a list of objects to upload data to.

Parameters
[in]processorData lake processor.
[in]object_listList of data lake objects.
[in]subtenant_idSubtenant ID.
Returns

Definition at line 57 of file data_lake_processor.c.

References _data_lake_object_list_to_array(), _generate_upload_urls(), mcl_list_t::count, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_NULL, and MCL_OUT_OF_MEMORY.

Referenced by mcl_data_lake_generate_upload_urls(), and mcl_data_lake_generate_upload_urls_for_subtenant().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char application_json[] = "application/json"
static

Definition at line 21 of file data_lake_processor.c.

Referenced by _generate_upload_urls().

const char azure_header_blob_type[] = "x-ms-blob-type"
static

Definition at line 24 of file data_lake_processor.c.

Referenced by data_lake_processor_upload().

const char azure_header_block_blob[] = "BlockBlob"
static

Definition at line 25 of file data_lake_processor.c.

Referenced by data_lake_processor_upload().

const char azure_storage_url[] = "blob.core.windows.net"
static

Definition at line 23 of file data_lake_processor.c.

Referenced by _check_url_if_it_is_for_azure_storage().

const char bearer_format[] = "Bearer %s"
static

Definition at line 19 of file data_lake_processor.c.

Referenced by _add_authorization_header().

const char content_type[] = "Content-Type"
static

Definition at line 22 of file data_lake_processor.c.

Referenced by _generate_upload_urls().

const char string_identifier[] = "%s"
static

Definition at line 20 of file data_lake_processor.c.

Referenced by _add_authorization_header().