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, _putForCopy(cipherBundle, stream, part, dataStoreContext, destBackendInfo,
log, cb) { log, cb) {
return this.put(cipherBundle, stream, part.size, dataStoreContext, return this.put(cipherBundle, stream, part, dataStoreContext,
destBackendInfo, log, (error, partRetrievalInfo) => { destBackendInfo, log, (error, partRetrievalInfo) => {
if (error) { if (error) {
return cb(error); return cb(error);

View File

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

View File

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