You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blobporter.go
+52-16Lines changed: 52 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ import (
9
9
"net/url"
10
10
"os"
11
11
"runtime"
12
+
"strconv"
12
13
"strings"
13
14
"sync/atomic"
14
15
"time"
@@ -45,7 +46,7 @@ const (
45
46
// User can use environment variables to specify storage account information
46
47
storageAccountNameEnvVar="ACCOUNT_NAME"
47
48
storageAccountKeyEnvVar="ACCOUNT_KEY"
48
-
programVersion="0.5.02"// version number to show in help
49
+
programVersion="0.5.03"// version number to show in help
49
50
)
50
51
51
52
constnumOfWorkersFactor=9
@@ -66,20 +67,55 @@ func init() {
66
67
extraWorkerBufferSlots=5
67
68
)
68
69
69
-
util.StringListVarAlias(&sourceURIs, "f", "file", "", "URL, file or files (e.g. /data/*.gz) to upload. Destination file for download.")
70
-
util.StringListVarAlias(&blobNames, "n", "name", "", "Blob name to upload or download from Azure Blob Storage. Destination file for download from URL")
71
-
util.StringVarAlias(&containerName, "c", "container_name", "", "container name (e.g. mycontainer)")
72
-
util.IntVarAlias(&numberOfWorkers, "g", "concurrent_workers", defaultNumberOfWorkers, " Number of routines for parallel upload")
73
-
util.IntVarAlias(&numberOfReaders, "r", "concurrent_readers", defaultNumberOfReaders, " Number of threads for parallel reading of the input file")
74
-
util.StringVarAlias(&blockSizeStr, "b", "block_size", blockSizeStr, " Desired size of each blob block. Can be specified an integer byte count or integer suffixed with B, KB, MB, or GB. ")
util.BoolVarAlias(&quietMode, "q", "quiet_mode", false, " Quiet mode, no progress information is written to the stdout. Errors, warnings and final summary still are written")
77
-
util.BoolVarAlias(&calculateMD5, "m", "compute_blockmd5", false, " Computes the MD5 for the block and includes the value in the block request")
78
-
util.IntVarAlias(&util.HTTPClientTimeout, "s", "http_timeout", util.HTTPClientTimeout, "HTTP client timeout in seconds. Default value is 600s.")
79
-
util.StringVarAlias(&storageAccountName, "a", "account_name", "", " Storage account name (e.g. mystorage). Can also be specified via the "+storageAccountNameEnvVar+" environment variable.")
80
-
util.StringVarAlias(&storageAccountKey, "k", "account_key", "", " Storage account key string. Can also be specified via the "+storageAccountKeyEnvVar+" environment variable.")
81
-
util.StringVarAlias(&dedupeLevelOptStr, "d", "dup_check_level", dedupeLevelOptStr, " Desired level of effort to detect duplicate data blocks to minimize upload size. Must be one of "+transfer.DupeCheckLevelStr)
82
-
util.StringVarAlias(&transferDefStr, "t", "transfer_definition", string(defaultTransferDef), "Defines the type of source and target in the transfer. Must be one of file-blockblob, file-pageblob, http-blockblob, http-pageblob, blob-file, pageblock-file (alias of blob-file), blockblob-file (alias of blob-file) or http-file")
70
+
const (
71
+
fileMsg="URL, file or files (e.g. /data/*.gz) to upload.\n\tDestination file for download."
72
+
nameMsg="Blob name for upload or download scenarios from Azure Blob Storage.\n\tDestination file name for downloads from a URL."
73
+
containerNameMsg="Container name (e.g. mycontainer).\n\tIf the container does not exist, it will be created."
74
+
concurrentWorkersMsg="Number of workers for parallel upload."
75
+
concurrentReadersMsg="Number of readers for parallel reading of the input file(s)."
76
+
blockSizeMsg="Desired size of each blob block or page.\n\tCan be an integer byte count or integer suffixed with B, KB, MB, or GB.\n\tFor page blobs the value must be a multiple of 512 bytes."
77
+
verboseMsg="Diplay verbose output for debugging."
78
+
quietModeMsg="Quiet mode, no progress information is written to the stdout.\n\tErrors, warnings and final summary still are written."
79
+
computeBlockMD5Msg="Computes the MD5 for the block and includes the value in the block request."
80
+
httpTimeoutMsg="HTTP client timeout in seconds."
81
+
accountNameMsg="Storage account name (e.g. mystorage).\n\tCan also be specified via the "+storageAccountNameEnvVar+" environment variable."
82
+
accountKeyMsg="Storage account key string.\n\tCan also be specified via the "+storageAccountKeyEnvVar+" environment variable."
83
+
dupcheckLevelMsg="Desired level of effort to detect duplicate data to minimize upload size.\n\tMust be one of "+transfer.DupeCheckLevelStr
84
+
transferDefMsg="Defines the type of source and target in the transfer.\n\tMust be one of:\n\tfile-blockblob, file-pageblob, http-blockblob, http-pageblob, blob-file,\n\tpageblock-file (alias of blob-file), blockblob-file (alias of blob-file)\n\tor http-file."
0 commit comments