Skip to content

Commit 4c98fae

Browse files
committed
- Readme update
- Better errror messages when writes to disk fail
1 parent e032b5c commit 4c98fae

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ For example:
111111

112112
`./blobporter -f s3://s3.amazonaws.com/bpperftest/mydata -c froms3 -t s3-blockblob -p`
113113

114-
Note: It is recommended to perform this operation from a VM running on the cloud. This is a network bound operation where is uploaded as it is received from the source.
114+
Note: It is recommended to perform this operation from a VM running on the cloud. This is a network bound operation where data from the source is uploaded as it is received.
115115

116116
### Upload from an HTTP/HTTPS source to Azure Blob Storage
117117

targets/multifile.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,15 @@ func (t *MultiFile) WritePart(part *pipeline.Part) (duration time.Duration, star
176176
var fh *os.File
177177

178178
if fh, err = t.loadHandle(part); err != nil {
179-
log.Fatal(err)
179+
log.Fatal(fmt.Errorf("Failed to load the handle: %v", err))
180180
}
181181

182182
if _, err = fh.WriteAt((*part).Data, int64((*part).Offset)); err != nil {
183-
log.Fatal(err)
183+
log.Fatal(fmt.Errorf("Failed to write data: %v", err))
184184
}
185185

186-
//fmt.Printf("Part Written:%+v\n", part.Ordinal)
187-
188186
if err = t.closeOrKeepHandle(part, fh); err != nil {
189-
log.Fatal(err)
187+
log.Fatal(fmt.Errorf("Failed to close or keep the handle: %v", err))
190188
}
191189
duration = time.Now().Sub(startTime)
192190

0 commit comments

Comments
 (0)