mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f15a52044 | ||
|
|
dac9c28d05 | ||
|
|
38479b6329 | ||
|
|
334ccb74e7 | ||
|
|
d72a4c377a | ||
|
|
e708958957 | ||
|
|
5db6079691 | ||
|
|
db58bbf321 | ||
|
|
bf290f030e | ||
|
|
fad7e1f7cb | ||
|
|
94bc9afd9d | ||
|
|
2b783738d6 | ||
|
|
77699855a7 | ||
|
|
f59c3acd5f | ||
|
|
1422684a9e | ||
|
|
98acaa171f | ||
|
|
bec0144e2a | ||
|
|
e94e78854e | ||
|
|
d6d97896c2 | ||
|
|
2b910d1cf8 | ||
|
|
4b0430e71d | ||
|
|
15284e2bee | ||
|
|
81624de27b | ||
|
|
0c4eedf5da | ||
|
|
2d72b3f9a9 | ||
|
|
ab0f7b6697 | ||
|
|
d1dcec6727 | ||
|
|
0fe04a8535 | ||
|
|
ff020cc008 | ||
|
|
26d9b662b1 | ||
|
|
4c85da7844 | ||
|
|
70a4c98b00 | ||
|
|
371972a1c2 | ||
|
|
6464d9e920 | ||
|
|
024f63f669 | ||
|
|
99e325b994 | ||
|
|
8ff29ab30d | ||
|
|
957f15238c | ||
|
|
b1d7963e57 | ||
|
|
5b905fb2b7 | ||
|
|
d90aa31d5f | ||
|
|
7ac40ae3d4 | ||
|
|
aae82dca6f | ||
|
|
39f0246deb | ||
|
|
df0662038c | ||
|
|
180853a2c9 | ||
|
|
2009719b89 | ||
|
|
ccb3bef1c2 | ||
|
|
9c61545338 | ||
|
|
513a120e02 | ||
|
|
ac43c2d4ac | ||
|
|
47db75a695 | ||
|
|
5431c445cd | ||
|
|
167077fae0 | ||
|
|
cec55feeb0 | ||
|
|
4193dafce1 | ||
|
|
abe4a61659 | ||
|
|
54d815fa04 | ||
|
|
0999f9b7ff | ||
|
|
a322ba042e | ||
|
|
4a48332248 | ||
|
|
975be5ea6f | ||
|
|
f26de64901 | ||
|
|
e26925cb41 | ||
|
|
bd2810dcee | ||
|
|
c0deaa4948 | ||
|
|
bd459db5fb | ||
|
|
ee7bf69c03 | ||
|
|
0f360862bf | ||
|
|
409c9328de | ||
|
|
bf8a9d2db1 | ||
|
|
8b9957d461 | ||
|
|
0d9f2f9e7a | ||
|
|
ea2637734a | ||
|
|
764d9cb105 | ||
|
|
f9f499b8d5 | ||
|
|
1e0d64c048 | ||
|
|
e90ad660ff | ||
|
|
c6f2899375 | ||
|
|
51d462f204 | ||
|
|
34132b2c9f | ||
|
|
874fd197b5 | ||
|
|
25e012d30b | ||
|
|
091f999e8c | ||
|
|
377870f4a9 | ||
|
|
131c70a7b4 | ||
|
|
88f8926317 | ||
|
|
f922347c69 | ||
|
|
94db6fb715 | ||
|
|
70897ab538 | ||
|
|
ceb92a2fc0 | ||
|
|
207ed12af9 | ||
|
|
8ed0d827a0 | ||
|
|
fcf715817b | ||
|
|
97edb40275 | ||
|
|
d5364218b2 | ||
|
|
d880fc2bb3 | ||
|
|
6253058d9d | ||
|
|
7b90696601 | ||
|
|
452202f35b | ||
|
|
e3ea544d40 | ||
|
|
5294b6dd4d | ||
|
|
f2d9049e6a | ||
|
|
184fbb6c50 | ||
|
|
25471d579a | ||
|
|
7e9c53bb5e | ||
|
|
76b50a23ae | ||
|
|
9b4b2cb83b | ||
|
|
3911298b96 | ||
|
|
a87f147236 | ||
|
|
84b8f8f66d | ||
|
|
b0f80e0262 | ||
|
|
144ba3996a | ||
|
|
23d85745c6 | ||
|
|
2fa43f6948 | ||
|
|
b889f734ec | ||
|
|
758d70bdc0 | ||
|
|
de286fe662 | ||
|
|
52e0a88a15 | ||
|
|
949607fe90 | ||
|
|
e20f0dbd2d | ||
|
|
ee38ab8581 | ||
|
|
7836f7574e | ||
|
|
f476cf3403 | ||
|
|
5c2eb602c9 | ||
|
|
2f72103c83 | ||
|
|
f19c9e3d9d | ||
|
|
9c8678ded9 | ||
|
|
e05637c42c | ||
|
|
dcd0743a35 | ||
|
|
a5b867af69 | ||
|
|
1f7e52c63e | ||
|
|
f5d4952d73 | ||
|
|
f95c25e113 | ||
|
|
9a339a9cfb | ||
|
|
cacc3e883b | ||
|
|
bf5e45b66a | ||
|
|
401315f337 | ||
|
|
a05725aea6 | ||
|
|
e55076c46f | ||
|
|
cea73ac008 | ||
|
|
dff85e9c71 | ||
|
|
8aec786a6d | ||
|
|
0d817bc347 | ||
|
|
84c401e693 | ||
|
|
d21e2f523d | ||
|
|
c34f04b35b | ||
|
|
f6c8720ded | ||
|
|
50ed9456ff | ||
|
|
0aa947913a | ||
|
|
358d9fb109 | ||
|
|
3fbf68de12 | ||
|
|
c4fa148ee6 | ||
|
|
6bbc1d4026 | ||
|
|
43175e7fe8 | ||
|
|
7617567c02 | ||
|
|
5b28c3f728 | ||
|
|
3550692afc | ||
|
|
0711870f43 | ||
|
|
109dc7fdf6 | ||
|
|
fc54afdba9 | ||
|
|
0623bf582e | ||
|
|
98dc1e5c15 | ||
|
|
049f040c3c | ||
|
|
124b97f6d7 | ||
|
|
1e27d36576 | ||
|
|
f9383aa726 | ||
|
|
b7de4a967e | ||
|
|
b9d8a837af | ||
|
|
5db25a8f2a | ||
|
|
f8d3ff466d | ||
|
|
a522507f95 | ||
|
|
b9933d5589 | ||
|
|
36daa7709d | ||
|
|
0f522da367 | ||
|
|
ea271600ec | ||
|
|
0452ae6a6c | ||
|
|
ec46a34f33 | ||
|
|
18d92dbd45 | ||
|
|
93d15488e4 | ||
|
|
595db62fe7 | ||
|
|
8ef802c259 | ||
|
|
5b106630aa | ||
|
|
1cdbc8beb5 | ||
|
|
d3f89af079 | ||
|
|
707abd5b2d | ||
|
|
29632d5a34 | ||
|
|
e9584d9661 | ||
|
|
6fa3d0cc46 | ||
|
|
c3487d3da7 | ||
|
|
ba0db28dbb | ||
|
|
8e81619d02 | ||
|
|
620be2be16 | ||
|
|
56c94cc08e | ||
|
|
3de1e19780 | ||
|
|
5e9039d728 | ||
|
|
e00a12b099 | ||
|
|
aacdcc4cad | ||
|
|
301b678147 | ||
|
|
47fd5d3fa1 | ||
|
|
7ae51d1ec6 | ||
|
|
190afcc3fd | ||
|
|
faa6167b6b | ||
|
|
b6d7556dda | ||
|
|
ea15476b06 | ||
|
|
53c7161f27 | ||
|
|
30200cb6af | ||
|
|
b5d99110d1 | ||
|
|
6b93148f9c | ||
|
|
d1357c1a3a | ||
|
|
1ffb1e696e | ||
|
|
640c53cda8 | ||
|
|
cc570a4477 | ||
|
|
5c8f1467a1 | ||
|
|
973b8ff067 | ||
|
|
e31fdbc89b | ||
|
|
31922b2bf2 | ||
|
|
b90d92fca9 | ||
|
|
b463ca1a2f | ||
|
|
023155bea5 | ||
|
|
cdadf2f43d | ||
|
|
d0045c643e | ||
|
|
73c6de7de0 | ||
|
|
5fce582bb7 | ||
|
|
a0114c0a72 | ||
|
|
960902735f | ||
|
|
137ce1e9ac | ||
|
|
b2a171632b | ||
|
|
23f3aea4cf | ||
|
|
901e8157de | ||
|
|
9d230521a4 | ||
|
|
10d5b4b32b | ||
|
|
3fc261d27c | ||
|
|
06748f2771 | ||
|
|
5d87ad72d8 | ||
|
|
824f7ad9e1 | ||
|
|
277976bd76 | ||
|
|
d949a238b8 | ||
|
|
cf90f76a35 | ||
|
|
a752f6220e | ||
|
|
37e5684b40 | ||
|
|
6f7ef8711a | ||
|
|
ad3a3c8782 | ||
|
|
c4fc007630 | ||
|
|
c202d4c1b0 | ||
|
|
f9e3e7d1c4 | ||
|
|
896a85d6e4 | ||
|
|
e0064ae097 | ||
|
|
d65bdeef08 | ||
|
|
92658b05a8 | ||
|
|
a635973847 | ||
|
|
0fc242b084 | ||
|
|
f6d391c9da | ||
|
|
150ce9f3f6 | ||
|
|
b51880ed3b | ||
|
|
b64411bda8 | ||
|
|
bb880d6253 | ||
|
|
21c0587900 | ||
|
|
c8645fd232 | ||
|
|
c30f6abb11 | ||
|
|
12914af4d8 | ||
|
|
3429cbe3fc | ||
|
|
d5239ab983 | ||
|
|
bd2dc6d641 | ||
|
|
dfbd8efd26 | ||
|
|
f2dde2b1da | ||
|
|
8efe1db01a | ||
|
|
a8d7615eec | ||
|
|
c4363c4b5e | ||
|
|
a36d7b77be | ||
|
|
85a627b05c | ||
|
|
72d8a9f9a8 | ||
|
|
e22335ba78 | ||
|
|
d54eb9966f | ||
|
|
d734fff322 | ||
|
|
dfaa602661 | ||
|
|
19652c1b83 | ||
|
|
b6a1b84a00 | ||
|
|
6d2000e8da | ||
|
|
c9f573eed8 | ||
|
|
2c92a9ff74 | ||
|
|
60fa26ef45 | ||
|
|
ba83dbda6f | ||
|
|
58d18b68d8 | ||
|
|
f8ef25099c | ||
|
|
0baf3d38c2 | ||
|
|
1f5376c915 | ||
|
|
eaa72cf47f | ||
|
|
e646d92c09 | ||
|
|
3801c5269d | ||
|
|
db5588cac7 | ||
|
|
b52d57eb29 | ||
|
|
a17d61d5e3 | ||
|
|
04fddff3ee | ||
|
|
26d9f898af | ||
|
|
cb8f0ab3a1 | ||
|
|
386d4bfb35 | ||
|
|
ce55922884 | ||
|
|
721c6197f9 | ||
|
|
b834027c5a | ||
|
|
d8ca7d34fe | ||
|
|
22064c3425 | ||
|
|
b9112747b5 | ||
|
|
6690236754 | ||
|
|
4af8c427eb | ||
|
|
4957d8eec6 | ||
|
|
b1501f61dd | ||
|
|
ddd6bee970 | ||
|
|
2c6b68b40e | ||
|
|
b64674018a | ||
|
|
3cb914f7e1 | ||
|
|
ebef579ebb | ||
|
|
576c113c59 | ||
|
|
4e3e2b1b82 | ||
|
|
205ecb5d03 | ||
|
|
fc4208d128 | ||
|
|
48db56ddad | ||
|
|
10d545060f | ||
|
|
41af5a6ee5 | ||
|
|
64e75a286e | ||
|
|
d14d029c73 | ||
|
|
406a80da4b | ||
|
|
2bfc8970d2 | ||
|
|
9b084d4c88 | ||
|
|
eb7cf3de81 | ||
|
|
4260804613 | ||
|
|
d653c5f811 | ||
|
|
03e22ddb43 | ||
|
|
31d2f77ceb | ||
|
|
7de112943b | ||
|
|
7e52b1e195 | ||
|
|
449582343f | ||
|
|
695e3a909c | ||
|
|
cca45b02a2 | ||
|
|
9678fc2106 | ||
|
|
5ff33eb558 | ||
|
|
b324a6536c | ||
|
|
c07ab9c060 | ||
|
|
f4f6855c61 | ||
|
|
3c3682fcce | ||
|
|
01a25755c5 | ||
|
|
bc629665de | ||
|
|
7c277f36ec | ||
|
|
0c90ea9c02 | ||
|
|
c53dad5026 | ||
|
|
6dab56df0d | ||
|
|
409f69c6cf | ||
|
|
99ad7e6021 | ||
|
|
6e66fe2e37 | ||
|
|
b848853add | ||
|
|
9b2b7d4f5a | ||
|
|
916673ae24 | ||
|
|
5307cadb32 | ||
|
|
5b38f22e6e | ||
|
|
131d389fc4 | ||
|
|
f4abefc109 | ||
|
|
39340f7e42 | ||
|
|
7c6324b114 | ||
|
|
bf844d8e46 | ||
|
|
3621987727 | ||
|
|
8c5759a06d | ||
|
|
70777d9b9f | ||
|
|
cb6cf331ca | ||
|
|
7f56a40553 | ||
|
|
a28b668647 | ||
|
|
228b133afa | ||
|
|
853880bd83 | ||
|
|
a112cbe44c | ||
|
|
5afc20dbd3 | ||
|
|
d1bb23645e | ||
|
|
c37d6fc01a | ||
|
|
8c3040db81 | ||
|
|
90d55cd179 | ||
|
|
86a5b6183d | ||
|
|
04300dc2ac | ||
|
|
466bbe4cdd | ||
|
|
82c2ce74db | ||
|
|
10efdc7aab | ||
|
|
803ca3c958 | ||
|
|
9c76896e2d | ||
|
|
bcf35876d1 | ||
|
|
97d69d5336 | ||
|
|
a73e177ecf | ||
|
|
4a4ef3cc3c | ||
|
|
3d8b8ffced | ||
|
|
870a30665b | ||
|
|
ef78631a7c | ||
|
|
9c944377dc | ||
|
|
a54f30b6c6 | ||
|
|
7eb121d5ae | ||
|
|
77098de69a | ||
|
|
de5263364b | ||
|
|
e583dbdd2a | ||
|
|
d81db3c703 | ||
|
|
ade94b0d0a | ||
|
|
ae6292f9f0 | ||
|
|
e16dda88e4 | ||
|
|
105702ebe0 | ||
|
|
903a06a160 | ||
|
|
570b488572 | ||
|
|
4966a3abc7 | ||
|
|
42b72e4006 | ||
|
|
99b7f8fa4b | ||
|
|
85fe01eefa | ||
|
|
75fe6e4ab2 | ||
|
|
ac939ccb89 | ||
|
|
00041f6e08 | ||
|
|
b7a887fea1 | ||
|
|
089446f5b1 | ||
|
|
cc0c8c5f81 | ||
|
|
3741779144 | ||
|
|
580a7fa685 | ||
|
|
87b70a6809 | ||
|
|
27c7611ebf | ||
|
|
9920d65bc0 | ||
|
|
c839ce1b19 | ||
|
|
dc4037925d | ||
|
|
3f3a1341d8 | ||
|
|
301b49b63f | ||
|
|
57a46f46a0 | ||
|
|
8dae81c5ed | ||
|
|
e0f4366f4c | ||
|
|
5df105b1f9 | ||
|
|
f5156cf3a8 | ||
|
|
e90ab4ac60 | ||
|
|
4f7a1f67cd | ||
|
|
913a5d0dd4 | ||
|
|
6f483a4d36 | ||
|
|
7394f7feee | ||
|
|
dbf0de4ce1 | ||
|
|
2930263dfd | ||
|
|
7b424a54dc | ||
|
|
f7e4359b59 | ||
|
|
f7aeb06544 | ||
|
|
c57c79a0ab | ||
|
|
10414fd81c | ||
|
|
2e78a522ab | ||
|
|
762dc219a6 | ||
|
|
21a933c932 | ||
|
|
f0b4a7659a | ||
|
|
cda8cc22bc | ||
|
|
bf88006037 | ||
|
|
9fce75607d | ||
|
|
911475526c | ||
|
|
7eb15b1969 | ||
|
|
676e27c589 | ||
|
|
601ba5fb68 | ||
|
|
57e7582c36 | ||
|
|
7ea2c24c5d | ||
|
|
741a013689 | ||
|
|
ebc1b478b1 | ||
|
|
66a1d6b50f | ||
|
|
6ec81f09f7 | ||
|
|
622521c247 | ||
|
|
6d4846a29a | ||
|
|
d9991aeaef | ||
|
|
9076a0051c | ||
|
|
f875031f06 | ||
|
|
bdba3da2e4 | ||
|
|
f4b52d4c52 | ||
|
|
b4131a3a72 | ||
|
|
f6b92b8561 | ||
|
|
3c8e95eeb3 | ||
|
|
8bac903d29 | ||
|
|
74b53729e1 | ||
|
|
7807f6641a | ||
|
|
c4e862e908 | ||
|
|
81e7e6ceb3 | ||
|
|
63fbf281c7 | ||
|
|
3a75d7f7aa | ||
|
|
fef9c6a520 | ||
|
|
2762154130 | ||
|
|
fb5808e0c3 | ||
|
|
5790d01c6f | ||
|
|
8b3429858d | ||
|
|
2ef6ab998c | ||
|
|
f49a9297c2 | ||
|
|
388f82f322 | ||
|
|
77e4b1376e | ||
|
|
3f758820c1 | ||
|
|
c7892bc7c4 | ||
|
|
f7e0a65e75 | ||
|
|
649555b223 | ||
|
|
973f6dd162 | ||
|
|
65ff7198fe | ||
|
|
28b862f45f | ||
|
|
3bf8e772f8 | ||
|
|
f8fa430257 | ||
|
|
4081d50607 | ||
|
|
409f39390d | ||
|
|
6c8822f269 | ||
|
|
a3553da7f7 | ||
|
|
d49d0a9fc2 | ||
|
|
689b4ecdcc | ||
|
|
e3f40d538d | ||
|
|
9f50b310a0 | ||
|
|
11f99836c3 | ||
|
|
fdd8c5d5e0 | ||
|
|
aac45f3e89 | ||
|
|
58dd880322 | ||
|
|
b6f99c4d83 | ||
|
|
5702727db5 | ||
|
|
4d72a1ce6e | ||
|
|
3172c33fa6 | ||
|
|
42c6e52513 | ||
|
|
4573c99ae3 | ||
|
|
4ffbda1c43 | ||
|
|
2b580a7566 | ||
|
|
eaeb141b09 | ||
|
|
e259052a70 | ||
|
|
7fcfaf7bc9 | ||
|
|
400f0c3e5d |
No files matched your search
@@ -38,13 +38,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
|
|
||||||
- name: Set BUILD_TIME env
|
- name: Set BUILD_TIME env
|
||||||
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
|
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
|
||||||
|
|
||||||
- name: Go Release Binaries Large Disk
|
- name: Go Release Binaries Large Disk
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
|
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
|
||||||
|
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -87,13 +87,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
|
|
||||||
- name: Set BUILD_TIME env
|
- name: Set BUILD_TIME env
|
||||||
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
|
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
|
||||||
|
|
||||||
- name: Go Release Binaries Large Disk
|
- name: Go Release Binaries Large Disk
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -109,7 +109,7 @@ jobs:
|
|||||||
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
|
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
|
||||||
|
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ jobs:
|
|||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
binary_name: weed
|
binary_name: weed
|
||||||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
- name: Go Release Large Disk Binaries
|
- name: Go Release Large Disk Binaries
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ jobs:
|
|||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
binary_name: weed
|
binary_name: weed
|
||||||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
- name: Go Release Large Disk Binaries
|
- name: Go Release Large Disk Binaries
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ jobs:
|
|||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
binary_name: weed
|
binary_name: weed
|
||||||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
- name: Go Release Large Disk Binaries
|
- name: Go Release Large Disk Binaries
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ jobs:
|
|||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
binary_name: weed
|
binary_name: weed
|
||||||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
- name: Go Release Large Disk Binaries
|
- name: Go Release Large Disk Binaries
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ jobs:
|
|||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
- name: Go Release Binaries Normal Volume Size
|
- name: Go Release Binaries Normal Volume Size
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
binary_name: weed
|
binary_name: weed
|
||||||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full"
|
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full"
|
||||||
- name: Go Release Large Disk Binaries
|
- name: Go Release Large Disk Binaries
|
||||||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
|
uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ name: "Code Scanning - Action"
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref }}/codeql
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
||||||
@@ -14,7 +18,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -33,30 +33,30 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
with:
|
with:
|
||||||
buildkitd-flags: "--debug"
|
buildkitd-flags: "--debug"
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Login to GHCR
|
name: Login to GHCR
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.GHCR_USERNAME }}
|
username: ${{ secrets.GHCR_USERNAME }}
|
||||||
password: ${{ secrets.GHCR_TOKEN }}
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -34,30 +34,30 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
with:
|
with:
|
||||||
buildkitd-flags: "--debug"
|
buildkitd-flags: "--debug"
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Login to GHCR
|
name: Login to GHCR
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.GHCR_USERNAME }}
|
username: ${{ secrets.GHCR_USERNAME }}
|
||||||
password: ${{ secrets.GHCR_TOKEN }}
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -34,20 +34,20 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -35,20 +35,20 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -35,20 +35,20 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -34,20 +34,20 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
|
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
chrislusf/seaweedfs
|
chrislusf/seaweedfs
|
||||||
@@ -34,20 +34,20 @@ jobs:
|
|||||||
org.opencontainers.image.vendor=Chris Lu
|
org.opencontainers.image.vendor=Chris Lu
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # v2
|
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||||
- name: 'Dependency Review'
|
- name: 'Dependency Review'
|
||||||
uses: actions/dependency-review-action@94145f3150bfabdc97540cbd5f7e926306ea7744
|
uses: actions/dependency-review-action@11310527b429536e263dc6cc47873e608189ba21
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
name: "End to End"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref }}/e2e
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: docker
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
name: FUSE Mount
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.13
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y fuse
|
||||||
|
|
||||||
|
- name: Start SeaweedFS
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: make build_e2e && docker compose -f ./compose/e2e-mount.yml up --wait
|
||||||
|
|
||||||
|
- name: Run FIO
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: |
|
||||||
|
echo "Starting FIO at: $(date)"
|
||||||
|
# Concurrent r/w
|
||||||
|
echo 'Run randrw with size=16M bs=4k'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
|
||||||
|
|
||||||
|
echo 'Run randrw with size=16M bs=128k'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
|
||||||
|
|
||||||
|
echo 'Run randrw with size=16M bs=1m'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
|
||||||
|
|
||||||
|
# Verified write
|
||||||
|
echo 'Run randwrite with size=16M bs=4k'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
|
||||||
|
|
||||||
|
echo 'Run randwrite with size=16M bs=128k'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
|
||||||
|
|
||||||
|
echo 'Run randwrite with size=16M bs=1m'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
|
||||||
|
|
||||||
|
- name: Save logs
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker compose -f ./compose/e2e-mount.yml logs > output.log
|
||||||
|
echo 'Showing last 500 log lines of mount service:'
|
||||||
|
docker compose -f ./compose/e2e-mount.yml logs --tail 500 mount
|
||||||
|
|
||||||
|
- name: Check for data races
|
||||||
|
if: always()
|
||||||
|
continue-on-error: true # TODO: remove this comment to enable build failure on data races (after all are fixed)
|
||||||
|
run: grep -A50 'DATA RACE' output.log && exit 1 || exit 0
|
||||||
|
|
||||||
|
- name: Archive logs
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: output-logs
|
||||||
|
path: docker/output.log
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: docker compose -f ./compose/e2e-mount.yml down --volumes --remove-orphans --rmi all
|
||||||
@@ -21,13 +21,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Set up Go 1.x
|
||||||
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v2
|
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v2
|
||||||
with:
|
with:
|
||||||
go-version: ^1.13
|
go-version: ^1.13
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ Table of Contents
|
|||||||
* [Features](#features)
|
* [Features](#features)
|
||||||
* [Additional Features](#additional-features)
|
* [Additional Features](#additional-features)
|
||||||
* [Filer Features](#filer-features)
|
* [Filer Features](#filer-features)
|
||||||
* [Example: Using Seaweed Object Store](#example-Using-Seaweed-Object-Store)
|
* [Example: Using Seaweed Object Store](#example-using-seaweed-object-store)
|
||||||
* [Architecture](#Object-Store-Architecture)
|
* [Architecture](#object-store-architecture)
|
||||||
* [Compared to Other File Systems](#compared-to-other-file-systems)
|
* [Compared to Other File Systems](#compared-to-other-file-systems)
|
||||||
* [Compared to HDFS](#compared-to-hdfs)
|
* [Compared to HDFS](#compared-to-hdfs)
|
||||||
* [Compared to GlusterFS, Ceph](#compared-to-glusterfs-ceph)
|
* [Compared to GlusterFS, Ceph](#compared-to-glusterfs-ceph)
|
||||||
@@ -69,9 +69,10 @@ Table of Contents
|
|||||||
* [Dev Plan](#dev-plan)
|
* [Dev Plan](#dev-plan)
|
||||||
* [Installation Guide](#installation-guide)
|
* [Installation Guide](#installation-guide)
|
||||||
* [Disk Related Topics](#disk-related-topics)
|
* [Disk Related Topics](#disk-related-topics)
|
||||||
* [Benchmark](#Benchmark)
|
* [Benchmark](#benchmark)
|
||||||
* [License](#license)
|
* [License](#license)
|
||||||
|
|
||||||
|
# Quick Start #
|
||||||
|
|
||||||
## Quick Start for S3 API on Docker ##
|
## Quick Start for S3 API on Docker ##
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ Also, to increase capacity, just add more volume servers by running `weed volume
|
|||||||
## Quick Start SeaweedFS S3 on AWS ##
|
## Quick Start SeaweedFS S3 on AWS ##
|
||||||
* Setup fast production-ready [SeaweedFS S3 on AWS with cloudformation](https://aws.amazon.com/marketplace/pp/prodview-nzelz5gprlrjc)
|
* Setup fast production-ready [SeaweedFS S3 on AWS with cloudformation](https://aws.amazon.com/marketplace/pp/prodview-nzelz5gprlrjc)
|
||||||
|
|
||||||
## Introduction ##
|
# Introduction #
|
||||||
|
|
||||||
SeaweedFS is a simple and highly scalable distributed file system. There are two objectives:
|
SeaweedFS is a simple and highly scalable distributed file system. There are two objectives:
|
||||||
|
|
||||||
@@ -123,6 +124,7 @@ Faster and Cheaper than direct cloud storage!
|
|||||||
|
|
||||||
[Back to TOC](#table-of-contents)
|
[Back to TOC](#table-of-contents)
|
||||||
|
|
||||||
|
# Features #
|
||||||
## Additional Features ##
|
## Additional Features ##
|
||||||
* Can choose no replication or different replication levels, rack and data center aware.
|
* Can choose no replication or different replication levels, rack and data center aware.
|
||||||
* Automatic master servers failover - no single point of failure (SPOF).
|
* Automatic master servers failover - no single point of failure (SPOF).
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
LABEL author="Chris Lu"
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y curl fio fuse
|
||||||
|
RUN mkdir -p /etc/seaweedfs /data/filerldb2
|
||||||
|
|
||||||
|
COPY ./weed /usr/bin/
|
||||||
|
COPY ./filer.toml /etc/seaweedfs/filer.toml
|
||||||
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
# volume server grpc port
|
||||||
|
EXPOSE 18080
|
||||||
|
# volume server http port
|
||||||
|
EXPOSE 8080
|
||||||
|
# filer server grpc port
|
||||||
|
EXPOSE 18888
|
||||||
|
# filer server http port
|
||||||
|
EXPOSE 8888
|
||||||
|
# master server shared grpc port
|
||||||
|
EXPOSE 19333
|
||||||
|
# master server shared http port
|
||||||
|
EXPOSE 9333
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM gcc:11 as builder
|
FROM gcc:11 as builder
|
||||||
RUN mkdir -p /go/src/github.com/chrislusf/
|
RUN mkdir -p /go/src/github.com/seaweedfs/
|
||||||
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
||||||
ARG BRANCH=${BRANCH:-master}
|
ARG BRANCH=${BRANCH:-master}
|
||||||
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
|
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM golang:1.19-alpine as builder
|
FROM golang:1.19-alpine as builder
|
||||||
RUN apk add git g++ fuse
|
RUN apk add git g++ fuse
|
||||||
RUN mkdir -p /go/src/github.com/chrislusf/
|
RUN mkdir -p /go/src/github.com/seaweedfs/
|
||||||
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
||||||
ARG BRANCH=${BRANCH:-master}
|
ARG BRANCH=${BRANCH:-master}
|
||||||
ARG TAGS
|
ARG TAGS
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ RUN mkdir -p /etc/seaweedfs
|
|||||||
COPY ./filer.toml /etc/seaweedfs/filer.toml
|
COPY ./filer.toml /etc/seaweedfs/filer.toml
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
RUN apk add fuse # for weed mount
|
RUN apk add fuse # for weed mount
|
||||||
|
RUN apk add curl # for health checks
|
||||||
|
|
||||||
# volume server grpc port
|
# volume server grpc port
|
||||||
EXPOSE 18080
|
EXPOSE 18080
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
FROM golang:1.19-buster as builder
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
|
||||||
|
|
||||||
|
ENV ROCKSDB_VERSION v7.5.3
|
||||||
|
|
||||||
|
# build RocksDB
|
||||||
|
RUN cd /tmp && \
|
||||||
|
git clone https://github.com/facebook/rocksdb.git /tmp/rocksdb --depth 1 --single-branch --branch $ROCKSDB_VERSION && \
|
||||||
|
cd rocksdb && \
|
||||||
|
PORTABLE=1 make static_lib && \
|
||||||
|
make install-static
|
||||||
|
|
||||||
|
ENV CGO_CFLAGS "-I/tmp/rocksdb/include"
|
||||||
|
ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
|
||||||
@@ -3,7 +3,7 @@ FROM golang:1.19-buster as builder
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
|
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
|
||||||
|
|
||||||
ENV ROCKSDB_VERSION v7.4.4
|
ENV ROCKSDB_VERSION v7.5.3
|
||||||
|
|
||||||
# build RocksDB
|
# build RocksDB
|
||||||
RUN cd /tmp && \
|
RUN cd /tmp && \
|
||||||
@@ -16,7 +16,7 @@ ENV CGO_CFLAGS "-I/tmp/rocksdb/include"
|
|||||||
ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
|
ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
|
||||||
|
|
||||||
# build SeaweedFS
|
# build SeaweedFS
|
||||||
RUN mkdir -p /go/src/github.com/chrislusf/
|
RUN mkdir -p /go/src/github.com/seaweedfs/
|
||||||
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
|
||||||
ARG BRANCH=${BRANCH:-master}
|
ARG BRANCH=${BRANCH:-master}
|
||||||
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
|
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
FROM chrislusf/rocksdb_dev_env as builder
|
||||||
|
|
||||||
|
# build SeaweedFS
|
||||||
|
RUN mkdir -p /go/src/github.com/seaweedfs/
|
||||||
|
ADD . /go/src/github.com/seaweedfs/seaweedfs
|
||||||
|
RUN ls -al /go/src/github.com/seaweedfs/ && \
|
||||||
|
cd /go/src/github.com/seaweedfs/seaweedfs/weed \
|
||||||
|
&& export LDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
|
||||||
|
&& go install -tags "5BytesOffset rocksdb" -ldflags "-extldflags -static ${LDFLAGS}"
|
||||||
|
|
||||||
|
|
||||||
|
FROM alpine AS final
|
||||||
|
LABEL author="Chris Lu"
|
||||||
|
COPY --from=builder /go/bin/weed /usr/bin/
|
||||||
|
RUN mkdir -p /etc/seaweedfs
|
||||||
|
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/filer_rocksdb.toml /etc/seaweedfs/filer.toml
|
||||||
|
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/entrypoint.sh /entrypoint.sh
|
||||||
|
RUN apk add fuse snappy gflags tmux
|
||||||
|
|
||||||
|
# volume server gprc port
|
||||||
|
EXPOSE 18080
|
||||||
|
# volume server http port
|
||||||
|
EXPOSE 8080
|
||||||
|
# filer server gprc port
|
||||||
|
EXPOSE 18888
|
||||||
|
# filer server http port
|
||||||
|
EXPOSE 8888
|
||||||
|
# master server shared gprc port
|
||||||
|
EXPOSE 19333
|
||||||
|
# master server shared http port
|
||||||
|
EXPOSE 9333
|
||||||
|
# s3 server http port
|
||||||
|
EXPOSE 8333
|
||||||
|
# webdav server http port
|
||||||
|
EXPOSE 7333
|
||||||
|
|
||||||
|
RUN mkdir -p /data/filer_rocksdb
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
+34
-18
@@ -4,14 +4,21 @@ all: gen
|
|||||||
|
|
||||||
gen: dev
|
gen: dev
|
||||||
|
|
||||||
|
cgo ?= 0
|
||||||
binary:
|
binary:
|
||||||
export SWCOMMIT=$(shell git rev-parse --short HEAD)
|
export SWCOMMIT=$(shell git rev-parse --short HEAD)
|
||||||
export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
|
export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
|
||||||
cd ../weed; CGO_ENABLED=0 GOOS=linux go build -tags "$(tags)" -ldflags "-extldflags -static $(SWLDFLAGS)"; mv weed ../docker/
|
cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-extldflags -static $(SWLDFLAGS)" && mv weed ../docker/
|
||||||
|
|
||||||
|
binary_race: options = -race
|
||||||
|
binary_race: cgo = 1
|
||||||
|
binary_race: binary
|
||||||
|
|
||||||
build: binary
|
build: binary
|
||||||
docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
|
docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
|
||||||
rm ./weed
|
|
||||||
|
build_e2e: binary_race
|
||||||
|
docker build --no-cache -t chrislusf/seaweedfs:e2e -f Dockerfile.e2e .
|
||||||
|
|
||||||
go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
|
go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
|
||||||
docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .
|
docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .
|
||||||
@@ -19,6 +26,12 @@ go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
|
|||||||
go_build_large_disk:
|
go_build_large_disk:
|
||||||
docker build --build-arg TAGS=large_disk --no-cache -t chrislusf/seaweedfs:large_disk -f Dockerfile.go_build .
|
docker build --build-arg TAGS=large_disk --no-cache -t chrislusf/seaweedfs:large_disk -f Dockerfile.go_build .
|
||||||
|
|
||||||
|
build_rocksdb_dev_env:
|
||||||
|
docker build --no-cache -t chrislusf/rocksdb_dev_env -f Dockerfile.rocksdb_dev_env .
|
||||||
|
|
||||||
|
build_rocksdb_local:
|
||||||
|
cd .. ; docker build --no-cache -t chrislusf/seaweedfs:rocksdb_local -f docker/Dockerfile.rocksdb_large_local .
|
||||||
|
|
||||||
build_rocksdb:
|
build_rocksdb:
|
||||||
docker build --no-cache -t chrislusf/seaweedfs:rocksdb -f Dockerfile.rocksdb_large .
|
docker build --no-cache -t chrislusf/seaweedfs:rocksdb -f Dockerfile.rocksdb_large .
|
||||||
|
|
||||||
@@ -26,60 +39,63 @@ s3tests_build:
|
|||||||
docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
|
docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
|
||||||
|
|
||||||
dev: build
|
dev: build
|
||||||
docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
|
docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
|
dev_race: binary_race
|
||||||
|
docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_tls: build certstrap
|
dev_tls: build certstrap
|
||||||
ENV_FILE="tls.env" docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
|
ENV_FILE="tls.env" docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_mount: build
|
dev_mount: build
|
||||||
docker-compose -f compose/local-mount-compose.yml -p seaweedfs up
|
docker compose -f compose/local-mount-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
run_image: build
|
run_image: build
|
||||||
docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
|
docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
|
||||||
|
|
||||||
profile_mount: build
|
profile_mount: build
|
||||||
docker-compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
|
docker compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
k8s: build
|
k8s: build
|
||||||
docker-compose -f compose/local-k8s-compose.yml -p seaweedfs up
|
docker compose -f compose/local-k8s-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_registry: build
|
dev_registry: build
|
||||||
docker-compose -f compose/local-registry-compose.yml -p seaweedfs up
|
docker compose -f compose/local-registry-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_replicate: build
|
dev_replicate: build
|
||||||
docker-compose -f compose/local-replicate-compose.yml -p seaweedfs up
|
docker compose -f compose/local-replicate-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_auditlog: build
|
dev_auditlog: build
|
||||||
docker-compose -f compose/local-auditlog-compose.yml -p seaweedfs up
|
docker compose -f compose/local-auditlog-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
dev_nextcloud: build
|
dev_nextcloud: build
|
||||||
docker-compose -f compose/local-nextcloud-compose.yml -p seaweedfs up
|
docker compose -f compose/local-nextcloud-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
cluster: build
|
cluster: build
|
||||||
docker-compose -f compose/local-cluster-compose.yml -p seaweedfs up
|
docker compose -f compose/local-cluster-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
2clusters: build
|
2clusters: build
|
||||||
docker-compose -f compose/local-clusters-compose.yml -p seaweedfs up
|
docker compose -f compose/local-clusters-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
2mount: build
|
2mount: build
|
||||||
docker-compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
|
docker compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
hashicorp_raft: build
|
hashicorp_raft: build
|
||||||
docker-compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
|
docker compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
s3tests: build s3tests_build
|
s3tests: build s3tests_build
|
||||||
docker-compose -f compose/local-s3tests-compose.yml -p seaweedfs up
|
docker compose -f compose/local-s3tests-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
filer_etcd: build
|
filer_etcd: build
|
||||||
docker stack deploy -c compose/swarm-etcd.yml fs
|
docker stack deploy -c compose/swarm-etcd.yml fs
|
||||||
|
|
||||||
test_etcd: build
|
test_etcd: build
|
||||||
docker-compose -f compose/test-etcd-filer.yml -p seaweedfs up
|
docker compose -f compose/test-etcd-filer.yml -p seaweedfs up
|
||||||
|
|
||||||
test_ydb: tags = ydb
|
test_ydb: tags = ydb
|
||||||
test_ydb: build
|
test_ydb: build
|
||||||
export
|
export
|
||||||
docker-compose -f compose/test-ydb-filer.yml -p seaweedfs up
|
docker compose -f compose/test-ydb-filer.yml -p seaweedfs up
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm ./weed
|
rm ./weed
|
||||||
|
|||||||
+13
-3
@@ -1,5 +1,15 @@
|
|||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
|
## Compose V2
|
||||||
|
SeaweedFS now uses the `v2` syntax `docker compose`
|
||||||
|
|
||||||
|
If you rely on using Docker Compose as docker-compose (with a hyphen), you can set up Compose V2 to act as a drop-in replacement of the previous docker-compose. Refer to the [Installing Compose](https://docs.docker.com/compose/install/) section for detailed instructions on upgrading.
|
||||||
|
|
||||||
|
Confirm your system has docker compose v2 with a version check
|
||||||
|
```bash
|
||||||
|
$ docker compose version
|
||||||
|
Docker Compose version v2.10.2
|
||||||
|
```
|
||||||
|
|
||||||
## Try it out
|
## Try it out
|
||||||
|
|
||||||
@@ -7,7 +17,7 @@
|
|||||||
|
|
||||||
wget https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/seaweedfs-compose.yml
|
wget https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/seaweedfs-compose.yml
|
||||||
|
|
||||||
docker-compose -f seaweedfs-compose.yml -p seaweedfs up
|
docker compose -f seaweedfs-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -17,7 +27,7 @@ docker-compose -f seaweedfs-compose.yml -p seaweedfs up
|
|||||||
|
|
||||||
wget https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/seaweedfs-dev-compose.yml
|
wget https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/docker/seaweedfs-dev-compose.yml
|
||||||
|
|
||||||
docker-compose -f seaweedfs-dev-compose.yml -p seaweedfs up
|
docker compose -f seaweedfs-dev-compose.yml -p seaweedfs up
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -44,7 +54,7 @@ docker buildx build --pull --push --platform linux/386,linux/amd64,linux/arm64,l
|
|||||||
docker buildx stop $BUILDER
|
docker buildx stop $BUILDER
|
||||||
```
|
```
|
||||||
|
|
||||||
## Minio debuging
|
## Minio debugging
|
||||||
```
|
```
|
||||||
mc config host add local http://127.0.0.1:9000 some_access_key1 some_secret_key1
|
mc config host add local http://127.0.0.1:9000 some_access_key1 some_secret_key1
|
||||||
mc admin trace --all --verbose local
|
mc admin trace --all --verbose local
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
version: '3.9'
|
||||||
|
|
||||||
|
services:
|
||||||
|
master:
|
||||||
|
image: chrislusf/seaweedfs:e2e
|
||||||
|
command: "-v=4 master -ip=master -ip.bind=0.0.0.0 -raftBootstrap"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 60s
|
||||||
|
|
||||||
|
volume:
|
||||||
|
image: chrislusf/seaweedfs:e2e
|
||||||
|
command: "-v=4 volume -mserver=master:9333 -ip=volume -ip.bind=0.0.0.0 -preStopSeconds=1"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:8080/healthz" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 30s
|
||||||
|
depends_on:
|
||||||
|
master:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
filer:
|
||||||
|
image: chrislusf/seaweedfs:e2e
|
||||||
|
command: "-v=4 filer -master=master:9333 -ip=filer -ip.bind=0.0.0.0"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:8888" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 30s
|
||||||
|
depends_on:
|
||||||
|
volume:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
mount:
|
||||||
|
image: chrislusf/seaweedfs:e2e
|
||||||
|
command: "-v=4 mount -filer=filer:8888 -filer.path=/ -dirAutoCreate -dir=/mnt/seaweedfs"
|
||||||
|
cap_add:
|
||||||
|
- SYS_ADMIN
|
||||||
|
devices:
|
||||||
|
- /dev/fuse
|
||||||
|
security_opt:
|
||||||
|
- apparmor:unconfined
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 4096m
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "mountpoint", "-q", "--", "/mnt/seaweedfs" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 30s
|
||||||
|
depends_on:
|
||||||
|
filer:
|
||||||
|
condition: service_healthy
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
s3:
|
s3:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master0:
|
master0:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server1:
|
server1:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master0:
|
master0:
|
||||||
@@ -6,7 +6,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9333:9333
|
- 9333:9333
|
||||||
- 19333:19333
|
- 19333:19333
|
||||||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master0 -port=9333 -peers=master1:9334,master2:9335 -mdir=/data"
|
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -electionTimeout 1s -ip=master0 -port=9333 -peers=master1:9334,master2:9335 -mdir=/data"
|
||||||
volumes:
|
volumes:
|
||||||
- ./master/0:/data
|
- ./master/0:/data
|
||||||
environment:
|
environment:
|
||||||
@@ -18,7 +18,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9334:9334
|
- 9334:9334
|
||||||
- 19334:19334
|
- 19334:19334
|
||||||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master1 -port=9334 -peers=master0:9333,master2:9335 -mdir=/data"
|
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -electionTimeout 1s -ip=master1 -port=9334 -peers=master0:9333,master2:9335 -mdir=/data"
|
||||||
volumes:
|
volumes:
|
||||||
- ./master/1:/data
|
- ./master/1:/data
|
||||||
environment:
|
environment:
|
||||||
@@ -30,7 +30,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9335:9335
|
- 9335:9335
|
||||||
- 19335:19335
|
- 19335:19335
|
||||||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master2 -port=9335 -peers=master0:9333,master1:9334 -mdir=/data"
|
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -electionTimeout 1s -ip=master2 -port=9335 -peers=master0:9333,master1:9334 -mdir=/data"
|
||||||
volumes:
|
volumes:
|
||||||
- ./master/2:/data
|
- ./master/2:/data
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[notification.log]
|
[notification.log]
|
||||||
# this is only for debugging perpose and does not work with "weed filer.replicate"
|
# this is only for debugging purpose and does not work with "weed filer.replicate"
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
etcd:
|
etcd:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ydb:
|
ydb:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ module github.com/seaweedfs/seaweedfs
|
|||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.102.1 // indirect
|
cloud.google.com/go v0.105.0 // indirect
|
||||||
cloud.google.com/go/pubsub v1.24.0
|
cloud.google.com/go/pubsub v1.27.1
|
||||||
cloud.google.com/go/storage v1.25.0
|
cloud.google.com/go/storage v1.28.1
|
||||||
github.com/Azure/azure-pipeline-go v0.2.3
|
github.com/Azure/azure-pipeline-go v0.2.3
|
||||||
github.com/Azure/azure-storage-blob-go v0.15.0
|
github.com/Azure/azure-storage-blob-go v0.15.0
|
||||||
github.com/Shopify/sarama v1.35.0
|
github.com/Shopify/sarama v1.37.2
|
||||||
github.com/aws/aws-sdk-go v1.44.76
|
github.com/aws/aws-sdk-go v1.44.146
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bwmarrin/snowflake v0.3.0
|
github.com/bwmarrin/snowflake v0.3.0
|
||||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
github.com/coreos/go-semver v0.3.0 // indirect
|
github.com/coreos/go-semver v0.3.0 // indirect
|
||||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/disintegration/imaging v1.6.2
|
github.com/disintegration/imaging v1.6.2
|
||||||
@@ -27,12 +27,12 @@ require (
|
|||||||
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
|
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
|
||||||
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
|
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
|
||||||
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
|
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
|
||||||
github.com/fclairamb/ftpserverlib v0.19.0
|
github.com/fclairamb/ftpserverlib v0.20.0
|
||||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
github.com/go-errors/errors v1.1.1 // indirect
|
github.com/go-errors/errors v1.1.1 // indirect
|
||||||
github.com/go-redis/redis/v8 v8.11.5
|
github.com/go-redis/redis/v8 v8.11.5
|
||||||
github.com/go-redsync/redsync/v4 v4.5.1
|
github.com/go-redsync/redsync/v4 v4.6.0
|
||||||
github.com/go-sql-driver/mysql v1.6.0
|
github.com/go-sql-driver/mysql v1.7.0
|
||||||
github.com/go-zookeeper/zk v1.0.2 // indirect
|
github.com/go-zookeeper/zk v1.0.2 // indirect
|
||||||
github.com/gocql/gocql v0.0.0-20210707082121-9a3953d1826d
|
github.com/gocql/gocql v0.0.0-20210707082121-9a3953d1826d
|
||||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||||
@@ -40,33 +40,33 @@ require (
|
|||||||
github.com/golang/protobuf v1.5.2
|
github.com/golang/protobuf v1.5.2
|
||||||
github.com/golang/snappy v0.0.4 // indirect
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
github.com/google/btree v1.1.2
|
github.com/google/btree v1.1.2
|
||||||
github.com/google/go-cmp v0.5.8 // indirect
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
github.com/google/uuid v1.3.0
|
github.com/google/uuid v1.3.0
|
||||||
github.com/google/wire v0.5.0 // indirect
|
github.com/google/wire v0.5.0 // indirect
|
||||||
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
|
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
|
||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
|
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
|
||||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/jcmturner/gofork v1.0.0 // indirect
|
github.com/jcmturner/gofork v1.7.6 // indirect
|
||||||
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
|
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
|
||||||
github.com/jinzhu/copier v0.3.5
|
github.com/jinzhu/copier v0.3.5
|
||||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||||
github.com/json-iterator/go v1.1.12
|
github.com/json-iterator/go v1.1.12
|
||||||
github.com/karlseguin/ccache/v2 v2.0.8
|
github.com/karlseguin/ccache/v2 v2.0.8
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||||
github.com/klauspost/compress v1.15.8 // indirect
|
github.com/klauspost/compress v1.15.11 // indirect
|
||||||
github.com/klauspost/reedsolomon v1.10.0
|
github.com/klauspost/reedsolomon v1.11.3
|
||||||
github.com/kurin/blazer v0.5.3
|
github.com/kurin/blazer v0.5.3
|
||||||
github.com/lib/pq v1.10.6
|
github.com/lib/pq v1.10.7
|
||||||
github.com/linxGnu/grocksdb v1.7.5
|
github.com/linxGnu/grocksdb v1.7.10
|
||||||
github.com/magiconair/properties v1.8.6 // indirect
|
github.com/magiconair/properties v1.8.6 // indirect
|
||||||
github.com/mailru/easyjson v0.7.7 // indirect
|
github.com/mailru/easyjson v0.7.7 // indirect
|
||||||
github.com/mattn/go-ieproxy v0.0.3 // indirect
|
github.com/mattn/go-ieproxy v0.0.9 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
@@ -77,24 +77,23 @@ require (
|
|||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/posener/complete v1.2.3
|
github.com/posener/complete v1.2.3
|
||||||
github.com/pquerna/cachecontrol v0.1.0
|
github.com/pquerna/cachecontrol v0.1.0
|
||||||
github.com/prometheus/client_golang v1.13.0
|
github.com/prometheus/client_golang v1.14.0
|
||||||
github.com/prometheus/client_model v0.2.0 // indirect
|
github.com/prometheus/client_model v0.3.0 // indirect
|
||||||
github.com/prometheus/common v0.37.0 // indirect
|
github.com/prometheus/common v0.37.0 // indirect
|
||||||
github.com/prometheus/procfs v0.8.0
|
github.com/prometheus/procfs v0.8.0
|
||||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
|
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
|
||||||
github.com/seaweedfs/goexif v2.0.0+incompatible
|
github.com/seaweedfs/goexif v2.0.0+incompatible
|
||||||
github.com/seaweedfs/raft v1.1.0
|
github.com/seaweedfs/raft v1.1.0
|
||||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||||
github.com/spf13/afero v1.9.2 // indirect
|
github.com/spf13/afero v1.9.2 // indirect
|
||||||
github.com/spf13/cast v1.5.0 // indirect
|
github.com/spf13/cast v1.5.0 // indirect
|
||||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
github.com/spf13/viper v1.12.0
|
github.com/spf13/viper v1.14.0
|
||||||
github.com/streadway/amqp v1.0.0
|
github.com/stretchr/testify v1.8.1
|
||||||
github.com/stretchr/testify v1.8.0
|
|
||||||
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203
|
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
|
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
|
||||||
github.com/tidwall/gjson v1.14.2
|
github.com/tidwall/gjson v1.14.4
|
||||||
github.com/tidwall/match v1.1.1
|
github.com/tidwall/match v1.1.1
|
||||||
github.com/tidwall/pretty v1.2.0 // indirect
|
github.com/tidwall/pretty v1.2.0 // indirect
|
||||||
github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365
|
github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365
|
||||||
@@ -107,81 +106,85 @@ require (
|
|||||||
github.com/xdg-go/scram v1.1.1 // indirect
|
github.com/xdg-go/scram v1.1.1 // indirect
|
||||||
github.com/xdg-go/stringprep v1.0.3 // indirect
|
github.com/xdg-go/stringprep v1.0.3 // indirect
|
||||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||||
go.etcd.io/etcd/client/v3 v3.5.4
|
go.etcd.io/etcd/client/v3 v3.5.6
|
||||||
go.mongodb.org/mongo-driver v1.10.1
|
go.mongodb.org/mongo-driver v1.11.0
|
||||||
go.opencensus.io v0.23.0 // indirect
|
go.opencensus.io v0.24.0 // indirect
|
||||||
gocloud.dev v0.26.0
|
gocloud.dev v0.27.0
|
||||||
gocloud.dev/pubsub/natspubsub v0.26.0
|
gocloud.dev/pubsub/natspubsub v0.27.0
|
||||||
gocloud.dev/pubsub/rabbitpubsub v0.25.0
|
gocloud.dev/pubsub/rabbitpubsub v0.27.0
|
||||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
|
golang.org/x/crypto v0.1.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd
|
golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd
|
||||||
golang.org/x/image v0.0.0-20200119044424-58c23975cae1
|
golang.org/x/image v0.0.0-20200119044424-58c23975cae1
|
||||||
golang.org/x/net v0.0.0-20220708220712-1185a9018129
|
golang.org/x/net v0.2.0
|
||||||
golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect
|
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
|
||||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10
|
golang.org/x/sys v0.3.0
|
||||||
golang.org/x/text v0.3.7 // indirect
|
golang.org/x/text v0.4.0 // indirect
|
||||||
golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023
|
golang.org/x/tools v0.3.0
|
||||||
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||||
google.golang.org/api v0.92.0
|
google.golang.org/api v0.103.0
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
|
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c // indirect
|
||||||
google.golang.org/grpc v1.48.0
|
google.golang.org/grpc v1.51.0
|
||||||
google.golang.org/protobuf v1.28.1
|
google.golang.org/protobuf v1.28.1
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
modernc.org/b v1.0.0 // indirect
|
modernc.org/b v1.0.0 // indirect
|
||||||
modernc.org/cc/v3 v3.36.0 // indirect
|
modernc.org/cc/v3 v3.40.0 // indirect
|
||||||
modernc.org/ccgo/v3 v3.16.6 // indirect
|
modernc.org/ccgo/v3 v3.16.13 // indirect
|
||||||
modernc.org/libc v1.16.7 // indirect
|
modernc.org/libc v1.21.5 // indirect
|
||||||
modernc.org/mathutil v1.4.1 // indirect
|
modernc.org/mathutil v1.5.0 // indirect
|
||||||
modernc.org/memory v1.1.1 // indirect
|
modernc.org/memory v1.4.0 // indirect
|
||||||
modernc.org/opt v0.1.1 // indirect
|
modernc.org/opt v0.1.3 // indirect
|
||||||
modernc.org/sqlite v1.18.0
|
modernc.org/sqlite v1.20.0
|
||||||
modernc.org/strutil v1.1.2
|
modernc.org/strutil v1.1.3
|
||||||
modernc.org/token v1.0.0 // indirect
|
modernc.org/token v1.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Jille/raft-grpc-transport v1.2.0
|
github.com/Jille/raft-grpc-transport v1.3.0
|
||||||
github.com/arangodb/go-driver v1.3.3
|
github.com/arangodb/go-driver v1.4.0
|
||||||
|
github.com/armon/go-metrics v0.4.1
|
||||||
github.com/fluent/fluent-logger-golang v1.9.0
|
github.com/fluent/fluent-logger-golang v1.9.0
|
||||||
github.com/google/flatbuffers v2.0.6+incompatible
|
github.com/google/flatbuffers v22.11.23+incompatible
|
||||||
github.com/hanwen/go-fuse/v2 v2.1.1-0.20220627082937-d01fda7edf17
|
github.com/hanwen/go-fuse/v2 v2.1.1-0.20220627082937-d01fda7edf17
|
||||||
github.com/hashicorp/raft v1.3.10
|
github.com/hashicorp/raft v1.3.11
|
||||||
github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0
|
github.com/hashicorp/raft-boltdb/v2 v2.2.2
|
||||||
github.com/tikv/client-go/v2 v2.0.1
|
github.com/rabbitmq/amqp091-go v1.5.0
|
||||||
|
github.com/tikv/client-go/v2 v2.0.2
|
||||||
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2
|
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2
|
||||||
github.com/ydb-platform/ydb-go-sdk/v3 v3.33.0
|
github.com/ydb-platform/ydb-go-sdk/v3 v3.40.1
|
||||||
|
golang.org/x/sync v0.1.0
|
||||||
google.golang.org/grpc/security/advancedtls v0.0.0-20220622233350-5cdb09fa29c1
|
google.golang.org/grpc/security/advancedtls v0.0.0-20220622233350-5cdb09fa29c1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go/compute v1.7.0 // indirect
|
cloud.google.com/go/compute v1.12.1 // indirect
|
||||||
cloud.google.com/go/iam v0.3.0 // indirect
|
cloud.google.com/go/compute/metadata v0.2.1 // indirect
|
||||||
|
cloud.google.com/go/iam v0.7.0 // indirect
|
||||||
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
|
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
|
||||||
github.com/armon/go-metrics v0.3.10 // indirect
|
github.com/aws/aws-sdk-go-v2 v1.16.8 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2 v1.16.2 // indirect
|
github.com/aws/aws-sdk-go-v2/config v1.15.15 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.15.3 // indirect
|
github.com/aws/aws-sdk-go-v2/credentials v1.12.10 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.11.2 // indirect
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10 // indirect
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sns v1.17.10 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sns v1.17.4 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sso v1.11.13 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sso v1.11.3 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sts v1.16.10 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.16.3 // indirect
|
github.com/aws/smithy-go v1.12.0 // indirect
|
||||||
github.com/aws/smithy-go v1.11.2 // indirect
|
|
||||||
github.com/benbjohnson/clock v1.1.0 // indirect
|
github.com/benbjohnson/clock v1.1.0 // indirect
|
||||||
github.com/boltdb/bolt v1.3.1 // indirect
|
github.com/boltdb/bolt v1.3.1 // indirect
|
||||||
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
|
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
|
||||||
github.com/d4l3k/messagediff v1.2.1 // indirect
|
github.com/d4l3k/messagediff v1.2.1 // indirect
|
||||||
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
|
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
|
||||||
github.com/fatih/color v1.13.0 // indirect
|
github.com/fatih/color v1.13.0 // indirect
|
||||||
github.com/fclairamb/go-log v0.3.0 // indirect
|
github.com/fclairamb/go-log v0.4.1 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
|
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
|
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
|
||||||
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||||
github.com/hashicorp/go-hclog v1.2.0 // indirect
|
github.com/hashicorp/go-hclog v1.2.0 // indirect
|
||||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||||
github.com/hashicorp/go-msgpack v1.1.5 // indirect
|
github.com/hashicorp/go-msgpack v1.1.5 // indirect
|
||||||
@@ -191,44 +194,45 @@ require (
|
|||||||
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
||||||
github.com/jonboulle/clockwork v0.2.2 // indirect
|
github.com/jonboulle/clockwork v0.2.2 // indirect
|
||||||
github.com/josharian/intern v1.0.0 // indirect
|
github.com/josharian/intern v1.0.0 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.0.14 // indirect
|
github.com/klauspost/cpuid/v2 v2.1.1 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.7 // indirect
|
github.com/mattn/go-runewidth v0.0.7 // indirect
|
||||||
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
|
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
|
||||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
|
github.com/montanaflynn/stats v0.6.6 // indirect
|
||||||
github.com/nats-io/nats.go v1.13.1-0.20220121202836-972a071d373d // indirect
|
github.com/nats-io/nats.go v1.16.0 // indirect
|
||||||
github.com/nats-io/nkeys v0.3.0 // indirect
|
github.com/nats-io/nkeys v0.3.0 // indirect
|
||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
|
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||||
github.com/philhofer/fwd v1.1.1 // indirect
|
github.com/philhofer/fwd v1.1.1 // indirect
|
||||||
github.com/pierrec/lz4/v4 v4.1.15 // indirect
|
github.com/pierrec/lz4/v4 v4.1.17 // indirect
|
||||||
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect
|
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect
|
||||||
github.com/pingcap/failpoint v0.0.0-20210918120811-547c13e3eb00 // indirect
|
github.com/pingcap/failpoint v0.0.0-20210918120811-547c13e3eb00 // indirect
|
||||||
github.com/pingcap/kvproto v0.0.0-20220106070556-3fa8fa04f898 // indirect
|
github.com/pingcap/kvproto v0.0.0-20221026112947-f8d61344b172 // indirect
|
||||||
github.com/pingcap/log v0.0.0-20211215031037-e024ba4eb0ee // indirect
|
github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81 // indirect
|
||||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
|
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
github.com/subosito/gotenv v1.3.0 // indirect
|
github.com/stathat/consistent v1.0.0 // indirect
|
||||||
github.com/tikv/pd/client v0.0.0-20220216070739-26c668271201 // indirect
|
github.com/subosito/gotenv v1.4.1 // indirect
|
||||||
|
github.com/tikv/pd/client v0.0.0-20221031025758-80f0d8ca4d07 // indirect
|
||||||
github.com/tinylib/msgp v1.1.6 // indirect
|
github.com/tinylib/msgp v1.1.6 // indirect
|
||||||
github.com/twmb/murmur3 v1.1.3 // indirect
|
github.com/twmb/murmur3 v1.1.3 // indirect
|
||||||
github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e // indirect
|
github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e // indirect
|
||||||
github.com/ydb-platform/ydb-go-genproto v0.0.0-20220801095836-cf975531fd1f // indirect
|
github.com/ydb-platform/ydb-go-genproto v0.0.0-20220922065549-66df47a830ba // indirect
|
||||||
github.com/ydb-platform/ydb-go-yc v0.8.3 // indirect
|
github.com/ydb-platform/ydb-go-yc v0.8.3 // indirect
|
||||||
github.com/ydb-platform/ydb-go-yc-metadata v0.5.2 // indirect
|
github.com/ydb-platform/ydb-go-yc-metadata v0.5.2 // indirect
|
||||||
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
|
go.etcd.io/bbolt v1.3.6 // indirect
|
||||||
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
|
go.etcd.io/etcd/api/v3 v3.5.6 // indirect
|
||||||
|
go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
|
||||||
go.uber.org/atomic v1.9.0 // indirect
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
go.uber.org/multierr v1.8.0 // indirect
|
go.uber.org/multierr v1.8.0 // indirect
|
||||||
go.uber.org/zap v1.21.0 // indirect
|
go.uber.org/zap v1.22.0 // indirect
|
||||||
golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57 // indirect
|
golang.org/x/mod v0.7.0 // indirect
|
||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/ini.v1 v1.66.4 // indirect
|
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
lukechampine.com/uint128 v1.1.1 // indirect
|
lukechampine.com/uint128 v1.2.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
// replace github.com/seaweedfs/raft => /Users/chrislu/go/src/github.com/seaweedfs/raft
|
// replace github.com/seaweedfs/raft => /Users/chrislu/go/src/github.com/seaweedfs/raft
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
description: SeaweedFS
|
description: SeaweedFS
|
||||||
name: seaweedfs
|
name: seaweedfs
|
||||||
appVersion: "3.22"
|
appVersion: "3.36"
|
||||||
version: "3.22"
|
version: "3.36"
|
||||||
@@ -34,7 +34,7 @@ spec:
|
|||||||
restartPolicy: {{ default .Values.global.restartPolicy .Values.volume.restartPolicy }}
|
restartPolicy: {{ default .Values.global.restartPolicy .Values.volume.restartPolicy }}
|
||||||
{{- if .Values.volume.tolerations }}
|
{{- if .Values.volume.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{ tpl .Values.volume.tolerations . | nindent 8 | trim }}
|
{{ tpl .Values.volume.tolerations . | nindent 8 | trim }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.global.imagePullSecrets }}
|
{{- if .Values.global.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
<artifactId>seaweedfs-client</artifactId>
|
<artifactId>seaweedfs-client</artifactId>
|
||||||
<version>3.13</version>
|
<version>3.33</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.sonatype.oss</groupId>
|
<groupId>org.sonatype.oss</groupId>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<protobuf.version>3.16.1</protobuf.version>
|
<protobuf.version>3.16.3</protobuf.version>
|
||||||
<!-- follow https://github.com/grpc/grpc-java -->
|
<!-- follow https://github.com/grpc/grpc-java -->
|
||||||
<grpc.version>1.23.0</grpc.version>
|
<grpc.version>1.23.0</grpc.version>
|
||||||
<guava.version>30.0-jre</guava.version>
|
<guava.version>30.0-jre</guava.version>
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
<artifactId>seaweedfs-client</artifactId>
|
<artifactId>seaweedfs-client</artifactId>
|
||||||
<version>3.13</version>
|
<version>3.33</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.sonatype.oss</groupId>
|
<groupId>org.sonatype.oss</groupId>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
<artifactId>seaweedfs-client</artifactId>
|
<artifactId>seaweedfs-client</artifactId>
|
||||||
<version>3.13</version>
|
<version>3.33</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.sonatype.oss</groupId>
|
<groupId>org.sonatype.oss</groupId>
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class ReadChunks {
|
|||||||
prevX,
|
prevX,
|
||||||
point.x,
|
point.x,
|
||||||
chunk.getFileId(),
|
chunk.getFileId(),
|
||||||
chunk.getMtime(),
|
chunk.getModifiedTsNs(),
|
||||||
prevX - chunk.getOffset(),
|
prevX - chunk.getOffset(),
|
||||||
chunk.getOffset() == prevX && chunk.getSize() == prevX - startPoint.x,
|
chunk.getOffset() == prevX && chunk.getSize() == prevX - startPoint.x,
|
||||||
chunk.getCipherKey().toByteArray(),
|
chunk.getCipherKey().toByteArray(),
|
||||||
@@ -100,7 +100,7 @@ public class ReadChunks {
|
|||||||
|
|
||||||
public Point(long x, FilerProto.FileChunk chunk, boolean isStart) {
|
public Point(long x, FilerProto.FileChunk chunk, boolean isStart) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.ts = chunk.getMtime();
|
this.ts = chunk.getModifiedTsNs();
|
||||||
this.chunk = chunk;
|
this.chunk = chunk;
|
||||||
this.isStart = isStart;
|
this.isStart = isStart;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,8 @@ public class SeaweedInputStream extends InputStream {
|
|||||||
|
|
||||||
long bytesRead = 0;
|
long bytesRead = 0;
|
||||||
int len = buf.remaining();
|
int len = buf.remaining();
|
||||||
int start = (int) this.position;
|
if (this.position< Integer.MAX_VALUE && (this.position + len )<= entry.getContent().size()) {
|
||||||
if (start + len <= entry.getContent().size()) {
|
entry.getContent().substring((int)this.position, (int)(this.position + len)).copyTo(buf);
|
||||||
entry.getContent().substring(start, start + len).copyTo(buf);
|
|
||||||
} else {
|
} else {
|
||||||
bytesRead = SeaweedRead.read(this.filerClient, this.visibleIntervalList, this.position, buf, SeaweedRead.fileSize(entry));
|
bytesRead = SeaweedRead.read(this.filerClient, this.visibleIntervalList, this.position, buf, SeaweedRead.fileSize(entry));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
import java.security.MessageDigest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Base64;
|
||||||
|
|
||||||
public class SeaweedWrite {
|
public class SeaweedWrite {
|
||||||
|
|
||||||
@@ -96,7 +98,7 @@ public class SeaweedWrite {
|
|||||||
.setFileId(fileId)
|
.setFileId(fileId)
|
||||||
.setOffset(offset)
|
.setOffset(offset)
|
||||||
.setSize(bytesLength)
|
.setSize(bytesLength)
|
||||||
.setMtime(System.currentTimeMillis() / 10000L)
|
.setModifiedTsNs(System.nanoTime())
|
||||||
.setETag(etag)
|
.setETag(etag)
|
||||||
.setCipherKey(cipherKeyString);
|
.setCipherKey(cipherKeyString);
|
||||||
}
|
}
|
||||||
@@ -123,13 +125,20 @@ public class SeaweedWrite {
|
|||||||
final byte[] bytes,
|
final byte[] bytes,
|
||||||
final long bytesOffset, final long bytesLength,
|
final long bytesOffset, final long bytesLength,
|
||||||
byte[] cipherKey) throws IOException {
|
byte[] cipherKey) throws IOException {
|
||||||
|
MessageDigest md = null;
|
||||||
|
try {
|
||||||
|
md = MessageDigest.getInstance("MD5");
|
||||||
|
} catch (java.security.NoSuchAlgorithmException e) {
|
||||||
|
}
|
||||||
|
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
if (cipherKey == null || cipherKey.length == 0) {
|
if (cipherKey == null || cipherKey.length == 0) {
|
||||||
|
md.update(bytes, (int) bytesOffset, (int) bytesLength);
|
||||||
inputStream = new ByteArrayInputStream(bytes, (int) bytesOffset, (int) bytesLength);
|
inputStream = new ByteArrayInputStream(bytes, (int) bytesOffset, (int) bytesLength);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
byte[] encryptedBytes = SeaweedCipher.encrypt(bytes, (int) bytesOffset, (int) bytesLength, cipherKey);
|
byte[] encryptedBytes = SeaweedCipher.encrypt(bytes, (int) bytesOffset, (int) bytesLength, cipherKey);
|
||||||
|
md.update(encryptedBytes);
|
||||||
inputStream = new ByteArrayInputStream(encryptedBytes, 0, encryptedBytes.length);
|
inputStream = new ByteArrayInputStream(encryptedBytes, 0, encryptedBytes.length);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IOException("fail to encrypt data", e);
|
throw new IOException("fail to encrypt data", e);
|
||||||
@@ -140,6 +149,7 @@ public class SeaweedWrite {
|
|||||||
if (auth != null && auth.length() != 0) {
|
if (auth != null && auth.length() != 0) {
|
||||||
post.addHeader("Authorization", "BEARER " + auth);
|
post.addHeader("Authorization", "BEARER " + auth);
|
||||||
}
|
}
|
||||||
|
post.addHeader("Content-MD5", Base64.getEncoder().encodeToString(md.digest()));
|
||||||
|
|
||||||
post.setEntity(MultipartEntityBuilder.create()
|
post.setEntity(MultipartEntityBuilder.create()
|
||||||
.setMode(HttpMultipartMode.BROWSER_COMPATIBLE)
|
.setMode(HttpMultipartMode.BROWSER_COMPATIBLE)
|
||||||
@@ -149,6 +159,13 @@ public class SeaweedWrite {
|
|||||||
CloseableHttpResponse response = SeaweedUtil.getClosableHttpClient().execute(post);
|
CloseableHttpResponse response = SeaweedUtil.getClosableHttpClient().execute(post);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (response.getStatusLine().getStatusCode() / 100 != 2) {
|
||||||
|
if (response.getEntity().getContentType() != null && response.getEntity().getContentType().getValue().equals("application/json")) {
|
||||||
|
throw new IOException(EntityUtils.toString(response.getEntity(), "UTF-8"));
|
||||||
|
} else {
|
||||||
|
throw new IOException(response.getStatusLine().getReasonPhrase());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String etag = response.getLastHeader("ETag").getValue();
|
String etag = response.getLastHeader("ETag").getValue();
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ message FileChunk {
|
|||||||
string file_id = 1; // to be deprecated
|
string file_id = 1; // to be deprecated
|
||||||
int64 offset = 2;
|
int64 offset = 2;
|
||||||
uint64 size = 3;
|
uint64 size = 3;
|
||||||
int64 mtime = 4;
|
int64 modified_ts_ns = 4;
|
||||||
string e_tag = 5;
|
string e_tag = 5;
|
||||||
string source_file_id = 6; // to be deprecated
|
string source_file_id = 6; // to be deprecated
|
||||||
FileId fid = 7;
|
FileId fid = 7;
|
||||||
@@ -342,6 +342,7 @@ message SubscribeMetadataRequest {
|
|||||||
int32 client_id = 7;
|
int32 client_id = 7;
|
||||||
int64 until_ns = 8;
|
int64 until_ns = 8;
|
||||||
int32 client_epoch = 9;
|
int32 client_epoch = 9;
|
||||||
|
repeated string directories = 10; // exact directory to watch
|
||||||
}
|
}
|
||||||
message SubscribeMetadataResponse {
|
message SubscribeMetadataResponse {
|
||||||
string directory = 1;
|
string directory = 1;
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ public class SeaweedReadTest {
|
|||||||
.setFileId("aaa")
|
.setFileId("aaa")
|
||||||
.setOffset(0)
|
.setOffset(0)
|
||||||
.setSize(100)
|
.setSize(100)
|
||||||
.setMtime(1000)
|
.setModifiedTsNs(1000)
|
||||||
.build());
|
.build());
|
||||||
chunks.add(FilerProto.FileChunk.newBuilder()
|
chunks.add(FilerProto.FileChunk.newBuilder()
|
||||||
.setFileId("bbb")
|
.setFileId("bbb")
|
||||||
.setOffset(100)
|
.setOffset(100)
|
||||||
.setSize(133)
|
.setSize(133)
|
||||||
.setMtime(2000)
|
.setModifiedTsNs(2000)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
List<SeaweedRead.VisibleInterval> visibleIntervals = SeaweedRead.nonOverlappingVisibleIntervals(null, chunks);
|
List<SeaweedRead.VisibleInterval> visibleIntervals = SeaweedRead.nonOverlappingVisibleIntervals(null, chunks);
|
||||||
@@ -70,31 +70,31 @@ public class SeaweedReadTest {
|
|||||||
.setFileId("a")
|
.setFileId("a")
|
||||||
.setOffset(0)
|
.setOffset(0)
|
||||||
.setSize(100)
|
.setSize(100)
|
||||||
.setMtime(1)
|
.setModifiedTsNs(1)
|
||||||
.build());
|
.build());
|
||||||
chunks.add(FilerProto.FileChunk.newBuilder()
|
chunks.add(FilerProto.FileChunk.newBuilder()
|
||||||
.setFileId("b")
|
.setFileId("b")
|
||||||
.setOffset(50)
|
.setOffset(50)
|
||||||
.setSize(100)
|
.setSize(100)
|
||||||
.setMtime(2)
|
.setModifiedTsNs(2)
|
||||||
.build());
|
.build());
|
||||||
chunks.add(FilerProto.FileChunk.newBuilder()
|
chunks.add(FilerProto.FileChunk.newBuilder()
|
||||||
.setFileId("c")
|
.setFileId("c")
|
||||||
.setOffset(200)
|
.setOffset(200)
|
||||||
.setSize(50)
|
.setSize(50)
|
||||||
.setMtime(3)
|
.setModifiedTsNs(3)
|
||||||
.build());
|
.build());
|
||||||
chunks.add(FilerProto.FileChunk.newBuilder()
|
chunks.add(FilerProto.FileChunk.newBuilder()
|
||||||
.setFileId("d")
|
.setFileId("d")
|
||||||
.setOffset(250)
|
.setOffset(250)
|
||||||
.setSize(50)
|
.setSize(50)
|
||||||
.setMtime(4)
|
.setModifiedTsNs(4)
|
||||||
.build());
|
.build());
|
||||||
chunks.add(FilerProto.FileChunk.newBuilder()
|
chunks.add(FilerProto.FileChunk.newBuilder()
|
||||||
.setFileId("e")
|
.setFileId("e")
|
||||||
.setOffset(175)
|
.setOffset(175)
|
||||||
.setSize(100)
|
.setSize(100)
|
||||||
.setMtime(5)
|
.setModifiedTsNs(5)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
List<SeaweedRead.VisibleInterval> visibleIntervals = ReadChunks.readResolvedChunks(chunks);
|
List<SeaweedRead.VisibleInterval> visibleIntervals = ReadChunks.readResolvedChunks(chunks);
|
||||||
@@ -161,7 +161,7 @@ public class SeaweedReadTest {
|
|||||||
.setFileId("")
|
.setFileId("")
|
||||||
.setOffset(start)
|
.setOffset(start)
|
||||||
.setSize(size)
|
.setSize(size)
|
||||||
.setMtime(ts)
|
.setModifiedTsNs(ts)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,13 +11,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
<artifactId>seaweedfs-client</artifactId>
|
<artifactId>seaweedfs-client</artifactId>
|
||||||
<version>3.13</version>
|
<version>3.33</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
<artifactId>seaweedfs-hadoop2-client</artifactId>
|
<artifactId>seaweedfs-hadoop2-client</artifactId>
|
||||||
<version>3.13</version>
|
<version>3.33</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
<version>2.9.2</version>
|
<version>2.10.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-client</artifactId>
|
<artifactId>hadoop-client</artifactId>
|
||||||
<version>2.10.1</version>
|
<version>3.2.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -132,11 +132,11 @@
|
|||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>hadoop-mapreduce-client-app</artifactId>
|
<artifactId>hadoop-yarn-api</artifactId>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>hadoop-yarn-api</artifactId>
|
<artifactId>hadoop-yarn-client</artifactId>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-common</artifactId>
|
<artifactId>hadoop-common</artifactId>
|
||||||
<version>2.10.1</version>
|
<version>3.2.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -167,10 +167,6 @@
|
|||||||
<artifactId>commons-math3</artifactId>
|
<artifactId>commons-math3</artifactId>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
|
||||||
<artifactId>xmlenc</artifactId>
|
|
||||||
<groupId>xmlenc</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
@@ -184,20 +180,28 @@
|
|||||||
<groupId>commons-collections</groupId>
|
<groupId>commons-collections</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>jetty</artifactId>
|
<artifactId>javax.activation-api</artifactId>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>javax.activation</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jetty-server</artifactId>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>jetty-util</artifactId>
|
<artifactId>jetty-util</artifactId>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>jetty-sslengine</artifactId>
|
<artifactId>jetty-servlet</artifactId>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jetty-webapp</artifactId>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>jsp-api</artifactId>
|
<artifactId>jsp-api</artifactId>
|
||||||
@@ -207,6 +211,10 @@
|
|||||||
<artifactId>jersey-core</artifactId>
|
<artifactId>jersey-core</artifactId>
|
||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.sun.jersey</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jersey-servlet</artifactId>
|
||||||
|
<groupId>com.sun.jersey</groupId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>jersey-json</artifactId>
|
<artifactId>jersey-json</artifactId>
|
||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.sun.jersey</groupId>
|
||||||
@@ -216,49 +224,37 @@
|
|||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.sun.jersey</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>reload4j</artifactId>
|
||||||
<groupId>log4j</groupId>
|
<groupId>ch.qos.reload4j</groupId>
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>jets3t</artifactId>
|
|
||||||
<groupId>net.java.dev.jets3t</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>commons-lang</artifactId>
|
|
||||||
<groupId>commons-lang</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>commons-configuration</artifactId>
|
|
||||||
<groupId>commons-configuration</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>commons-digester</artifactId>
|
|
||||||
<groupId>commons-digester</groupId>
|
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-configuration2</artifactId>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>commons-text</artifactId>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>slf4j-reload4j</artifactId>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>jackson-mapper-asl</artifactId>
|
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>avro</artifactId>
|
<artifactId>avro</artifactId>
|
||||||
<groupId>org.apache.avro</groupId>
|
<groupId>org.apache.avro</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>re2j</artifactId>
|
||||||
|
<groupId>com.google.re2j</groupId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>hadoop-auth</artifactId>
|
<artifactId>hadoop-auth</artifactId>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
@@ -287,6 +283,14 @@
|
|||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>kerb-simplekdc</artifactId>
|
||||||
|
<groupId>org.apache.kerby</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>stax2-api</artifactId>
|
<artifactId>stax2-api</artifactId>
|
||||||
<groupId>org.codehaus.woodstox</groupId>
|
<groupId>org.codehaus.woodstox</groupId>
|
||||||
@@ -295,6 +299,10 @@
|
|||||||
<artifactId>woodstox-core</artifactId>
|
<artifactId>woodstox-core</artifactId>
|
||||||
<groupId>com.fasterxml.woodstox</groupId>
|
<groupId>com.fasterxml.woodstox</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>dnsjava</artifactId>
|
||||||
|
<groupId>dnsjava</groupId>
|
||||||
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>hadoop-annotations</artifactId>
|
<artifactId>hadoop-annotations</artifactId>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
@@ -309,7 +317,7 @@
|
|||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<seaweedfs.client.version>3.13</seaweedfs.client.version>
|
<seaweedfs.client.version>3.33</seaweedfs.client.version>
|
||||||
<hadoop.version>2.10.1</hadoop.version>
|
<hadoop.version>3.2.4</hadoop.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<seaweedfs.client.version>3.13</seaweedfs.client.version>
|
<seaweedfs.client.version>3.33</seaweedfs.client.version>
|
||||||
<hadoop.version>2.10.1</hadoop.version>
|
<hadoop.version>3.2.4</hadoop.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<groupId>com.github.chrislusf</groupId>
|
<groupId>com.github.chrislusf</groupId>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-client</artifactId>
|
<artifactId>hadoop-client</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-common</artifactId>
|
<artifactId>hadoop-common</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -224,8 +224,8 @@
|
|||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.sun.jersey</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>reload4j</artifactId>
|
||||||
<groupId>log4j</groupId>
|
<groupId>ch.qos.reload4j</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-reload4j</artifactId>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -317,7 +317,7 @@
|
|||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<seaweedfs.client.version>3.13</seaweedfs.client.version>
|
<seaweedfs.client.version>3.33</seaweedfs.client.version>
|
||||||
<hadoop.version>3.2.3</hadoop.version>
|
<hadoop.version>3.2.4</hadoop.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<seaweedfs.client.version>3.13</seaweedfs.client.version>
|
<seaweedfs.client.version>3.33</seaweedfs.client.version>
|
||||||
<hadoop.version>3.2.4</hadoop.version>
|
<hadoop.version>3.2.4</hadoop.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.0.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.90, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le))",
|
"expr": "histogram_quantile(0.90, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
"step": 60
|
"step": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.90, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le, type))",
|
"expr": "histogram_quantile(0.90, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le, type))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.95, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le))",
|
"expr": "histogram_quantile(0.95, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
"step": 60
|
"step": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.95, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le, type))",
|
"expr": "histogram_quantile(0.95, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le, type))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.99, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le))",
|
"expr": "histogram_quantile(0.99, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
"step": 60
|
"step": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "histogram_quantile(0.99, sum(rate(SeaweedFS_filer_request_seconds_bucket[1m])) by (le, type))",
|
"expr": "histogram_quantile(0.99, sum(rate(SeaweedFS_filerStore_request_seconds_bucket[1m])) by (le, type))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "rate(SeaweedFS_filer_request_total[1m]) * 5",
|
"expr": "rate(SeaweedFS_filerStore_request_total[1m]) * 5",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
"legendFormat": "{{type}}",
|
"legendFormat": "{{type}}",
|
||||||
@@ -1929,4 +1929,4 @@
|
|||||||
"timezone": "browser",
|
"timezone": "browser",
|
||||||
"title": "SeaweedFS ks8 heartbeat",
|
"title": "SeaweedFS ks8 heartbeat",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
|
"encoding/base64"
|
||||||
|
"fmt"
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/s3"
|
"github.com/aws/aws-sdk-go/service/s3"
|
||||||
"encoding/base64"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"fmt"
|
"net/http"
|
||||||
"crypto/md5"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Downloads an item from an S3 Bucket in the region configured in the shared config
|
// Downloads an item from an S3 Bucket in the region configured in the shared config
|
||||||
@@ -63,6 +64,7 @@ func main() {
|
|||||||
fmt.Printf("error put request: %v\n", err)
|
fmt.Printf("error put request: %v\n", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer util.CloseResponse(resp)
|
||||||
fmt.Printf("response: %+v\n", resp)
|
fmt.Printf("response: %+v\n", resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,4 +72,4 @@ var stringContent = `Generate a Pre-Signed URL for an Amazon S3 PUT Operation wi
|
|||||||
You can generate a pre-signed URL for a PUT operation that checks whether users upload the correct content. When the SDK pre-signs a request, it computes the checksum of the request body and generates an MD5 checksum that is included in the pre-signed URL. Users must upload the same content that produces the same MD5 checksum generated by the SDK; otherwise, the operation fails. This is not the Content-MD5, but the signature. To enforce Content-MD5, simply add the header to the request.
|
You can generate a pre-signed URL for a PUT operation that checks whether users upload the correct content. When the SDK pre-signs a request, it computes the checksum of the request body and generates an MD5 checksum that is included in the pre-signed URL. Users must upload the same content that produces the same MD5 checksum generated by the SDK; otherwise, the operation fails. This is not the Content-MD5, but the signature. To enforce Content-MD5, simply add the header to the request.
|
||||||
|
|
||||||
The following example adds a Body field to generate a pre-signed PUT operation that requires a specific payload to be uploaded by users.
|
The following example adds a Body field to generate a pre-signed PUT operation that requires a specific payload to be uploaded by users.
|
||||||
`
|
`
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
@@ -59,7 +59,7 @@ func walkMetaFile(dst *os.File) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintf(os.Stdout, "file %s %v\n", util.FullPath(fullEntry.Dir).Child(fullEntry.Entry.Name), fullEntry.Entry.Attributes.String())
|
fmt.Fprintf(os.Stdout, "file %s %v\n", util.FullPath(fullEntry.Dir).Child(fullEntry.Entry.Name), fullEntry.Entry.Attributes.String())
|
||||||
for i, chunk := range fullEntry.Entry.Chunks {
|
for i, chunk := range fullEntry.Entry.GetChunks() {
|
||||||
fmt.Fprintf(os.Stdout, " chunk: %d %v %d,%x%08x\n", i+1, chunk, chunk.Fid.VolumeId, chunk.Fid.FileKey, chunk.Fid.Cookie)
|
fmt.Fprintf(os.Stdout, " chunk: %d %v %d,%x%08x\n", i+1, chunk, chunk.Fid.VolumeId, chunk.Fid.FileKey, chunk.Fid.Cookie)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/operation"
|
"github.com/seaweedfs/seaweedfs/weed/operation"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -29,7 +30,7 @@ func main() {
|
|||||||
vid := uint32(*volumeId)
|
vid := uint32(*volumeId)
|
||||||
|
|
||||||
eachNeedleFunc := func(resp *volume_server_pb.ReadAllNeedlesResponse) error {
|
eachNeedleFunc := func(resp *volume_server_pb.ReadAllNeedlesResponse) error {
|
||||||
fmt.Printf("%d,%x%08x %d\n", resp.VolumeId, resp.NeedleId, resp.Cookie, len(resp.NeedleBlob))
|
fmt.Printf("%d,%x%08x %d %v %d %x\n", resp.VolumeId, resp.NeedleId, resp.Cookie, len(resp.NeedleBlob), resp.NeedleBlobCompressed, resp.LastModified, resp.Crc)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -15,44 +15,44 @@ clean:
|
|||||||
|
|
||||||
debug_shell:
|
debug_shell:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- shell
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- shell
|
||||||
|
|
||||||
debug_mount:
|
debug_mount:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 mount -dir=~/tmp/mm -cacheCapacityMB=0 -filer.path=/ -umask=000
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 mount -dir=~/tmp/mm -cacheCapacityMB=0 -filer.path=/ -umask=000
|
||||||
|
|
||||||
debug_server:
|
debug_server:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- server -dir=~/tmp/99 -filer -volume.port=8343 -s3 -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- server -dir=~/tmp/99 -filer -volume.port=8343 -s3 -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1
|
||||||
|
|
||||||
debug_volume:
|
debug_volume:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- volume -dir=~/tmp/100 -port 8564 -max=30 -preStopSeconds=2
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- volume -dir=~/tmp/100 -port 8564 -max=30 -preStopSeconds=2
|
||||||
|
|
||||||
debug_webdav:
|
debug_webdav:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 webdav
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 webdav
|
||||||
|
|
||||||
debug_s3:
|
debug_s3:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 s3
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 s3
|
||||||
|
|
||||||
debug_filer_copy:
|
debug_filer_copy:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 filer.backup -filer=localhost:8888 -filerProxy -timeAgo=10h
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 filer.backup -filer=localhost:8888 -filerProxy -timeAgo=10h
|
||||||
|
|
||||||
debug_filer_remote_sync_dir:
|
debug_filer_remote_sync_dir:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 filer.remote.sync -filer="localhost:8888" -dir=/buckets/b2 -timeAgo=1h
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 filer.remote.sync -filer="localhost:8888" -dir=/buckets/b2 -timeAgo=1h
|
||||||
|
|
||||||
debug_filer_remote_sync_buckets:
|
debug_filer_remote_sync_buckets:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 filer.remote.sync -filer="localhost:8888" -createBucketAt=cloud1 -timeAgo=1h
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 filer.remote.sync -filer="localhost:8888" -createBucketAt=cloud1 -timeAgo=1h
|
||||||
|
|
||||||
debug_master_follower:
|
debug_master_follower:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 master.follower
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 master.follower
|
||||||
|
|
||||||
debug_filer_sync:
|
debug_filer_sync:
|
||||||
go build -gcflags="all=-N -l"
|
go build -gcflags="all=-N -l"
|
||||||
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec weed -- -v=4 filer.sync -a 192.168.2.7:8888 -b 192.168.2.7:8889 -isActivePassive -b.debug
|
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./weed -- -v=4 filer.sync -a 192.168.2.7:8888 -b 192.168.2.7:8889 -isActivePassive -b.debug
|
||||||
@@ -2,6 +2,7 @@ package cluster
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||||
@@ -10,7 +11,7 @@ import (
|
|||||||
|
|
||||||
func ListExistingPeerUpdates(master pb.ServerAddress, grpcDialOption grpc.DialOption, filerGroup string, clientType string) (existingNodes []*master_pb.ClusterNodeUpdate) {
|
func ListExistingPeerUpdates(master pb.ServerAddress, grpcDialOption grpc.DialOption, filerGroup string, clientType string) (existingNodes []*master_pb.ClusterNodeUpdate) {
|
||||||
|
|
||||||
if grpcErr := pb.WithMasterClient(false, master, grpcDialOption, func(client master_pb.SeaweedClient) error {
|
if grpcErr := pb.WithMasterClient(false, master, grpcDialOption, false, func(client master_pb.SeaweedClient) error {
|
||||||
resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{
|
resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{
|
||||||
ClientType: clientType,
|
ClientType: clientType,
|
||||||
FilerGroup: filerGroup,
|
FilerGroup: filerGroup,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||||
@@ -113,7 +114,7 @@ func runBackup(cmd *Command, args []string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v, err := storage.NewVolume(util.ResolvePath(*s.dir), util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
|
v, err := storage.NewVolume(util.ResolvePath(*s.dir), util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
|
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
|
||||||
return true
|
return true
|
||||||
@@ -138,7 +139,7 @@ func runBackup(cmd *Command, args []string) bool {
|
|||||||
// remove the old data
|
// remove the old data
|
||||||
v.Destroy()
|
v.Destroy()
|
||||||
// recreate an empty volume
|
// recreate an empty volume
|
||||||
v, err = storage.NewVolume(util.ResolvePath(*s.dir), util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
|
v, err = storage.NewVolume(util.ResolvePath(*s.dir), util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
|
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ type BenchmarkOptions struct {
|
|||||||
grpcDialOption grpc.DialOption
|
grpcDialOption grpc.DialOption
|
||||||
masterClient *wdclient.MasterClient
|
masterClient *wdclient.MasterClient
|
||||||
fsync *bool
|
fsync *bool
|
||||||
useTcp *bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -68,7 +67,6 @@ func init() {
|
|||||||
b.cpuprofile = cmdBenchmark.Flag.String("cpuprofile", "", "cpu profile output file")
|
b.cpuprofile = cmdBenchmark.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||||
b.maxCpu = cmdBenchmark.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
|
b.maxCpu = cmdBenchmark.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
|
||||||
b.fsync = cmdBenchmark.Flag.Bool("fsync", false, "flush data to disk after write")
|
b.fsync = cmdBenchmark.Flag.Bool("fsync", false, "flush data to disk after write")
|
||||||
b.useTcp = cmdBenchmark.Flag.Bool("useTcp", false, "send data via tcp")
|
|
||||||
sharedBytes = make([]byte, 1024)
|
sharedBytes = make([]byte, 1024)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +223,6 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) {
|
|||||||
|
|
||||||
random := rand.New(rand.NewSource(time.Now().UnixNano()))
|
random := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||||
|
|
||||||
volumeTcpClient := wdclient.NewVolumeTcpClient()
|
|
||||||
|
|
||||||
for id := range idChan {
|
for id := range idChan {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
fileSize := int64(*b.fileSize + random.Intn(64))
|
fileSize := int64(*b.fileSize + random.Intn(64))
|
||||||
@@ -247,15 +243,7 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) {
|
|||||||
if !isSecure && assignResult.Auth != "" {
|
if !isSecure && assignResult.Auth != "" {
|
||||||
isSecure = true
|
isSecure = true
|
||||||
}
|
}
|
||||||
if *b.useTcp {
|
if _, err := fp.Upload(0, b.masterClient.GetMaster, false, assignResult.Auth, b.grpcDialOption); err == nil {
|
||||||
if uploadByTcp(volumeTcpClient, fp) {
|
|
||||||
fileIdLineChan <- fp.Fid
|
|
||||||
s.completed++
|
|
||||||
s.transferred += fileSize
|
|
||||||
} else {
|
|
||||||
s.failed++
|
|
||||||
}
|
|
||||||
} else if _, err := fp.Upload(0, b.masterClient.GetMaster, false, assignResult.Auth, b.grpcDialOption); err == nil {
|
|
||||||
if random.Intn(100) < *b.deletePercentage {
|
if random.Intn(100) < *b.deletePercentage {
|
||||||
s.total++
|
s.total++
|
||||||
delayedDeleteChan <- &delayedFile{time.Now().Add(time.Second), fp}
|
delayedDeleteChan <- &delayedFile{time.Now().Add(time.Second), fp}
|
||||||
@@ -341,17 +329,6 @@ func writeFileIds(fileName string, fileIdLineChan chan string, finishChan chan b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func uploadByTcp(volumeTcpClient *wdclient.VolumeTcpClient, fp *operation.FilePart) bool {
|
|
||||||
|
|
||||||
err := volumeTcpClient.PutFileChunk(fp.Server, fp.Fid, uint32(fp.FileSize), fp.Reader)
|
|
||||||
if err != nil {
|
|
||||||
glog.Errorf("upload chunk err: %v", err)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func readFileIds(fileName string, fileIdLineChan chan string) {
|
func readFileIds(fileName string, fileIdLineChan chan string) {
|
||||||
file, err := os.Open(fileName) // For read access.
|
file, err := os.Open(fileName) // For read access.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func runCompact(cmd *Command, args []string) bool {
|
|||||||
preallocate := *compactVolumePreallocate * (1 << 20)
|
preallocate := *compactVolumePreallocate * (1 << 20)
|
||||||
|
|
||||||
vid := needle.VolumeId(*compactVolumeId)
|
vid := needle.VolumeId(*compactVolumeId)
|
||||||
v, err := storage.NewVolume(util.ResolvePath(*compactVolumePath), util.ResolvePath(*compactVolumePath), *compactVolumeCollection, vid, storage.NeedleMapInMemory, nil, nil, preallocate, 0)
|
v, err := storage.NewVolume(util.ResolvePath(*compactVolumePath), util.ResolvePath(*compactVolumePath), *compactVolumeCollection, vid, storage.NeedleMapInMemory, nil, nil, preallocate, 0, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Load Volume [ERROR] %s\n", err)
|
glog.Fatalf("Load Volume [ERROR] %s\n", err)
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-19
@@ -162,7 +162,7 @@ func runFiler(cmd *Command, args []string) bool {
|
|||||||
|
|
||||||
util.LoadConfiguration("security", false)
|
util.LoadConfiguration("security", false)
|
||||||
|
|
||||||
go stats_collect.StartMetricsServer(*f.metricsHttpPort)
|
go stats_collect.StartMetricsServer(*f.bindIp, *f.metricsHttpPort)
|
||||||
|
|
||||||
filerAddress := util.JoinHostPort(*f.ip, *f.port)
|
filerAddress := util.JoinHostPort(*f.ip, *f.port)
|
||||||
startDelay := time.Duration(2)
|
startDelay := time.Duration(2)
|
||||||
@@ -173,29 +173,29 @@ func runFiler(cmd *Command, args []string) bool {
|
|||||||
if *f.dataCenter != "" && *filerS3Options.dataCenter == "" {
|
if *f.dataCenter != "" && *filerS3Options.dataCenter == "" {
|
||||||
filerS3Options.dataCenter = f.dataCenter
|
filerS3Options.dataCenter = f.dataCenter
|
||||||
}
|
}
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerS3Options.startS3Server()
|
filerS3Options.startS3Server()
|
||||||
}()
|
}(startDelay)
|
||||||
startDelay++
|
startDelay++
|
||||||
}
|
}
|
||||||
|
|
||||||
if *filerStartWebDav {
|
if *filerStartWebDav {
|
||||||
filerWebDavOptions.filer = &filerAddress
|
filerWebDavOptions.filer = &filerAddress
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerWebDavOptions.startWebDav()
|
filerWebDavOptions.startWebDav()
|
||||||
}()
|
}(startDelay)
|
||||||
startDelay++
|
startDelay++
|
||||||
}
|
}
|
||||||
|
|
||||||
if *filerStartIam {
|
if *filerStartIam {
|
||||||
filerIamOptions.filer = &filerAddress
|
filerIamOptions.filer = &filerAddress
|
||||||
filerIamOptions.masters = f.mastersString
|
filerIamOptions.masters = f.mastersString
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerIamOptions.startIamServer()
|
filerIamOptions.startIamServer()
|
||||||
}()
|
}(startDelay)
|
||||||
}
|
}
|
||||||
|
|
||||||
f.masters = pb.ServerAddresses(*f.mastersString).ToAddressMap()
|
f.masters = pb.ServerAddresses(*f.mastersString).ToAddressMap()
|
||||||
@@ -250,7 +250,7 @@ func (fo *FilerOptions) startFiler() {
|
|||||||
if *fo.publicPort != 0 {
|
if *fo.publicPort != 0 {
|
||||||
publicListeningAddress := util.JoinHostPort(*fo.bindIp, *fo.publicPort)
|
publicListeningAddress := util.JoinHostPort(*fo.bindIp, *fo.publicPort)
|
||||||
glog.V(0).Infoln("Start Seaweed filer server", util.Version(), "public at", publicListeningAddress)
|
glog.V(0).Infoln("Start Seaweed filer server", util.Version(), "public at", publicListeningAddress)
|
||||||
publicListener, localPublicListner, e := util.NewIpAndLocalListeners(*fo.bindIp, *fo.publicPort, 0)
|
publicListener, localPublicListener, e := util.NewIpAndLocalListeners(*fo.bindIp, *fo.publicPort, 0)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
glog.Fatalf("Filer server public listener error on port %d:%v", *fo.publicPort, e)
|
glog.Fatalf("Filer server public listener error on port %d:%v", *fo.publicPort, e)
|
||||||
}
|
}
|
||||||
@@ -259,9 +259,9 @@ func (fo *FilerOptions) startFiler() {
|
|||||||
glog.Fatalf("Volume server fail to serve public: %v", e)
|
glog.Fatalf("Volume server fail to serve public: %v", e)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
if localPublicListner != nil {
|
if localPublicListener != nil {
|
||||||
go func() {
|
go func() {
|
||||||
if e := http.Serve(localPublicListner, publicVolumeMux); e != nil {
|
if e := http.Serve(localPublicListener, publicVolumeMux); e != nil {
|
||||||
glog.Errorf("Volume server fail to serve public: %v", e)
|
glog.Errorf("Volume server fail to serve public: %v", e)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@@ -293,17 +293,18 @@ func (fo *FilerOptions) startFiler() {
|
|||||||
|
|
||||||
httpS := &http.Server{Handler: defaultMux}
|
httpS := &http.Server{Handler: defaultMux}
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
if *fo.localSocket == "" {
|
localSocket := *fo.localSocket
|
||||||
*fo.localSocket = fmt.Sprintf("/tmp/seaweefs-filer-%d.sock", *fo.port)
|
if localSocket == "" {
|
||||||
|
localSocket = fmt.Sprintf("/tmp/seaweedfs-filer-%d.sock", *fo.port)
|
||||||
}
|
}
|
||||||
if err := os.Remove(*fo.localSocket); err != nil && !os.IsNotExist(err) {
|
if err := os.Remove(localSocket); err != nil && !os.IsNotExist(err) {
|
||||||
glog.Fatalf("Failed to remove %s, error: %s", *fo.localSocket, err.Error())
|
glog.Fatalf("Failed to remove %s, error: %s", localSocket, err.Error())
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
// start on local unix socket
|
// start on local unix socket
|
||||||
filerSocketListener, err := net.Listen("unix", *fo.localSocket)
|
filerSocketListener, err := net.Listen("unix", localSocket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Failed to listen on %s: %v", *fo.localSocket, err)
|
glog.Fatalf("Failed to listen on %s: %v", localSocket, err)
|
||||||
}
|
}
|
||||||
httpS.Serve(filerSocketListener)
|
httpS.Serve(filerSocketListener)
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ type FilerBackupOptions struct {
|
|||||||
debug *bool
|
debug *bool
|
||||||
proxyByFiler *bool
|
proxyByFiler *bool
|
||||||
timeAgo *time.Duration
|
timeAgo *time.Duration
|
||||||
|
retentionDays *int
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -33,6 +34,8 @@ func init() {
|
|||||||
filerBackupOptions.proxyByFiler = cmdFilerBackup.Flag.Bool("filerProxy", false, "read and write file chunks by filer instead of volume servers")
|
filerBackupOptions.proxyByFiler = cmdFilerBackup.Flag.Bool("filerProxy", false, "read and write file chunks by filer instead of volume servers")
|
||||||
filerBackupOptions.debug = cmdFilerBackup.Flag.Bool("debug", false, "debug mode to print out received files")
|
filerBackupOptions.debug = cmdFilerBackup.Flag.Bool("debug", false, "debug mode to print out received files")
|
||||||
filerBackupOptions.timeAgo = cmdFilerBackup.Flag.Duration("timeAgo", 0, "start time before now. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"")
|
filerBackupOptions.timeAgo = cmdFilerBackup.Flag.Duration("timeAgo", 0, "start time before now. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"")
|
||||||
|
filerBackupOptions.retentionDays = cmdFilerBackup.Flag.Int("retentionDays", 0, "incremental backup retention days")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmdFilerBackup = &Command{
|
var cmdFilerBackup = &Command{
|
||||||
@@ -123,6 +126,18 @@ func doFilerBackup(grpcDialOption grpc.DialOption, backupOption *FilerBackupOpti
|
|||||||
return setOffset(grpcDialOption, sourceFiler, BackupKeyPrefix, int32(sinkId), lastTsNs)
|
return setOffset(grpcDialOption, sourceFiler, BackupKeyPrefix, int32(sinkId), lastTsNs)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if dataSink.IsIncremental() && *filerBackupOptions.retentionDays > 0 {
|
||||||
|
go func() {
|
||||||
|
for {
|
||||||
|
now := time.Now()
|
||||||
|
time.Sleep(time.Hour * 24)
|
||||||
|
key := util.Join(targetPath, now.Add(-1*time.Hour*24*time.Duration(*filerBackupOptions.retentionDays)).Format("2006-01-02"))
|
||||||
|
_ = dataSink.DeleteEntry(util.Join(targetPath, key), true, true, nil)
|
||||||
|
glog.V(0).Infof("incremental backup delete directory:%s", key)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
return pb.FollowMetadata(sourceFiler, grpcDialOption, "backup_"+dataSink.GetName(), clientId, clientEpoch, sourcePath, nil, startFrom.UnixNano(), 0, 0, processEventFnWithOffset, pb.TrivialOnError)
|
return pb.FollowMetadata(sourceFiler, grpcDialOption, "backup_"+dataSink.GetName(), clientId, clientEpoch, sourcePath, nil, startFrom.UnixNano(), 0, 0, processEventFnWithOffset, pb.TrivialOnError)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ func runFilerCat(cmd *Command, args []string) bool {
|
|||||||
|
|
||||||
filerCat.filerClient = client
|
filerCat.filerClient = client
|
||||||
|
|
||||||
return filer.StreamContent(&filerCat, writer, respLookupEntry.Entry.Chunks, 0, int64(filer.FileSize(respLookupEntry.Entry)))
|
return filer.StreamContent(&filerCat, writer, respLookupEntry.Entry.GetChunks(), 0, int64(filer.FileSize(respLookupEntry.Entry)))
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+114
-179
@@ -31,21 +31,21 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type CopyOptions struct {
|
type CopyOptions struct {
|
||||||
include *string
|
include *string
|
||||||
replication *string
|
replication *string
|
||||||
collection *string
|
collection *string
|
||||||
ttl *string
|
ttl *string
|
||||||
diskType *string
|
diskType *string
|
||||||
maxMB *int
|
maxMB *int
|
||||||
masterClient *wdclient.MasterClient
|
masterClient *wdclient.MasterClient
|
||||||
concurrenctFiles *int
|
concurrentFiles *int
|
||||||
concurrenctChunks *int
|
concurrentChunks *int
|
||||||
grpcDialOption grpc.DialOption
|
grpcDialOption grpc.DialOption
|
||||||
masters []string
|
masters []string
|
||||||
cipher bool
|
cipher bool
|
||||||
ttlSec int32
|
ttlSec int32
|
||||||
checkSize *bool
|
checkSize *bool
|
||||||
verbose *bool
|
verbose *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -57,8 +57,8 @@ func init() {
|
|||||||
copy.ttl = cmdFilerCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y")
|
copy.ttl = cmdFilerCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y")
|
||||||
copy.diskType = cmdFilerCopy.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag")
|
copy.diskType = cmdFilerCopy.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag")
|
||||||
copy.maxMB = cmdFilerCopy.Flag.Int("maxMB", 4, "split files larger than the limit")
|
copy.maxMB = cmdFilerCopy.Flag.Int("maxMB", 4, "split files larger than the limit")
|
||||||
copy.concurrenctFiles = cmdFilerCopy.Flag.Int("c", 8, "concurrent file copy goroutines")
|
copy.concurrentFiles = cmdFilerCopy.Flag.Int("c", 8, "concurrent file copy goroutines")
|
||||||
copy.concurrenctChunks = cmdFilerCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file")
|
copy.concurrentChunks = cmdFilerCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file")
|
||||||
copy.checkSize = cmdFilerCopy.Flag.Bool("check.size", false, "copy when the target file size is different from the source file")
|
copy.checkSize = cmdFilerCopy.Flag.Bool("check.size", false, "copy when the target file size is different from the source file")
|
||||||
copy.verbose = cmdFilerCopy.Flag.Bool("verbose", false, "print out details during copying")
|
copy.verbose = cmdFilerCopy.Flag.Bool("verbose", false, "print out details during copying")
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ func runCopy(cmd *Command, args []string) bool {
|
|||||||
grace.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
grace.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
||||||
}
|
}
|
||||||
|
|
||||||
fileCopyTaskChan := make(chan FileCopyTask, *copy.concurrenctFiles)
|
fileCopyTaskChan := make(chan FileCopyTask, *copy.concurrentFiles)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer close(fileCopyTaskChan)
|
defer close(fileCopyTaskChan)
|
||||||
@@ -152,7 +152,7 @@ func runCopy(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
for i := 0; i < *copy.concurrenctFiles; i++ {
|
for i := 0; i < *copy.concurrentFiles; i++ {
|
||||||
waitGroup.Add(1)
|
waitGroup.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer waitGroup.Done()
|
defer waitGroup.Done()
|
||||||
@@ -331,8 +331,6 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err
|
|||||||
var mimeType string
|
var mimeType string
|
||||||
|
|
||||||
var chunks []*filer_pb.FileChunk
|
var chunks []*filer_pb.FileChunk
|
||||||
var assignResult *filer_pb.AssignVolumeResponse
|
|
||||||
var assignError error
|
|
||||||
|
|
||||||
if task.fileMode&os.ModeDir == 0 && task.fileSize > 0 {
|
if task.fileMode&os.ModeDir == 0 && task.fileSize > 0 {
|
||||||
|
|
||||||
@@ -342,66 +340,32 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = util.Retry("upload", func() error {
|
finalFileId, uploadResult, flushErr, _ := operation.UploadWithRetry(
|
||||||
// assign a volume
|
worker,
|
||||||
assignErr := pb.WithGrpcFilerClient(false, worker.filerAddress, worker.options.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
&filer_pb.AssignVolumeRequest{
|
||||||
|
Count: 1,
|
||||||
request := &filer_pb.AssignVolumeRequest{
|
Replication: *worker.options.replication,
|
||||||
Count: 1,
|
Collection: *worker.options.collection,
|
||||||
Replication: *worker.options.replication,
|
TtlSec: worker.options.ttlSec,
|
||||||
Collection: *worker.options.collection,
|
DiskType: *worker.options.diskType,
|
||||||
TtlSec: worker.options.ttlSec,
|
Path: task.destinationUrlPath,
|
||||||
DiskType: *worker.options.diskType,
|
},
|
||||||
Path: task.destinationUrlPath,
|
&operation.UploadOption{
|
||||||
}
|
|
||||||
|
|
||||||
assignResult, assignError = client.AssignVolume(context.Background(), request)
|
|
||||||
if assignError != nil {
|
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignError)
|
|
||||||
}
|
|
||||||
if assignResult.Error != "" {
|
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignResult.Error)
|
|
||||||
}
|
|
||||||
if assignResult.Location.Url == "" {
|
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignResult)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
if assignErr != nil {
|
|
||||||
return assignErr
|
|
||||||
}
|
|
||||||
|
|
||||||
// upload data
|
|
||||||
targetUrl := "http://" + assignResult.Location.Url + "/" + assignResult.FileId
|
|
||||||
uploadOption := &operation.UploadOption{
|
|
||||||
UploadUrl: targetUrl,
|
|
||||||
Filename: fileName,
|
Filename: fileName,
|
||||||
Cipher: worker.options.cipher,
|
Cipher: worker.options.cipher,
|
||||||
IsInputCompressed: false,
|
IsInputCompressed: false,
|
||||||
MimeType: mimeType,
|
MimeType: mimeType,
|
||||||
PairMap: nil,
|
PairMap: nil,
|
||||||
Jwt: security.EncodedJwt(assignResult.Auth),
|
},
|
||||||
}
|
func(host, fileId string) string {
|
||||||
uploadResult, err := operation.UploadData(data, uploadOption)
|
return fmt.Sprintf("http://%s/%s", host, fileId)
|
||||||
if err != nil {
|
},
|
||||||
return fmt.Errorf("upload data %v to %s: %v\n", fileName, targetUrl, err)
|
util.NewBytesReader(data),
|
||||||
}
|
)
|
||||||
if uploadResult.Error != "" {
|
if flushErr != nil {
|
||||||
return fmt.Errorf("upload %v to %s result: %v\n", fileName, targetUrl, uploadResult.Error)
|
return flushErr
|
||||||
}
|
|
||||||
if *worker.options.verbose {
|
|
||||||
fmt.Printf("uploaded %s to %s\n", fileName, targetUrl)
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Printf("copied %s => http://%s%s%s\n", f.Name(), worker.filerAddress.ToHttpAddress(), task.destinationUrlPath, fileName)
|
|
||||||
chunks = append(chunks, uploadResult.ToPbFileChunk(assignResult.FileId, 0))
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("upload %v: %v\n", fileName, err)
|
|
||||||
}
|
}
|
||||||
|
chunks = append(chunks, uploadResult.ToPbFileChunk(finalFileId, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := pb.WithGrpcFilerClient(false, worker.filerAddress, worker.options.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
if err := pb.WithGrpcFilerClient(false, worker.filerAddress, worker.options.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
@@ -441,10 +405,9 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
|
|||||||
|
|
||||||
chunksChan := make(chan *filer_pb.FileChunk, chunkCount)
|
chunksChan := make(chan *filer_pb.FileChunk, chunkCount)
|
||||||
|
|
||||||
concurrentChunks := make(chan struct{}, *worker.options.concurrenctChunks)
|
concurrentChunks := make(chan struct{}, *worker.options.concurrentChunks)
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
var uploadError error
|
var uploadError error
|
||||||
var collection, replication string
|
|
||||||
|
|
||||||
fmt.Printf("uploading %s in %d chunks ...\n", fileName, chunkCount)
|
fmt.Printf("uploading %s in %d chunks ...\n", fileName, chunkCount)
|
||||||
for i := int64(0); i < int64(chunkCount) && uploadError == nil; i++ {
|
for i := int64(0); i < int64(chunkCount) && uploadError == nil; i++ {
|
||||||
@@ -455,64 +418,41 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
|
|||||||
wg.Done()
|
wg.Done()
|
||||||
<-concurrentChunks
|
<-concurrentChunks
|
||||||
}()
|
}()
|
||||||
// assign a volume
|
|
||||||
var assignResult *filer_pb.AssignVolumeResponse
|
|
||||||
var assignError error
|
|
||||||
err := util.Retry("assignVolume", func() error {
|
|
||||||
return pb.WithGrpcFilerClient(false, worker.filerAddress, worker.options.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
|
||||||
request := &filer_pb.AssignVolumeRequest{
|
|
||||||
Count: 1,
|
|
||||||
Replication: *worker.options.replication,
|
|
||||||
Collection: *worker.options.collection,
|
|
||||||
TtlSec: worker.options.ttlSec,
|
|
||||||
DiskType: *worker.options.diskType,
|
|
||||||
Path: task.destinationUrlPath + fileName,
|
|
||||||
}
|
|
||||||
|
|
||||||
assignResult, assignError = client.AssignVolume(context.Background(), request)
|
fileId, uploadResult, err, _ := operation.UploadWithRetry(
|
||||||
if assignError != nil {
|
worker,
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignError)
|
&filer_pb.AssignVolumeRequest{
|
||||||
}
|
Count: 1,
|
||||||
if assignResult.Error != "" {
|
Replication: *worker.options.replication,
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignResult.Error)
|
Collection: *worker.options.collection,
|
||||||
}
|
TtlSec: worker.options.ttlSec,
|
||||||
return nil
|
DiskType: *worker.options.diskType,
|
||||||
})
|
Path: task.destinationUrlPath + fileName,
|
||||||
})
|
},
|
||||||
|
&operation.UploadOption{
|
||||||
|
Filename: fileName + "-" + strconv.FormatInt(i+1, 10),
|
||||||
|
Cipher: worker.options.cipher,
|
||||||
|
IsInputCompressed: false,
|
||||||
|
MimeType: "",
|
||||||
|
PairMap: nil,
|
||||||
|
},
|
||||||
|
func(host, fileId string) string {
|
||||||
|
return fmt.Sprintf("http://%s/%s", host, fileId)
|
||||||
|
},
|
||||||
|
io.NewSectionReader(f, i*chunkSize, chunkSize),
|
||||||
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
uploadError = fmt.Errorf("Failed to assign from %v: %v\n", worker.options.masters, err)
|
uploadError = fmt.Errorf("upload data %v: %v\n", fileName, err)
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
targetUrl := "http://" + assignResult.Location.Url + "/" + assignResult.FileId
|
|
||||||
if collection == "" {
|
|
||||||
collection = assignResult.Collection
|
|
||||||
}
|
|
||||||
if replication == "" {
|
|
||||||
replication = assignResult.Replication
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadOption := &operation.UploadOption{
|
|
||||||
UploadUrl: targetUrl,
|
|
||||||
Filename: fileName + "-" + strconv.FormatInt(i+1, 10),
|
|
||||||
Cipher: worker.options.cipher,
|
|
||||||
IsInputCompressed: false,
|
|
||||||
MimeType: "",
|
|
||||||
PairMap: nil,
|
|
||||||
Jwt: security.EncodedJwt(assignResult.Auth),
|
|
||||||
}
|
|
||||||
uploadResult, err, _ := operation.Upload(io.NewSectionReader(f, i*chunkSize, chunkSize), uploadOption)
|
|
||||||
if err != nil {
|
|
||||||
uploadError = fmt.Errorf("upload data %v to %s: %v\n", fileName, targetUrl, err)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if uploadResult.Error != "" {
|
if uploadResult.Error != "" {
|
||||||
uploadError = fmt.Errorf("upload %v to %s result: %v\n", fileName, targetUrl, uploadResult.Error)
|
uploadError = fmt.Errorf("upload %v result: %v\n", fileName, uploadResult.Error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chunksChan <- uploadResult.ToPbFileChunk(assignResult.FileId, i*chunkSize)
|
chunksChan <- uploadResult.ToPbFileChunk(fileId, i*chunkSize)
|
||||||
|
|
||||||
fmt.Printf("uploaded %s-%d to %s [%d,%d)\n", fileName, i+1, targetUrl, i*chunkSize, i*chunkSize+int64(uploadResult.Size))
|
fmt.Printf("uploaded %s-%d [%d,%d)\n", fileName, i+1, i*chunkSize, i*chunkSize+int64(uploadResult.Size))
|
||||||
}(i)
|
}(i)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
@@ -590,62 +530,57 @@ func detectMimeType(f *os.File) string {
|
|||||||
return mimeType
|
return mimeType
|
||||||
}
|
}
|
||||||
|
|
||||||
func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, offset int64) (chunk *filer_pb.FileChunk, collection, replication string, err error) {
|
func (worker *FileCopyWorker) saveDataAsChunk(reader io.Reader, name string, offset int64) (chunk *filer_pb.FileChunk, err error) {
|
||||||
|
|
||||||
var fileId, host string
|
finalFileId, uploadResult, flushErr, _ := operation.UploadWithRetry(
|
||||||
var auth security.EncodedJwt
|
worker,
|
||||||
|
&filer_pb.AssignVolumeRequest{
|
||||||
|
Count: 1,
|
||||||
|
Replication: *worker.options.replication,
|
||||||
|
Collection: *worker.options.collection,
|
||||||
|
TtlSec: worker.options.ttlSec,
|
||||||
|
DiskType: *worker.options.diskType,
|
||||||
|
Path: name,
|
||||||
|
},
|
||||||
|
&operation.UploadOption{
|
||||||
|
Filename: name,
|
||||||
|
Cipher: worker.options.cipher,
|
||||||
|
IsInputCompressed: false,
|
||||||
|
MimeType: "",
|
||||||
|
PairMap: nil,
|
||||||
|
},
|
||||||
|
func(host, fileId string) string {
|
||||||
|
return fmt.Sprintf("http://%s/%s", host, fileId)
|
||||||
|
},
|
||||||
|
reader,
|
||||||
|
)
|
||||||
|
|
||||||
if flushErr := pb.WithGrpcFilerClient(false, worker.filerAddress, worker.options.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
assignErr := util.Retry("assignVolume", func() error {
|
|
||||||
request := &filer_pb.AssignVolumeRequest{
|
|
||||||
Count: 1,
|
|
||||||
Replication: *worker.options.replication,
|
|
||||||
Collection: *worker.options.collection,
|
|
||||||
TtlSec: worker.options.ttlSec,
|
|
||||||
DiskType: *worker.options.diskType,
|
|
||||||
Path: name,
|
|
||||||
}
|
|
||||||
|
|
||||||
resp, err := client.AssignVolume(ctx, request)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, err)
|
|
||||||
}
|
|
||||||
if resp.Error != "" {
|
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, resp.Error)
|
|
||||||
}
|
|
||||||
|
|
||||||
fileId, host, auth = resp.FileId, resp.Location.Url, security.EncodedJwt(resp.Auth)
|
|
||||||
collection, replication = resp.Collection, resp.Replication
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
if assignErr != nil {
|
|
||||||
return assignErr
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}); flushErr != nil {
|
|
||||||
return nil, collection, replication, fmt.Errorf("filerGrpcAddress assign volume: %v", flushErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadOption := &operation.UploadOption{
|
|
||||||
UploadUrl: fmt.Sprintf("http://%s/%s", host, fileId),
|
|
||||||
Filename: name,
|
|
||||||
Cipher: worker.options.cipher,
|
|
||||||
IsInputCompressed: false,
|
|
||||||
MimeType: "",
|
|
||||||
PairMap: nil,
|
|
||||||
Jwt: auth,
|
|
||||||
}
|
|
||||||
uploadResult, flushErr, _ := operation.Upload(reader, uploadOption)
|
|
||||||
if flushErr != nil {
|
if flushErr != nil {
|
||||||
return nil, collection, replication, fmt.Errorf("upload data: %v", flushErr)
|
return nil, fmt.Errorf("upload data: %v", flushErr)
|
||||||
}
|
}
|
||||||
if uploadResult.Error != "" {
|
if uploadResult.Error != "" {
|
||||||
return nil, collection, replication, fmt.Errorf("upload result: %v", uploadResult.Error)
|
return nil, fmt.Errorf("upload result: %v", uploadResult.Error)
|
||||||
}
|
}
|
||||||
return uploadResult.ToPbFileChunk(fileId, offset), collection, replication, nil
|
return uploadResult.ToPbFileChunk(finalFileId, offset), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = filer_pb.FilerClient(&FileCopyWorker{})
|
||||||
|
|
||||||
|
func (worker *FileCopyWorker) WithFilerClient(streamingMode bool, fn func(filer_pb.SeaweedFilerClient) error) (err error) {
|
||||||
|
|
||||||
|
filerGrpcAddress := worker.filerAddress.ToGrpcAddress()
|
||||||
|
err = pb.WithGrpcClient(streamingMode, func(grpcConnection *grpc.ClientConn) error {
|
||||||
|
client := filer_pb.NewSeaweedFilerClient(grpcConnection)
|
||||||
|
return fn(client)
|
||||||
|
}, filerGrpcAddress, false, worker.options.grpcDialOption)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (worker *FileCopyWorker) AdjustedUrl(location *filer_pb.Location) string {
|
||||||
|
return location.Url
|
||||||
|
}
|
||||||
|
|
||||||
|
func (worker *FileCopyWorker) GetDataCenter() string {
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -88,11 +88,8 @@ func runFilerMetaTail(cmd *Command, args []string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonpbMarshaler := jsonpb.Marshaler{
|
|
||||||
EmitDefaults: false,
|
|
||||||
}
|
|
||||||
eachEntryFunc := func(resp *filer_pb.SubscribeMetadataResponse) error {
|
eachEntryFunc := func(resp *filer_pb.SubscribeMetadataResponse) error {
|
||||||
jsonpbMarshaler.Marshal(os.Stdout, resp)
|
filer.ProtoToText(os.Stdout, resp)
|
||||||
fmt.Fprintln(os.Stdout)
|
fmt.Fprintln(os.Stdout)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
@@ -10,8 +9,8 @@ import (
|
|||||||
"github.com/seaweedfs/seaweedfs/weed/pb/remote_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/remote_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/remote_storage"
|
"github.com/seaweedfs/seaweedfs/weed/remote_storage"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -183,7 +182,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour
|
|||||||
if message.NewParentPath == option.bucketsDir {
|
if message.NewParentPath == option.bucketsDir {
|
||||||
return handleCreateBucket(message.NewEntry)
|
return handleCreateBucket(message.NewEntry)
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(message.NewParentPath, option.bucketsDir) && strings.Contains(message.NewParentPath, "/"+s3_constants.MultipartUploadsFolder+"/") {
|
if isMultipartUploadFile(message.NewParentPath, message.NewEntry.Name) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !filer.HasData(message.NewEntry) {
|
if !filer.HasData(message.NewEntry) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import (
|
|||||||
|
|
||||||
type RemoteSyncOptions struct {
|
type RemoteSyncOptions struct {
|
||||||
filerAddress *string
|
filerAddress *string
|
||||||
|
storageClass *string
|
||||||
grpcDialOption grpc.DialOption
|
grpcDialOption grpc.DialOption
|
||||||
readChunkFromFiler *bool
|
readChunkFromFiler *bool
|
||||||
timeAgo *time.Duration
|
timeAgo *time.Duration
|
||||||
@@ -45,6 +46,7 @@ func init() {
|
|||||||
cmdFilerRemoteSynchronize.Run = runFilerRemoteSynchronize // break init cycle
|
cmdFilerRemoteSynchronize.Run = runFilerRemoteSynchronize // break init cycle
|
||||||
remoteSyncOptions.filerAddress = cmdFilerRemoteSynchronize.Flag.String("filer", "localhost:8888", "filer of the SeaweedFS cluster")
|
remoteSyncOptions.filerAddress = cmdFilerRemoteSynchronize.Flag.String("filer", "localhost:8888", "filer of the SeaweedFS cluster")
|
||||||
remoteSyncOptions.dir = cmdFilerRemoteSynchronize.Flag.String("dir", "", "a mounted directory on filer")
|
remoteSyncOptions.dir = cmdFilerRemoteSynchronize.Flag.String("dir", "", "a mounted directory on filer")
|
||||||
|
remoteSyncOptions.storageClass = cmdFilerRemoteSynchronize.Flag.String("storageClass", "", "override amz storage class, empty to delete")
|
||||||
remoteSyncOptions.readChunkFromFiler = cmdFilerRemoteSynchronize.Flag.Bool("filerProxy", false, "read file chunks from filer instead of volume servers")
|
remoteSyncOptions.readChunkFromFiler = cmdFilerRemoteSynchronize.Flag.Bool("filerProxy", false, "read file chunks from filer instead of volume servers")
|
||||||
remoteSyncOptions.timeAgo = cmdFilerRemoteSynchronize.Flag.Duration("timeAgo", 0, "start time before now, skipping previous metadata changes. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"")
|
remoteSyncOptions.timeAgo = cmdFilerRemoteSynchronize.Flag.Duration("timeAgo", 0, "start time before now, skipping previous metadata changes. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"")
|
||||||
remoteSyncOptions.clientId = util.RandomInt32()
|
remoteSyncOptions.clientId = util.RandomInt32()
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package command
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *source.FilerSource, mountedDir string) error {
|
func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *source.FilerSource, mountedDir string) error {
|
||||||
@@ -32,10 +33,31 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
processEventFnWithOffset := pb.AddOffsetFunc(eachEntryFunc, 3*time.Second, func(counter int64, lastTsNs int64) error {
|
processor := NewMetadataProcessor(eachEntryFunc, 128)
|
||||||
lastTime := time.Unix(0, lastTsNs)
|
|
||||||
glog.V(0).Infof("remote sync %s progressed to %v %0.2f/sec", *option.filerAddress, lastTime, float64(counter)/float64(3))
|
var lastLogTsNs = time.Now().UnixNano()
|
||||||
return remote_storage.SetSyncOffset(option.grpcDialOption, pb.ServerAddress(*option.filerAddress), mountedDir, lastTsNs)
|
processEventFnWithOffset := pb.AddOffsetFunc(func(resp *filer_pb.SubscribeMetadataResponse) error {
|
||||||
|
if resp.EventNotification.NewEntry != nil {
|
||||||
|
if *option.storageClass == "" {
|
||||||
|
if _, ok := resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass]; ok {
|
||||||
|
delete(resp.EventNotification.NewEntry.Extended, s3_constants.AmzStorageClass)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass] = []byte(*option.storageClass)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
processor.AddSyncJob(resp)
|
||||||
|
return nil
|
||||||
|
}, 3*time.Second, func(counter int64, lastTsNs int64) error {
|
||||||
|
if processor.processedTsWatermark == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// use processor.processedTsWatermark instead of the lastTsNs from the most recent job
|
||||||
|
now := time.Now().UnixNano()
|
||||||
|
glog.V(0).Infof("remote sync %s progressed to %v %0.2f/sec", *option.filerAddress, time.Unix(0, processor.processedTsWatermark), float64(counter)/(float64(now-lastLogTsNs)/1e9))
|
||||||
|
lastLogTsNs = now
|
||||||
|
return remote_storage.SetSyncOffset(option.grpcDialOption, pb.ServerAddress(*option.filerAddress), mountedDir, processor.processedTsWatermark)
|
||||||
})
|
})
|
||||||
|
|
||||||
lastOffsetTs := collectLastSyncOffset(option, option.grpcDialOption, pb.ServerAddress(*option.filerAddress), mountedDir, *option.timeAgo)
|
lastOffsetTs := collectLastSyncOffset(option, option.grpcDialOption, pb.ServerAddress(*option.filerAddress), mountedDir, *option.timeAgo)
|
||||||
@@ -96,6 +118,9 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if filer_pb.IsCreate(resp) {
|
if filer_pb.IsCreate(resp) {
|
||||||
|
if isMultipartUploadFile(message.NewParentPath, message.NewEntry.Name) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if !filer.HasData(message.NewEntry) {
|
if !filer.HasData(message.NewEntry) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -145,7 +170,9 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string,
|
|||||||
glog.V(2).Infof("update: %+v", resp)
|
glog.V(2).Infof("update: %+v", resp)
|
||||||
glog.V(0).Infof("delete %s", remote_storage.FormatLocation(oldDest))
|
glog.V(0).Infof("delete %s", remote_storage.FormatLocation(oldDest))
|
||||||
if err := client.DeleteFile(oldDest); err != nil {
|
if err := client.DeleteFile(oldDest); err != nil {
|
||||||
return err
|
if isMultipartUploadFile(resp.Directory, message.OldEntry.Name) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
remoteEntry, writeErr := retriedWriteFile(client, filerSource, message.NewEntry, dest)
|
remoteEntry, writeErr := retriedWriteFile(client, filerSource, message.NewEntry, dest)
|
||||||
if writeErr != nil {
|
if writeErr != nil {
|
||||||
@@ -236,3 +263,9 @@ func updateLocalEntry(filerClient filer_pb.FilerClient, dir string, entry *filer
|
|||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isMultipartUploadFile(dir string, name string) bool {
|
||||||
|
return strings.HasPrefix(dir, "/buckets/") &&
|
||||||
|
strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/") &&
|
||||||
|
strings.HasSuffix(name, ".part")
|
||||||
|
}
|
||||||
+26
-11
@@ -43,11 +43,18 @@ type SyncOptions struct {
|
|||||||
bFromTsMs *int64
|
bFromTsMs *int64
|
||||||
aProxyByFiler *bool
|
aProxyByFiler *bool
|
||||||
bProxyByFiler *bool
|
bProxyByFiler *bool
|
||||||
|
metricsHttpIp *string
|
||||||
metricsHttpPort *int
|
metricsHttpPort *int
|
||||||
|
concurrency *int
|
||||||
clientId int32
|
clientId int32
|
||||||
clientEpoch int32
|
clientEpoch int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
SyncKeyPrefix = "sync."
|
||||||
|
DefaultConcurrencyLimit = 32
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
syncOptions SyncOptions
|
syncOptions SyncOptions
|
||||||
syncCpuProfile *string
|
syncCpuProfile *string
|
||||||
@@ -77,8 +84,10 @@ func init() {
|
|||||||
syncOptions.bDebug = cmdFilerSynchronize.Flag.Bool("b.debug", false, "debug mode to print out filer B received files")
|
syncOptions.bDebug = cmdFilerSynchronize.Flag.Bool("b.debug", false, "debug mode to print out filer B received files")
|
||||||
syncOptions.aFromTsMs = cmdFilerSynchronize.Flag.Int64("a.fromTsMs", 0, "synchronization from timestamp on filer A. The unit is millisecond")
|
syncOptions.aFromTsMs = cmdFilerSynchronize.Flag.Int64("a.fromTsMs", 0, "synchronization from timestamp on filer A. The unit is millisecond")
|
||||||
syncOptions.bFromTsMs = cmdFilerSynchronize.Flag.Int64("b.fromTsMs", 0, "synchronization from timestamp on filer B. The unit is millisecond")
|
syncOptions.bFromTsMs = cmdFilerSynchronize.Flag.Int64("b.fromTsMs", 0, "synchronization from timestamp on filer B. The unit is millisecond")
|
||||||
|
syncOptions.concurrency = cmdFilerSynchronize.Flag.Int("concurrency", DefaultConcurrencyLimit, "The maximum number of files that will be synced concurrently.")
|
||||||
syncCpuProfile = cmdFilerSynchronize.Flag.String("cpuprofile", "", "cpu profile output file")
|
syncCpuProfile = cmdFilerSynchronize.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||||
syncMemProfile = cmdFilerSynchronize.Flag.String("memprofile", "", "memory profile output file")
|
syncMemProfile = cmdFilerSynchronize.Flag.String("memprofile", "", "memory profile output file")
|
||||||
|
syncOptions.metricsHttpIp = cmdFilerSynchronize.Flag.String("metricsIp", "", "metrics listen ip")
|
||||||
syncOptions.metricsHttpPort = cmdFilerSynchronize.Flag.Int("metricsPort", 0, "metrics listen port")
|
syncOptions.metricsHttpPort = cmdFilerSynchronize.Flag.Int("metricsPort", 0, "metrics listen port")
|
||||||
syncOptions.clientId = util.RandomInt32()
|
syncOptions.clientId = util.RandomInt32()
|
||||||
}
|
}
|
||||||
@@ -112,7 +121,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
filerB := pb.ServerAddress(*syncOptions.filerB)
|
filerB := pb.ServerAddress(*syncOptions.filerB)
|
||||||
|
|
||||||
// start filer.sync metrics server
|
// start filer.sync metrics server
|
||||||
go statsCollect.StartMetricsServer(*syncOptions.metricsHttpPort)
|
go statsCollect.StartMetricsServer(*syncOptions.metricsHttpIp, *syncOptions.metricsHttpPort)
|
||||||
|
|
||||||
// read a filer signature
|
// read a filer signature
|
||||||
aFilerSignature, aFilerErr := replication.ReadFilerSignature(grpcDialOption, filerA)
|
aFilerSignature, aFilerErr := replication.ReadFilerSignature(grpcDialOption, filerA)
|
||||||
@@ -130,7 +139,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
go func() {
|
go func() {
|
||||||
// a->b
|
// a->b
|
||||||
// set synchronization start timestamp to offset
|
// set synchronization start timestamp to offset
|
||||||
initOffsetError := initOffsetFromTsMs(grpcDialOption, filerB, aFilerSignature, *syncOptions.bFromTsMs)
|
initOffsetError := initOffsetFromTsMs(grpcDialOption, filerB, aFilerSignature, *syncOptions.bFromTsMs, getSignaturePrefixByPath(*syncOptions.aPath))
|
||||||
if initOffsetError != nil {
|
if initOffsetError != nil {
|
||||||
glog.Errorf("init offset from timestamp %d error from %s to %s: %v", *syncOptions.bFromTsMs, *syncOptions.filerA, *syncOptions.filerB, initOffsetError)
|
glog.Errorf("init offset from timestamp %d error from %s to %s: %v", *syncOptions.bFromTsMs, *syncOptions.filerA, *syncOptions.filerB, initOffsetError)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
@@ -153,6 +162,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
*syncOptions.bProxyByFiler,
|
*syncOptions.bProxyByFiler,
|
||||||
*syncOptions.bDiskType,
|
*syncOptions.bDiskType,
|
||||||
*syncOptions.bDebug,
|
*syncOptions.bDebug,
|
||||||
|
*syncOptions.concurrency,
|
||||||
aFilerSignature,
|
aFilerSignature,
|
||||||
bFilerSignature)
|
bFilerSignature)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -165,7 +175,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
if !*syncOptions.isActivePassive {
|
if !*syncOptions.isActivePassive {
|
||||||
// b->a
|
// b->a
|
||||||
// set synchronization start timestamp to offset
|
// set synchronization start timestamp to offset
|
||||||
initOffsetError := initOffsetFromTsMs(grpcDialOption, filerA, bFilerSignature, *syncOptions.aFromTsMs)
|
initOffsetError := initOffsetFromTsMs(grpcDialOption, filerA, bFilerSignature, *syncOptions.aFromTsMs, getSignaturePrefixByPath(*syncOptions.bPath))
|
||||||
if initOffsetError != nil {
|
if initOffsetError != nil {
|
||||||
glog.Errorf("init offset from timestamp %d error from %s to %s: %v", *syncOptions.aFromTsMs, *syncOptions.filerB, *syncOptions.filerA, initOffsetError)
|
glog.Errorf("init offset from timestamp %d error from %s to %s: %v", *syncOptions.aFromTsMs, *syncOptions.filerB, *syncOptions.filerA, initOffsetError)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
@@ -189,6 +199,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
*syncOptions.aProxyByFiler,
|
*syncOptions.aProxyByFiler,
|
||||||
*syncOptions.aDiskType,
|
*syncOptions.aDiskType,
|
||||||
*syncOptions.aDebug,
|
*syncOptions.aDebug,
|
||||||
|
*syncOptions.concurrency,
|
||||||
bFilerSignature,
|
bFilerSignature,
|
||||||
aFilerSignature)
|
aFilerSignature)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -205,14 +216,14 @@ func runFilerSynchronize(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initOffsetFromTsMs Initialize offset
|
// initOffsetFromTsMs Initialize offset
|
||||||
func initOffsetFromTsMs(grpcDialOption grpc.DialOption, targetFiler pb.ServerAddress, sourceFilerSignature int32, fromTsMs int64) error {
|
func initOffsetFromTsMs(grpcDialOption grpc.DialOption, targetFiler pb.ServerAddress, sourceFilerSignature int32, fromTsMs int64, signaturePrefix string) error {
|
||||||
if fromTsMs <= 0 {
|
if fromTsMs <= 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// convert to nanosecond
|
// convert to nanosecond
|
||||||
fromTsNs := fromTsMs * 1000_000
|
fromTsNs := fromTsMs * 1000_000
|
||||||
// If not successful, exit the program.
|
// If not successful, exit the program.
|
||||||
setOffsetErr := setOffset(grpcDialOption, targetFiler, SyncKeyPrefix, sourceFilerSignature, fromTsNs)
|
setOffsetErr := setOffset(grpcDialOption, targetFiler, signaturePrefix, sourceFilerSignature, fromTsNs)
|
||||||
if setOffsetErr != nil {
|
if setOffsetErr != nil {
|
||||||
return setOffsetErr
|
return setOffsetErr
|
||||||
}
|
}
|
||||||
@@ -221,7 +232,7 @@ func initOffsetFromTsMs(grpcDialOption grpc.DialOption, targetFiler pb.ServerAdd
|
|||||||
}
|
}
|
||||||
|
|
||||||
func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOption grpc.DialOption, sourceFiler pb.ServerAddress, sourcePath string, sourceExcludePaths []string, sourceReadChunkFromFiler bool, targetFiler pb.ServerAddress, targetPath string,
|
func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOption grpc.DialOption, sourceFiler pb.ServerAddress, sourcePath string, sourceExcludePaths []string, sourceReadChunkFromFiler bool, targetFiler pb.ServerAddress, targetPath string,
|
||||||
replicationStr, collection string, ttlSec int, sinkWriteChunkByFiler bool, diskType string, debug bool, sourceFilerSignature int32, targetFilerSignature int32) error {
|
replicationStr, collection string, ttlSec int, sinkWriteChunkByFiler bool, diskType string, debug bool, concurrency int, sourceFilerSignature int32, targetFilerSignature int32) error {
|
||||||
|
|
||||||
// if first time, start from now
|
// if first time, start from now
|
||||||
// if has previously synced, resume from that point of time
|
// if has previously synced, resume from that point of time
|
||||||
@@ -251,7 +262,12 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOpti
|
|||||||
}
|
}
|
||||||
return persistEventFn(resp)
|
return persistEventFn(resp)
|
||||||
}
|
}
|
||||||
processor := NewMetadataProcessor(processEventFn, 128)
|
|
||||||
|
if concurrency < 0 || concurrency > 1024 {
|
||||||
|
glog.Warningf("invalid concurrency value, using default: %d", DefaultConcurrencyLimit)
|
||||||
|
concurrency = DefaultConcurrencyLimit
|
||||||
|
}
|
||||||
|
processor := NewMetadataProcessor(processEventFn, concurrency)
|
||||||
|
|
||||||
var lastLogTsNs = time.Now().UnixNano()
|
var lastLogTsNs = time.Now().UnixNano()
|
||||||
var clientName = fmt.Sprintf("syncFrom_%s_To_%s", string(sourceFiler), string(targetFiler))
|
var clientName = fmt.Sprintf("syncFrom_%s_To_%s", string(sourceFiler), string(targetFiler))
|
||||||
@@ -259,6 +275,9 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOpti
|
|||||||
processor.AddSyncJob(resp)
|
processor.AddSyncJob(resp)
|
||||||
return nil
|
return nil
|
||||||
}, 3*time.Second, func(counter int64, lastTsNs int64) error {
|
}, 3*time.Second, func(counter int64, lastTsNs int64) error {
|
||||||
|
if processor.processedTsWatermark == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
// use processor.processedTsWatermark instead of the lastTsNs from the most recent job
|
// use processor.processedTsWatermark instead of the lastTsNs from the most recent job
|
||||||
now := time.Now().UnixNano()
|
now := time.Now().UnixNano()
|
||||||
glog.V(0).Infof("sync %s to %s progressed to %v %0.2f/sec", sourceFiler, targetFiler, time.Unix(0, processor.processedTsWatermark), float64(counter)/(float64(now-lastLogTsNs)/1e9))
|
glog.V(0).Infof("sync %s to %s progressed to %v %0.2f/sec", sourceFiler, targetFiler, time.Unix(0, processor.processedTsWatermark), float64(counter)/(float64(now-lastLogTsNs)/1e9))
|
||||||
@@ -273,10 +292,6 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOpti
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
|
||||||
SyncKeyPrefix = "sync."
|
|
||||||
)
|
|
||||||
|
|
||||||
// When each business is distinguished according to path, and offsets need to be maintained separately.
|
// When each business is distinguished according to path, and offsets need to be maintained separately.
|
||||||
func getSignaturePrefixByPath(path string) string {
|
func getSignaturePrefixByPath(path string) string {
|
||||||
// compatible historical version
|
// compatible historical version
|
||||||
|
|||||||
@@ -2,23 +2,22 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MetadataProcessFunc func(resp *filer_pb.SubscribeMetadataResponse) error
|
|
||||||
|
|
||||||
type MetadataProcessor struct {
|
type MetadataProcessor struct {
|
||||||
activeJobs map[int64]*filer_pb.SubscribeMetadataResponse
|
activeJobs map[int64]*filer_pb.SubscribeMetadataResponse
|
||||||
activeJobsLock sync.Mutex
|
activeJobsLock sync.Mutex
|
||||||
activeJobsCond *sync.Cond
|
activeJobsCond *sync.Cond
|
||||||
concurrencyLimit int
|
concurrencyLimit int
|
||||||
fn MetadataProcessFunc
|
fn pb.ProcessMetadataFunc
|
||||||
processedTsWatermark int64
|
processedTsWatermark int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMetadataProcessor(fn MetadataProcessFunc, concurrency int) *MetadataProcessor {
|
func NewMetadataProcessor(fn pb.ProcessMetadataFunc, concurrency int) *MetadataProcessor {
|
||||||
t := &MetadataProcessor{
|
t := &MetadataProcessor{
|
||||||
fn: fn,
|
fn: fn,
|
||||||
activeJobs: make(map[int64]*filer_pb.SubscribeMetadataResponse),
|
activeJobs: make(map[int64]*filer_pb.SubscribeMetadataResponse),
|
||||||
@@ -42,12 +41,11 @@ func (t *MetadataProcessor) AddSyncJob(resp *filer_pb.SubscribeMetadataResponse)
|
|||||||
t.activeJobs[resp.TsNs] = resp
|
t.activeJobs[resp.TsNs] = resp
|
||||||
go func() {
|
go func() {
|
||||||
|
|
||||||
util.RetryForever("metadata processor", func() error {
|
if err := util.Retry("metadata processor", func() error {
|
||||||
return t.fn(resp)
|
return t.fn(resp)
|
||||||
}, func(err error) bool {
|
}); err != nil {
|
||||||
glog.Errorf("process %v: %v", resp, err)
|
glog.Errorf("process %v: %v", resp, err)
|
||||||
return true
|
}
|
||||||
})
|
|
||||||
|
|
||||||
t.activeJobsLock.Lock()
|
t.activeJobsLock.Lock()
|
||||||
defer t.activeJobsLock.Unlock()
|
defer t.activeJobsLock.Unlock()
|
||||||
@@ -56,7 +54,7 @@ func (t *MetadataProcessor) AddSyncJob(resp *filer_pb.SubscribeMetadataResponse)
|
|||||||
|
|
||||||
// if is the oldest job, write down the watermark
|
// if is the oldest job, write down the watermark
|
||||||
isOldest := true
|
isOldest := true
|
||||||
for t, _ := range t.activeJobs {
|
for t := range t.activeJobs {
|
||||||
if resp.TsNs > t {
|
if resp.TsNs > t {
|
||||||
isOldest = false
|
isOldest = false
|
||||||
break
|
break
|
||||||
|
|||||||
+18
-4
@@ -31,6 +31,7 @@ var cmdFix = &Command{
|
|||||||
var (
|
var (
|
||||||
fixVolumeCollection = cmdFix.Flag.String("collection", "", "an optional volume collection name, if specified only it will be processed")
|
fixVolumeCollection = cmdFix.Flag.String("collection", "", "an optional volume collection name, if specified only it will be processed")
|
||||||
fixVolumeId = cmdFix.Flag.Int64("volumeId", 0, "an optional volume id, if not 0 (default) only it will be processed")
|
fixVolumeId = cmdFix.Flag.Int64("volumeId", 0, "an optional volume id, if not 0 (default) only it will be processed")
|
||||||
|
fixIgnoreError = cmdFix.Flag.Bool("ignoreError", false, "an optional, if true will be processed despite errors")
|
||||||
)
|
)
|
||||||
|
|
||||||
type VolumeFileScanner4Fix struct {
|
type VolumeFileScanner4Fix struct {
|
||||||
@@ -62,6 +63,10 @@ func (scanner *VolumeFileScanner4Fix) VisitNeedle(n *needle.Needle, offset int64
|
|||||||
func runFix(cmd *Command, args []string) bool {
|
func runFix(cmd *Command, args []string) bool {
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
basePath, f := path.Split(util.ResolvePath(arg))
|
basePath, f := path.Split(util.ResolvePath(arg))
|
||||||
|
if util.FolderExists(arg) {
|
||||||
|
basePath = arg
|
||||||
|
f = ""
|
||||||
|
}
|
||||||
|
|
||||||
files := []fs.DirEntry{}
|
files := []fs.DirEntry{}
|
||||||
if f == "" {
|
if f == "" {
|
||||||
@@ -72,7 +77,7 @@ func runFix(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
files = fileInfo
|
files = fileInfo
|
||||||
} else {
|
} else {
|
||||||
fileInfo, err := os.Stat(basePath + f)
|
fileInfo, err := os.Stat(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return false
|
return false
|
||||||
@@ -122,12 +127,21 @@ func doFixOneVolume(basepath string, baseFileName string, collection string, vol
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := storage.ScanVolumeFile(basepath, collection, vid, storage.NeedleMapInMemory, scanner); err != nil {
|
if err := storage.ScanVolumeFile(basepath, collection, vid, storage.NeedleMapInMemory, scanner); err != nil {
|
||||||
glog.Fatalf("scan .dat File: %v", err)
|
err := fmt.Errorf("scan .dat File: %v", err)
|
||||||
os.Remove(indexFileName)
|
if *fixIgnoreError {
|
||||||
|
glog.Error(err)
|
||||||
|
} else {
|
||||||
|
glog.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := nm.SaveToIdx(indexFileName); err != nil {
|
if err := nm.SaveToIdx(indexFileName); err != nil {
|
||||||
glog.Fatalf("save to .idx File: %v", err)
|
|
||||||
os.Remove(indexFileName)
|
os.Remove(indexFileName)
|
||||||
|
err := fmt.Errorf("save to .idx File: %v", err)
|
||||||
|
if *fixIgnoreError {
|
||||||
|
glog.Error(err)
|
||||||
|
} else {
|
||||||
|
glog.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
-1
@@ -47,7 +47,10 @@ func runFuse(cmd *Command, args []string) bool {
|
|||||||
for i++; i < rawArgsLen && rawArgs[i] != ' '; i++ {
|
for i++; i < rawArgsLen && rawArgs[i] != ' '; i++ {
|
||||||
option.WriteByte(rawArgs[i])
|
option.WriteByte(rawArgs[i])
|
||||||
}
|
}
|
||||||
options = append(options, parameter{option.String(), "true"})
|
// ignore "-o"
|
||||||
|
if option.String() != "o" {
|
||||||
|
options = append(options, parameter{option.String(), "true"})
|
||||||
|
}
|
||||||
option.Reset()
|
option.Reset()
|
||||||
|
|
||||||
// equal separator start option with pending value
|
// equal separator start option with pending value
|
||||||
@@ -190,6 +193,12 @@ func runFuse(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
case "fusermount.path":
|
case "fusermount.path":
|
||||||
fusermountPath = parameter.value
|
fusermountPath = parameter.value
|
||||||
|
default:
|
||||||
|
t := parameter.name
|
||||||
|
if parameter.value != "true" {
|
||||||
|
t = fmt.Sprintf("%s=%s", parameter.name, parameter.value)
|
||||||
|
}
|
||||||
|
mountOptions.extraOptions = append(mountOptions.extraOptions, t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+18
-8
@@ -2,6 +2,7 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
hashicorpRaft "github.com/hashicorp/raft"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
@@ -118,7 +119,7 @@ func runMaster(cmd *Command, args []string) bool {
|
|||||||
glog.Fatalf("volumeSizeLimitMB should be smaller than 30000")
|
glog.Fatalf("volumeSizeLimitMB should be smaller than 30000")
|
||||||
}
|
}
|
||||||
|
|
||||||
go stats_collect.StartMetricsServer(*m.metricsHttpPort)
|
go stats_collect.StartMetricsServer(*m.ipBind, *m.metricsHttpPort)
|
||||||
startMaster(m, masterWhiteList)
|
startMaster(m, masterWhiteList)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@@ -146,7 +147,7 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
|||||||
ms := weed_server.NewMasterServer(r, masterOption.toMasterOption(masterWhiteList), masterPeers)
|
ms := weed_server.NewMasterServer(r, masterOption.toMasterOption(masterWhiteList), masterPeers)
|
||||||
listeningAddress := util.JoinHostPort(*masterOption.ipBind, *masterOption.port)
|
listeningAddress := util.JoinHostPort(*masterOption.ipBind, *masterOption.port)
|
||||||
glog.V(0).Infof("Start Seaweed Master %s at %s", util.Version(), listeningAddress)
|
glog.V(0).Infof("Start Seaweed Master %s at %s", util.Version(), listeningAddress)
|
||||||
masterListener, masterLocalListner, e := util.NewIpAndLocalListeners(*masterOption.ipBind, *masterOption.port, 0)
|
masterListener, masterLocalListener, e := util.NewIpAndLocalListeners(*masterOption.ipBind, *masterOption.port, 0)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
glog.Fatalf("Master startup error: %v", e)
|
glog.Fatalf("Master startup error: %v", e)
|
||||||
}
|
}
|
||||||
@@ -206,11 +207,13 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
|||||||
if !*m.raftHashicorp {
|
if !*m.raftHashicorp {
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(timeSleep)
|
time.Sleep(timeSleep)
|
||||||
if ms.Topo.RaftServer.Leader() == "" && ms.Topo.RaftServer.IsLogEmpty() && isTheFirstOne(myMasterAddress, peers) {
|
|
||||||
if ms.MasterClient.FindLeaderFromOtherPeers(myMasterAddress) == "" {
|
ms.Topo.RaftServerAccessLock.RLock()
|
||||||
raftServer.DoJoinCommand()
|
isEmptyMaster := ms.Topo.RaftServer.Leader() == "" && ms.Topo.RaftServer.IsLogEmpty()
|
||||||
}
|
if isEmptyMaster && isTheFirstOne(myMasterAddress, peers) && ms.MasterClient.FindLeaderFromOtherPeers(myMasterAddress) == "" {
|
||||||
|
raftServer.DoJoinCommand()
|
||||||
}
|
}
|
||||||
|
ms.Topo.RaftServerAccessLock.RUnlock()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,8 +240,8 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
httpS := &http.Server{Handler: r}
|
httpS := &http.Server{Handler: r}
|
||||||
if masterLocalListner != nil {
|
if masterLocalListener != nil {
|
||||||
go httpS.Serve(masterLocalListner)
|
go httpS.Serve(masterLocalListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
if useMTLS {
|
if useMTLS {
|
||||||
@@ -251,6 +254,13 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
|||||||
go httpS.Serve(masterListener)
|
go httpS.Serve(masterListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grace.OnInterrupt(ms.Shutdown)
|
||||||
|
grace.OnInterrupt(grpcS.Stop)
|
||||||
|
grace.OnReload(func() {
|
||||||
|
if ms.Topo.HashicorpRaft != nil && ms.Topo.HashicorpRaft.State() == hashicorpRaft.Leader {
|
||||||
|
ms.Topo.HashicorpRaft.LeadershipTransfer()
|
||||||
|
}
|
||||||
|
})
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ func startMasterFollower(masterOptions MasterOptions) {
|
|||||||
ms := weed_server.NewMasterServer(r, option, masters)
|
ms := weed_server.NewMasterServer(r, option, masters)
|
||||||
listeningAddress := util.JoinHostPort(*masterOptions.ipBind, *masterOptions.port)
|
listeningAddress := util.JoinHostPort(*masterOptions.ipBind, *masterOptions.port)
|
||||||
glog.V(0).Infof("Start Seaweed Master %s at %s", util.Version(), listeningAddress)
|
glog.V(0).Infof("Start Seaweed Master %s at %s", util.Version(), listeningAddress)
|
||||||
masterListener, masterLocalListner, e := util.NewIpAndLocalListeners(*masterOptions.ipBind, *masterOptions.port, 0)
|
masterListener, masterLocalListener, e := util.NewIpAndLocalListeners(*masterOptions.ipBind, *masterOptions.port, 0)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
glog.Fatalf("Master startup error: %v", e)
|
glog.Fatalf("Master startup error: %v", e)
|
||||||
}
|
}
|
||||||
@@ -144,8 +144,8 @@ func startMasterFollower(masterOptions MasterOptions) {
|
|||||||
|
|
||||||
// start http server
|
// start http server
|
||||||
httpS := &http.Server{Handler: r}
|
httpS := &http.Server{Handler: r}
|
||||||
if masterLocalListner != nil {
|
if masterLocalListener != nil {
|
||||||
go httpS.Serve(masterLocalListner)
|
go httpS.Serve(masterLocalListener)
|
||||||
}
|
}
|
||||||
go httpS.Serve(masterListener)
|
go httpS.Serve(masterListener)
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ type MountOptions struct {
|
|||||||
debugPort *int
|
debugPort *int
|
||||||
localSocket *string
|
localSocket *string
|
||||||
disableXAttr *bool
|
disableXAttr *bool
|
||||||
|
extraOptions []string
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package command
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -142,6 +143,9 @@ func checkMountPointAvailable(dir string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if mounted, err := mounted(mountPoint); err != nil || mounted {
|
if mounted, err := mounted(mountPoint); err != nil || mounted {
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("check %s: %v", mountPoint, err)
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
|||||||
if mountDirHash < 0 {
|
if mountDirHash < 0 {
|
||||||
mountDirHash = -mountDirHash
|
mountDirHash = -mountDirHash
|
||||||
}
|
}
|
||||||
*option.localSocket = fmt.Sprintf("/tmp/seaweefs-mount-%d.sock", mountDirHash)
|
*option.localSocket = fmt.Sprintf("/tmp/seaweedfs-mount-%d.sock", mountDirHash)
|
||||||
}
|
}
|
||||||
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
|
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
|
||||||
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
|
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
|
||||||
@@ -157,7 +157,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
|||||||
|
|
||||||
// Ensure target mount point availability
|
// Ensure target mount point availability
|
||||||
if isValid := checkMountPointAvailable(dir); !isValid {
|
if isValid := checkMountPointAvailable(dir); !isValid {
|
||||||
glog.Fatalf("Expected mount to still be active, target mount point: %s, please check!", dir)
|
glog.Fatalf("Target mount point is not available: %s, please check!", dir)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
|||||||
// mount fuse
|
// mount fuse
|
||||||
fuseMountOptions := &fuse.MountOptions{
|
fuseMountOptions := &fuse.MountOptions{
|
||||||
AllowOther: *option.allowOthers,
|
AllowOther: *option.allowOthers,
|
||||||
Options: nil,
|
Options: option.extraOptions,
|
||||||
MaxBackground: 128,
|
MaxBackground: 128,
|
||||||
MaxWrite: 1024 * 1024 * 2,
|
MaxWrite: 1024 * 1024 * 2,
|
||||||
MaxReadAhead: 1024 * 1024 * 2,
|
MaxReadAhead: 1024 * 1024 * 2,
|
||||||
|
|||||||
+12
-8
@@ -57,6 +57,7 @@ func init() {
|
|||||||
s3StandaloneOptions.metricsHttpPort = cmdS3.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
|
s3StandaloneOptions.metricsHttpPort = cmdS3.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
|
||||||
s3StandaloneOptions.allowEmptyFolder = cmdS3.Flag.Bool("allowEmptyFolder", true, "allow empty folders")
|
s3StandaloneOptions.allowEmptyFolder = cmdS3.Flag.Bool("allowEmptyFolder", true, "allow empty folders")
|
||||||
s3StandaloneOptions.allowDeleteBucketNotEmpty = cmdS3.Flag.Bool("allowDeleteBucketNotEmpty", true, "allow recursive deleting all entries along with bucket")
|
s3StandaloneOptions.allowDeleteBucketNotEmpty = cmdS3.Flag.Bool("allowDeleteBucketNotEmpty", true, "allow recursive deleting all entries along with bucket")
|
||||||
|
s3StandaloneOptions.localFilerSocket = cmdS3.Flag.String("localFilerSocket", "", "local filer socket path")
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmdS3 = &Command{
|
var cmdS3 = &Command{
|
||||||
@@ -143,7 +144,7 @@ func runS3(cmd *Command, args []string) bool {
|
|||||||
|
|
||||||
util.LoadConfiguration("security", false)
|
util.LoadConfiguration("security", false)
|
||||||
|
|
||||||
go stats_collect.StartMetricsServer(*s3StandaloneOptions.metricsHttpPort)
|
go stats_collect.StartMetricsServer(*s3StandaloneOptions.bindIp, *s3StandaloneOptions.metricsHttpPort)
|
||||||
|
|
||||||
return s3StandaloneOptions.startS3Server()
|
return s3StandaloneOptions.startS3Server()
|
||||||
|
|
||||||
@@ -184,7 +185,10 @@ func (s3opt *S3Options) startS3Server() bool {
|
|||||||
go stats_collect.LoopPushingMetric("s3", stats_collect.SourceName(uint32(*s3opt.port)), metricsAddress, metricsIntervalSec)
|
go stats_collect.LoopPushingMetric("s3", stats_collect.SourceName(uint32(*s3opt.port)), metricsAddress, metricsIntervalSec)
|
||||||
|
|
||||||
router := mux.NewRouter().SkipClean(true)
|
router := mux.NewRouter().SkipClean(true)
|
||||||
|
var localFilerSocket string
|
||||||
|
if s3opt.localFilerSocket != nil {
|
||||||
|
localFilerSocket = *s3opt.localFilerSocket
|
||||||
|
}
|
||||||
s3ApiServer, s3ApiServer_err := s3api.NewS3ApiServer(router, &s3api.S3ApiServerOption{
|
s3ApiServer, s3ApiServer_err := s3api.NewS3ApiServer(router, &s3api.S3ApiServerOption{
|
||||||
Filer: filerAddress,
|
Filer: filerAddress,
|
||||||
Port: *s3opt.port,
|
Port: *s3opt.port,
|
||||||
@@ -194,7 +198,7 @@ func (s3opt *S3Options) startS3Server() bool {
|
|||||||
GrpcDialOption: grpcDialOption,
|
GrpcDialOption: grpcDialOption,
|
||||||
AllowEmptyFolder: *s3opt.allowEmptyFolder,
|
AllowEmptyFolder: *s3opt.allowEmptyFolder,
|
||||||
AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty,
|
AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty,
|
||||||
LocalFilerSocket: s3opt.localFilerSocket,
|
LocalFilerSocket: localFilerSocket,
|
||||||
DataCenter: *s3opt.dataCenter,
|
DataCenter: *s3opt.dataCenter,
|
||||||
})
|
})
|
||||||
if s3ApiServer_err != nil {
|
if s3ApiServer_err != nil {
|
||||||
@@ -211,7 +215,7 @@ func (s3opt *S3Options) startS3Server() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listenAddress := fmt.Sprintf("%s:%d", *s3opt.bindIp, *s3opt.port)
|
listenAddress := fmt.Sprintf("%s:%d", *s3opt.bindIp, *s3opt.port)
|
||||||
s3ApiListener, s3ApiLocalListner, err := util.NewIpAndLocalListeners(*s3opt.bindIp, *s3opt.port, time.Duration(10)*time.Second)
|
s3ApiListener, s3ApiLocalListener, err := util.NewIpAndLocalListeners(*s3opt.bindIp, *s3opt.port, time.Duration(10)*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("S3 API Server listener on %s error: %v", listenAddress, err)
|
glog.Fatalf("S3 API Server listener on %s error: %v", listenAddress, err)
|
||||||
}
|
}
|
||||||
@@ -239,9 +243,9 @@ func (s3opt *S3Options) startS3Server() bool {
|
|||||||
|
|
||||||
if *s3opt.tlsPrivateKey != "" {
|
if *s3opt.tlsPrivateKey != "" {
|
||||||
glog.V(0).Infof("Start Seaweed S3 API Server %s at https port %d", util.Version(), *s3opt.port)
|
glog.V(0).Infof("Start Seaweed S3 API Server %s at https port %d", util.Version(), *s3opt.port)
|
||||||
if s3ApiLocalListner != nil {
|
if s3ApiLocalListener != nil {
|
||||||
go func() {
|
go func() {
|
||||||
if err = httpS.ServeTLS(s3ApiLocalListner, *s3opt.tlsCertificate, *s3opt.tlsPrivateKey); err != nil {
|
if err = httpS.ServeTLS(s3ApiLocalListener, *s3opt.tlsCertificate, *s3opt.tlsPrivateKey); err != nil {
|
||||||
glog.Fatalf("S3 API Server Fail to serve: %v", err)
|
glog.Fatalf("S3 API Server Fail to serve: %v", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@@ -251,9 +255,9 @@ func (s3opt *S3Options) startS3Server() bool {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
glog.V(0).Infof("Start Seaweed S3 API Server %s at http port %d", util.Version(), *s3opt.port)
|
glog.V(0).Infof("Start Seaweed S3 API Server %s at http port %d", util.Version(), *s3opt.port)
|
||||||
if s3ApiLocalListner != nil {
|
if s3ApiLocalListener != nil {
|
||||||
go func() {
|
go func() {
|
||||||
if err = httpS.Serve(s3ApiLocalListner); err != nil {
|
if err = httpS.Serve(s3ApiLocalListener); err != nil {
|
||||||
glog.Fatalf("S3 API Server Fail to serve: %v", err)
|
glog.Fatalf("S3 API Server Fail to serve: %v", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ var cmdScaffold = &Command{
|
|||||||
export WEED_MYSQL_PASSWORD=some_password
|
export WEED_MYSQL_PASSWORD=some_password
|
||||||
Environment variable rules:
|
Environment variable rules:
|
||||||
* Prefix the variable name with "WEED_"
|
* Prefix the variable name with "WEED_"
|
||||||
* Upppercase the reset of variable name.
|
* Uppercase the reset of variable name.
|
||||||
* Replace '.' with '_'
|
* Replace '.' with '_'
|
||||||
|
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ dialTimeOut = 10
|
|||||||
# To add path-specific filer store:
|
# To add path-specific filer store:
|
||||||
#
|
#
|
||||||
# 1. Add a name following the store type separated by a dot ".". E.g., cassandra.tmp
|
# 1. Add a name following the store type separated by a dot ".". E.g., cassandra.tmp
|
||||||
# 2. Add a location configuraiton. E.g., location = "/tmp/"
|
# 2. Add a location configuration. E.g., location = "/tmp/"
|
||||||
# 3. Copy and customize all other configurations.
|
# 3. Copy and customize all other configurations.
|
||||||
# Make sure they are not the same if using the same store type!
|
# Make sure they are not the same if using the same store type!
|
||||||
# 4. Set enabled to true
|
# 4. Set enabled to true
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# send and receive filer updates for each file to an external message queue
|
# send and receive filer updates for each file to an external message queue
|
||||||
####################################################
|
####################################################
|
||||||
[notification.log]
|
[notification.log]
|
||||||
# this is only for debugging perpose and does not work with "weed filer.replicate"
|
# this is only for debugging purpose and does not work with "weed filer.replicate"
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -92,10 +92,11 @@ func init() {
|
|||||||
masterOptions.volumeSizeLimitMB = cmdServer.Flag.Uint("master.volumeSizeLimitMB", 30*1000, "Master stops directing writes to oversized volumes.")
|
masterOptions.volumeSizeLimitMB = cmdServer.Flag.Uint("master.volumeSizeLimitMB", 30*1000, "Master stops directing writes to oversized volumes.")
|
||||||
masterOptions.volumePreallocate = cmdServer.Flag.Bool("master.volumePreallocate", false, "Preallocate disk space for volumes.")
|
masterOptions.volumePreallocate = cmdServer.Flag.Bool("master.volumePreallocate", false, "Preallocate disk space for volumes.")
|
||||||
masterOptions.defaultReplication = cmdServer.Flag.String("master.defaultReplication", "", "Default replication type if not specified.")
|
masterOptions.defaultReplication = cmdServer.Flag.String("master.defaultReplication", "", "Default replication type if not specified.")
|
||||||
masterOptions.garbageThreshold = cmdServer.Flag.Float64("garbageThreshold", 0.3, "threshold to vacuum and reclaim spaces")
|
masterOptions.garbageThreshold = cmdServer.Flag.Float64("master.garbageThreshold", 0.3, "threshold to vacuum and reclaim spaces")
|
||||||
masterOptions.metricsAddress = cmdServer.Flag.String("metrics.address", "", "Prometheus gateway address")
|
masterOptions.metricsAddress = cmdServer.Flag.String("master.metrics.address", "", "Prometheus gateway address")
|
||||||
masterOptions.metricsIntervalSec = cmdServer.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds")
|
masterOptions.metricsIntervalSec = cmdServer.Flag.Int("master.metrics.intervalSeconds", 15, "Prometheus push interval in seconds")
|
||||||
masterOptions.raftResumeState = cmdServer.Flag.Bool("resumeState", false, "resume previous state on start master server")
|
masterOptions.raftResumeState = cmdServer.Flag.Bool("master.resumeState", false, "resume previous state on start master server")
|
||||||
|
masterOptions.raftHashicorp = cmdServer.Flag.Bool("master.raftHashicorp", false, "use hashicorp raft")
|
||||||
masterOptions.heartbeatInterval = cmdServer.Flag.Duration("master.heartbeatInterval", 300*time.Millisecond, "heartbeat interval of master servers, and will be randomly multiplied by [1, 1.25)")
|
masterOptions.heartbeatInterval = cmdServer.Flag.Duration("master.heartbeatInterval", 300*time.Millisecond, "heartbeat interval of master servers, and will be randomly multiplied by [1, 1.25)")
|
||||||
masterOptions.electionTimeout = cmdServer.Flag.Duration("master.electionTimeout", 10*time.Second, "election timeout of master servers")
|
masterOptions.electionTimeout = cmdServer.Flag.Duration("master.electionTimeout", 10*time.Second, "election timeout of master servers")
|
||||||
|
|
||||||
@@ -124,14 +125,16 @@ func init() {
|
|||||||
serverOptions.v.readMode = cmdServer.Flag.String("volume.readMode", "proxy", "[local|proxy|redirect] how to deal with non-local volume: 'not found|read in remote node|redirect volume location'.")
|
serverOptions.v.readMode = cmdServer.Flag.String("volume.readMode", "proxy", "[local|proxy|redirect] how to deal with non-local volume: 'not found|read in remote node|redirect volume location'.")
|
||||||
serverOptions.v.compactionMBPerSecond = cmdServer.Flag.Int("volume.compactionMBps", 0, "limit compaction speed in mega bytes per second")
|
serverOptions.v.compactionMBPerSecond = cmdServer.Flag.Int("volume.compactionMBps", 0, "limit compaction speed in mega bytes per second")
|
||||||
serverOptions.v.fileSizeLimitMB = cmdServer.Flag.Int("volume.fileSizeLimitMB", 256, "limit file size to avoid out of memory")
|
serverOptions.v.fileSizeLimitMB = cmdServer.Flag.Int("volume.fileSizeLimitMB", 256, "limit file size to avoid out of memory")
|
||||||
|
serverOptions.v.ldbTimeout = cmdServer.Flag.Int64("volume.index.leveldbTimeout", 0, "alive time for leveldb (default to 0). If leveldb of volume is not accessed in ldbTimeout hours, it will be off loaded to reduce opened files and memory consumption.")
|
||||||
serverOptions.v.concurrentUploadLimitMB = cmdServer.Flag.Int("volume.concurrentUploadLimitMB", 64, "limit total concurrent upload size")
|
serverOptions.v.concurrentUploadLimitMB = cmdServer.Flag.Int("volume.concurrentUploadLimitMB", 64, "limit total concurrent upload size")
|
||||||
serverOptions.v.concurrentDownloadLimitMB = cmdServer.Flag.Int("volume.concurrentDownloadLimitMB", 64, "limit total concurrent download size")
|
serverOptions.v.concurrentDownloadLimitMB = cmdServer.Flag.Int("volume.concurrentDownloadLimitMB", 64, "limit total concurrent download size")
|
||||||
serverOptions.v.publicUrl = cmdServer.Flag.String("volume.publicUrl", "", "publicly accessible address")
|
serverOptions.v.publicUrl = cmdServer.Flag.String("volume.publicUrl", "", "publicly accessible address")
|
||||||
serverOptions.v.preStopSeconds = cmdServer.Flag.Int("volume.preStopSeconds", 10, "number of seconds between stop send heartbeats and stop volume server")
|
serverOptions.v.preStopSeconds = cmdServer.Flag.Int("volume.preStopSeconds", 10, "number of seconds between stop send heartbeats and stop volume server")
|
||||||
serverOptions.v.pprof = cmdServer.Flag.Bool("volume.pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
|
serverOptions.v.pprof = cmdServer.Flag.Bool("volume.pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
|
||||||
serverOptions.v.idxFolder = cmdServer.Flag.String("volume.dir.idx", "", "directory to store .idx files")
|
serverOptions.v.idxFolder = cmdServer.Flag.String("volume.dir.idx", "", "directory to store .idx files")
|
||||||
serverOptions.v.enableTcp = cmdServer.Flag.Bool("volume.tcp", false, "<exprimental> enable tcp port")
|
|
||||||
serverOptions.v.inflightUploadDataTimeout = cmdServer.Flag.Duration("volume.inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
|
serverOptions.v.inflightUploadDataTimeout = cmdServer.Flag.Duration("volume.inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
|
||||||
|
serverOptions.v.hasSlowRead = cmdServer.Flag.Bool("volume.hasSlowRead", true, "<experimental> if true, this prevents slow reads from blocking other requests, but large file read P99 latency will increase.")
|
||||||
|
serverOptions.v.readBufferSizeMB = cmdServer.Flag.Int("volume.readBufferSizeMB", 4, "<experimental> larger values can optimize query performance but will increase some memory usage,Use with hasSlowRead normally")
|
||||||
|
|
||||||
s3Options.port = cmdServer.Flag.Int("s3.port", 8333, "s3 server http listen port")
|
s3Options.port = cmdServer.Flag.Int("s3.port", 8333, "s3 server http listen port")
|
||||||
s3Options.portGrpc = cmdServer.Flag.Int("s3.port.grpc", 0, "s3 server grpc listen port")
|
s3Options.portGrpc = cmdServer.Flag.Int("s3.port.grpc", 0, "s3 server grpc listen port")
|
||||||
@@ -230,7 +233,7 @@ func runServer(cmd *Command, args []string) bool {
|
|||||||
webdavOptions.filer = &filerAddress
|
webdavOptions.filer = &filerAddress
|
||||||
mqBrokerOptions.filerGroup = filerOptions.filerGroup
|
mqBrokerOptions.filerGroup = filerOptions.filerGroup
|
||||||
|
|
||||||
go stats_collect.StartMetricsServer(*serverMetricsHttpPort)
|
go stats_collect.StartMetricsServer(*serverBindIp, *serverMetricsHttpPort)
|
||||||
|
|
||||||
folders := strings.Split(*volumeDataFolders, ",")
|
folders := strings.Split(*volumeDataFolders, ",")
|
||||||
|
|
||||||
|
|||||||
+5
-16
@@ -52,7 +52,7 @@ type githubError struct {
|
|||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
//default version is not full version
|
// default version is not full version
|
||||||
var isFullVersion = false
|
var isFullVersion = false
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -69,7 +69,7 @@ func init() {
|
|||||||
path, _ := os.Executable()
|
path, _ := os.Executable()
|
||||||
_, name := filepath.Split(path)
|
_, name := filepath.Split(path)
|
||||||
updateOpt.dir = cmdUpdate.Flag.String("dir", filepath.Dir(path), "directory to save new weed.")
|
updateOpt.dir = cmdUpdate.Flag.String("dir", filepath.Dir(path), "directory to save new weed.")
|
||||||
updateOpt.name = cmdUpdate.Flag.String("name", name, "name of new weed. On windows, name shouldn't be same to the orignial name.")
|
updateOpt.name = cmdUpdate.Flag.String("name", name, "name of new weed. On windows, name shouldn't be same to the original name.")
|
||||||
updateOpt.Version = cmdUpdate.Flag.String("version", "0", "specific version of weed you want to download. If not specified, get the latest version.")
|
updateOpt.Version = cmdUpdate.Flag.String("version", "0", "specific version of weed you want to download. If not specified, get the latest version.")
|
||||||
cmdUpdate.Run = runUpdate
|
cmdUpdate.Run = runUpdate
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ func runUpdate(cmd *Command, args []string) bool {
|
|||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
if target == path {
|
if target == path {
|
||||||
glog.Fatalf("On windows, name of the new weed shouldn't be same to the orignial name.")
|
glog.Fatalf("On windows, name of the new weed shouldn't be same to the original name.")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,6 +199,7 @@ func GitHubLatestRelease(ctx context.Context, ver string, owner, repo string) (R
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return Release{}, err
|
return Release{}, err
|
||||||
}
|
}
|
||||||
|
defer util.CloseResponse(res)
|
||||||
|
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
content := res.Header.Get("Content-Type")
|
content := res.Header.Get("Content-Type")
|
||||||
@@ -211,17 +212,10 @@ func GitHubLatestRelease(ctx context.Context, ver string, owner, repo string) (R
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = res.Body.Close()
|
|
||||||
return Release{}, fmt.Errorf("unexpected status %v (%v) returned", res.StatusCode, res.Status)
|
return Release{}, fmt.Errorf("unexpected status %v (%v) returned", res.StatusCode, res.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
buf, err := ioutil.ReadAll(res.Body)
|
buf, err := ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
|
||||||
_ = res.Body.Close()
|
|
||||||
return Release{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = res.Body.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Release{}, err
|
return Release{}, err
|
||||||
}
|
}
|
||||||
@@ -265,18 +259,13 @@ func getGithubData(ctx context.Context, url string) ([]byte, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer util.CloseResponse(res)
|
||||||
|
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
return nil, fmt.Errorf("unexpected status %v (%v) returned", res.StatusCode, res.Status)
|
return nil, fmt.Errorf("unexpected status %v (%v) returned", res.StatusCode, res.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
buf, err := ioutil.ReadAll(res.Body)
|
buf, err := ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
|
||||||
_ = res.Body.Close()
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = res.Body.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
||||||
//set true if gtags are set
|
// set true if gtags are set
|
||||||
func init() {
|
func init() {
|
||||||
isFullVersion = true
|
isFullVersion = true
|
||||||
}
|
}
|
||||||
@@ -4,11 +4,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/operation"
|
"github.com/seaweedfs/seaweedfs/weed/operation"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||||
@@ -130,7 +131,7 @@ func runUpload(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func readMasterConfiguration(grpcDialOption grpc.DialOption, masterAddress pb.ServerAddress) (replication string, err error) {
|
func readMasterConfiguration(grpcDialOption grpc.DialOption, masterAddress pb.ServerAddress) (replication string, err error) {
|
||||||
err = pb.WithMasterClient(false, masterAddress, grpcDialOption, func(client master_pb.SeaweedClient) error {
|
err = pb.WithMasterClient(false, masterAddress, grpcDialOption, false, func(client master_pb.SeaweedClient) error {
|
||||||
resp, err := client.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{})
|
resp, err := client.GetMasterConfiguration(context.Background(), &master_pb.GetMasterConfigurationRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("get master %s configuration: %v", masterAddress, err)
|
return fmt.Errorf("get master %s configuration: %v", masterAddress, err)
|
||||||
|
|||||||
Loaded 100 of 444 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user