Compare commits

...

4 Commits

Author SHA1 Message Date
Jianqin Wang 4609f18352 s 2019-09-30 12:14:28 -07:00
Jianqin Wang 3e6968b55a more console logs 2019-09-30 11:47:14 -07:00
Jianqin Wang 47e0a24b8c fix? 2019-09-30 11:14:46 -07:00
Jianqin Wang 4b0ecf25f8 test 2019-09-30 11:02:10 -07:00
3 changed files with 12 additions and 5 deletions

View File

@ -735,7 +735,7 @@ class DataWrapper {
*/
_putForCopy(cipherBundle, stream, part, dataStoreContext, destBackendInfo,
log, cb) {
return this.put(cipherBundle, stream, part.size, dataStoreContext,
return this.put(cipherBundle, stream, part, dataStoreContext,
destBackendInfo, log, (error, partRetrievalInfo) => {
if (error) {
return cb(error);

View File

@ -46,6 +46,8 @@ class AzureClient {
try {
this._client[azureMethod].apply(this._client, args);
} catch (err) {
console.log('ERROR IS', err);
console.log('ARGS WERE', args);
const error = errors.ServiceUnavailable;
if (log) {
log.error('error thrown by Azure Storage Client Library',
@ -155,6 +157,7 @@ class AzureClient {
return callback(null, azureKey);
}], log, callback);
}
console.log('PARAMS ARE', this._azureContainerName, azureKey, stream, size, options);
return this._errorWrapper('put', 'createBlockBlobFromStream',
[this._azureContainerName, azureKey, stream, size, options,
err => {

View File

@ -148,6 +148,8 @@ const utils = {
});
},
translateAzureMetaHeaders(metaHeaders, tags) {
console.log('TAGS ARE', tags);
console.log('meta headers are', metaHeaders);
const translatedMetaHeaders = {};
if (tags) {
// tags are passed as string of format 'key1=value1&key2=value2'
@ -160,10 +162,12 @@ const utils = {
});
translatedMetaHeaders.tags = JSON.stringify(tagObj);
}
if (metaHeaders) {
Object.keys(metaHeaders).forEach(headerName => {
const translated = headerName.substring(11).replace(/-/g, '_');
translatedMetaHeaders[translated] = metaHeaders[headerName];
});
}
return translatedMetaHeaders;
},
/**