-
Notifications
You must be signed in to change notification settings - Fork 125
Parallelize file uploads in fs cp command. #4132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5896ae4
b933398
2fa03e1
d393388
14cfad9
2a9ec1b
179a944
79dd600
2d1f19d
caaff68
12dec5c
2be2174
7db079d
e720670
4029571
6a8077b
1b0ecb2
8d0ede6
4bbbe57
1f331ff
f8bf48a
22da2b3
674fa2e
fdfc0e1
2dc735b
ff6c248
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| file1 content |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| file2 content |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
|
|
||
| >>> [CLI] fs cp -r localdir dbfs:/Volumes/main/default/data/uploaded-dir | ||
| localdir/file1.txt -> dbfs:/Volumes/main/default/data/uploaded-dir/file1.txt | ||
| localdir/file2.txt -> dbfs:/Volumes/main/default/data/uploaded-dir/file2.txt | ||
|
|
||
| >>> [CLI] fs cat dbfs:/Volumes/main/default/data/uploaded-dir/file1.txt | ||
| file1 content | ||
|
|
||
| >>> [CLI] fs cat dbfs:/Volumes/main/default/data/uploaded-dir/file2.txt | ||
| file2 content |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Create parent directory. | ||
| $CLI fs mkdir dbfs:/Volumes/main/default/data | ||
|
|
||
| # Recursive directory copy (output sorted for deterministic ordering). | ||
| trace $CLI fs cp -r localdir dbfs:/Volumes/main/default/data/uploaded-dir 2>&1 | sort | ||
|
|
||
| # Verify files were uploaded correctly. | ||
| trace $CLI fs cat dbfs:/Volumes/main/default/data/uploaded-dir/file1.txt | ||
| trace $CLI fs cat dbfs:/Volumes/main/default/data/uploaded-dir/file2.txt |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Local = true | ||
| Cloud = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| hello world! |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| >>> [CLI] fs cp local.txt dbfs:/Volumes/main/default/data/mydir/ | ||
| local.txt -> dbfs:/Volumes/main/default/data/mydir/local.txt | ||
|
|
||
| >>> [CLI] fs cat dbfs:/Volumes/main/default/data/mydir/local.txt | ||
| hello world! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Create target directory. | ||
| $CLI fs mkdir dbfs:/Volumes/main/default/data/mydir | ||
|
|
||
| # Copy file into a directory (trailing slash indicates directory target). | ||
| trace $CLI fs cp local.txt dbfs:/Volumes/main/default/data/mydir/ | ||
|
|
||
| # Verify file was uploaded correctly. | ||
| trace $CLI fs cat dbfs:/Volumes/main/default/data/mydir/local.txt |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Local = true | ||
| Cloud = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| hello world! |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
|
|
||
| >>> [CLI] fs cp local.txt dbfs:/Volumes/main/default/data/uploaded.txt | ||
| local.txt -> dbfs:/Volumes/main/default/data/uploaded.txt | ||
|
|
||
| >>> [CLI] fs cat dbfs:/Volumes/main/default/data/uploaded.txt | ||
| hello world! | ||
|
|
||
| >>> [CLI] fs cp dbfs:/Volumes/main/default/data/uploaded.txt downloaded.txt | ||
| dbfs:/Volumes/main/default/data/uploaded.txt -> downloaded.txt | ||
|
|
||
| >>> cat downloaded.txt | ||
| hello world! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Create parent directory. | ||
| $CLI fs mkdir dbfs:/Volumes/main/default/data | ||
|
|
||
| # Upload local file to volume. | ||
| trace $CLI fs cp local.txt dbfs:/Volumes/main/default/data/uploaded.txt | ||
|
|
||
| # Verify file was uploaded correctly. | ||
| trace $CLI fs cat dbfs:/Volumes/main/default/data/uploaded.txt | ||
|
|
||
| # Download the same file back to verify round-trip. | ||
| trace $CLI fs cp dbfs:/Volumes/main/default/data/uploaded.txt downloaded.txt | ||
|
|
||
| # Verify downloaded content matches original. | ||
| trace cat downloaded.txt | ||
| rm downloaded.txt |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Local = true | ||
| Cloud = true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
|
|
||
| >>> errcode [CLI] fs cp src dst --concurrency -1 | ||
| Error: --concurrency must be at least 1 | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> errcode [CLI] fs cp src dst --concurrency 0 | ||
| Error: --concurrency must be at least 1 | ||
|
|
||
| Exit code: 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Invalid concurrency values should fail. | ||
| trace errcode $CLI fs cp src dst --concurrency -1 | ||
| trace errcode $CLI fs cp src dst --concurrency 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Local = true | ||
| Cloud = false |
Uh oh!
There was an error while loading. Please reload this page.