-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-7003. Tweak read-replicas tool to be compatible with EC replication type #7528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+262
−7
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bc8dc6b
add if clause in case of EC replicas in RpcClent.java
len548 1104f7c
Tweaked read-replicas to handle EC replicated keys and added robot tests
len548 e873c4d
avoided using '*' form of import
len548 24a10b1
fixed checkstyle
len548 f0ef696
Merge remote-tracking branch 'origin/master' into HDDS-7003
adoroszlai 37d4d74
Undo unecessary removal and insertion of lines, and add javadocs
len548 f81fb9f
Merge branch 'HDDS-7003' of github.com:len548/ozone into HDDS-7003
len548 d8b361e
remove unnecessary line
len548 e0fb1e5
Merged master
len548 512ee5b
Add EC replica tests to replicas-test.sh
len548 48f0443
Make internalBlockLength method public.
len548 c2fefa3
Fixed checkstyle.
len548 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests-ec3-2.robot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| *** Settings *** | ||
| Documentation Test ozone Debug CLI for EC(3,2) replicated keys | ||
| Library OperatingSystem | ||
| Library Process | ||
| Resource ../lib/os.robot | ||
| Resource ozone-debug.robot | ||
| Test Timeout 5 minute | ||
| Suite Setup Create Volume Bucket | ||
|
|
||
| *** Variables *** | ||
| ${PREFIX} ${EMPTY} | ||
| ${VOLUME} cli-debug-volume${PREFIX} | ||
| ${BUCKET} cli-debug-bucket | ||
| ${TESTFILE} testfile | ||
| ${EC_DATA} 3 | ||
| ${EC_PARITY} 2 | ||
|
|
||
| *** Keywords *** | ||
| Create Volume Bucket | ||
| Execute ozone sh volume create o3://om/${VOLUME} | ||
| Execute ozone sh bucket create o3://om/${VOLUME}/${BUCKET} | ||
|
|
||
| Create EC key | ||
| [arguments] ${bs} ${count} | ||
|
|
||
| Execute dd if=/dev/urandom of=${TEMP_DIR}/testfile bs=${bs} count=${count} | ||
| Execute ozone sh key put o3://om/${VOLUME}/${BUCKET}/testfile ${TEMP_DIR}/testfile -r rs-${EC_DATA}-${EC_PARITY}-1024k -t EC | ||
dombizita marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| *** Test Cases *** | ||
| 0 data block | ||
| Create EC key 1000 0 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 1 | ||
|
|
||
| 1 data block | ||
| Create EC key 1048576 1 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 6 | ||
| ${sum_size} = Evaluate 1048576 * 3 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 2 data blocks | ||
| Create EC key 1048576 2 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${sum_size} = Evaluate 1048576 * 4 | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 6 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 3 data blocks | ||
| Create EC key 1048576 3 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${sum_size} = Evaluate 1048576 * 5 | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 6 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 3 data blocks and partial stripe | ||
| Create EC key 1000000 4 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 5 | ||
| ${sum_size_last_stripe} = Evaluate ((1000000 * 4) % 1048576) * 3 | ||
| Should Be Equal As Integers ${count_files} 11 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
| Verify Healthy EC Replica ${directory} 2 ${sum_size_last_stripe} | ||
|
|
||
| 4 data blocks and partial stripe | ||
| Create EC key 1000000 5 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 5 | ||
| ${sum_size_last_stripe} = Evaluate 1048576 * 3 + ((1000000 * 5) % 1048576) | ||
| Should Be Equal As Integers ${count_files} 11 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
| Verify Healthy EC Replica ${directory} 2 ${sum_size_last_stripe} | ||
|
|
||
| 6 data blocks | ||
| Create EC key 1048576 6 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 5 | ||
| Should Be Equal As Integers ${count_files} 11 | ||
| FOR ${block} IN RANGE 1 3 | ||
| Verify Healthy EC Replica ${directory} ${block} ${sum_size} | ||
| END | ||
112 changes: 112 additions & 0 deletions
112
hadoop-ozone/dist/src/main/smoketest/debug/ozone-debug-tests-ec6-3.robot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| *** Settings *** | ||
| Documentation Test ozone Debug CLI for EC(6,3) replicated key | ||
| Library OperatingSystem | ||
| Library Process | ||
| Resource ../lib/os.robot | ||
| Resource ozone-debug.robot | ||
| Test Timeout 5 minute | ||
|
|
||
| *** Variables *** | ||
| ${PREFIX} ${EMPTY} | ||
| ${VOLUME} cli-debug-volume${PREFIX} | ||
| ${BUCKET} cli-debug-bucket | ||
| ${TESTFILE} testfile | ||
| ${EC_DATA} 6 | ||
| ${EC_PARITY} 3 | ||
|
|
||
| *** Keywords *** | ||
| Create EC key | ||
| [arguments] ${bs} ${count} | ||
|
|
||
| Execute dd if=/dev/urandom of=${TEMP_DIR}/testfile bs=${bs} count=${count} | ||
| Execute ozone sh key put o3://om/${VOLUME}/${BUCKET}/testfile ${TEMP_DIR}/testfile -r rs-${EC_DATA}-${EC_PARITY}-1024k -t EC | ||
|
|
||
| *** Test Cases *** | ||
| 0 data block | ||
| Create EC key 1048576 0 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 1 | ||
|
|
||
| 1 data block | ||
| Create EC key 1048576 1 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| ${sum_size} = Evaluate 1048576 * 4 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 2 data blocks | ||
| Create EC key 1048576 2 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${sum_size} = Evaluate 1048576 * 5 | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 3 data blocks | ||
| Create EC key 1048576 3 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${sum_size} = Evaluate 1048576 * 6 | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 4 data blocks | ||
| Create EC key 1048576 4 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 7 | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 5 data blocks | ||
| Create EC key 1048576 5 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 8 | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 6 data blocks | ||
| Create EC key 1048576 6 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 9 | ||
| Should Be Equal As Integers ${count_files} 10 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
|
|
||
| 6 data blocks and partial stripe | ||
| Create EC key 1000000 7 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 9 | ||
| ${sum_size_last_stripe} = Evaluate ((1000000 * 7) % 1048576) * 4 | ||
| Should Be Equal As Integers ${count_files} 19 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
| Verify Healthy EC Replica ${directory} 2 ${sum_size_last_stripe} | ||
|
|
||
| 7 data blocks and partial stripe | ||
| Create EC key 1000000 8 | ||
| ${directory} = Execute read-replicas CLI tool | ||
| ${count_files} = Count Files In Directory ${directory} | ||
| ${sum_size} = Evaluate 1048576 * 9 | ||
| ${sum_size_last_stripe} = Evaluate 1048576 * 4 + ((1000000 * 8) % 1048576) | ||
| Should Be Equal As Integers ${count_files} 19 | ||
| Verify Healthy EC Replica ${directory} 1 ${sum_size} | ||
| Verify Healthy EC Replica ${directory} 2 ${sum_size_last_stripe} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.