Skip to content
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

Hdds fscheck cli impl #5

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8ca33c7
HDDS-11414. Key listing for FSO buckets fails with forward client (#7…
tanvipenumudy Sep 9, 2024
9477aa6
HDDS-11436. Minor update in Recon API handling. (#7178)
ArafatKhan2198 Sep 10, 2024
33dbd4a
HDDS-11357. Datanode Usageinfo Support Display Pipeline. (#7105)
slfan1989 Sep 10, 2024
883a63f
HDDS-11441. ozone sh key put should only accept positive expectedGene…
adoroszlai Sep 10, 2024
86fe920
HDDS-11376. Improve ReplicationSupervisor to record replication metri…
jianghuazhu Sep 10, 2024
0f16195
HDDS-11416. refactor ratis submit request avoid code duplicate (#7166)
sumitagrawl Sep 11, 2024
0915f0b
HDDS-10985. EC Reconstruction failed because the size of currentChunk…
slfan1989 Sep 11, 2024
4b47812
HDDS-11389. Incorrect number of deleted containers shown in Recon UI.…
ArafatKhan2198 Sep 11, 2024
cd251f2
HDDS-11438. Ensure DataInputBuffer is closed in OMPBHelper#convert (#…
len548 Sep 11, 2024
0e49f7a
HDDS-11449. Remove unnecessary log from client console. (#7184)
ashishkumar50 Sep 11, 2024
e573701
HDDS-11448. Improve documentation in ContainerStateMachine (#7183)
jianghuazhu Sep 11, 2024
d221065
HDDS-11440. Add a lastTransactionInfo field in SnapshotInfo to check …
swamirishi Sep 12, 2024
703c4d5
HDDS-10984. Tool to restore SCM certificates from RocksDB. (#6781)
sadanand48 Sep 13, 2024
5feb9ea
HDDS-11453. OmSnapshotPurge should be in a different ozone manager do…
swamirishi Sep 13, 2024
a7d7e37
HDDS-11456. Require successful dependency/licence checks for acceptan…
adoroszlai Sep 13, 2024
50f2563
HDDS-11419. Fix waitForCheckpointDirectoryExist log message (#7199)
devabhishekpal Sep 14, 2024
10c47a1
HDDS-11459. Bump develocity-maven-extension to 1.22.1 (#7201)
dependabot[bot] Sep 15, 2024
9f5bf43
HDDS-11457. Internal error on S3 CompleteMultipartUpload if parts are…
adoroszlai Sep 16, 2024
22ddfb9
Revert "HDDS-11456. Require successful dependency/licence checks for …
adoroszlai Sep 16, 2024
e0060a8
HDDS-11196. Improve SCM WebUI Display (#6960)
slfan1989 Sep 17, 2024
88dd436
HDDS-11423. Implement equals operation for --filter option to ozone l…
Tejaskriya Sep 17, 2024
c365aa0
HDDS-11181. Cleanup of unnecessary try-catch blocks (#7210)
nandakumar131 Sep 17, 2024
7a26aff
HDDS-11158. Improve Pipelines page UI (#7171)
devabhishekpal Sep 18, 2024
151709a
HDDS-11446. Downgrade picocli to 4.7.5 due to regression (#7215)
len548 Sep 18, 2024
70b8dd5
HDDS-11157. Improve Datanodes page UI (#7168)
devabhishekpal Sep 19, 2024
d3899d2
Clean up files created after TestKeyValueHandlerWithUnhealthyContaine…
chungen0126 Sep 19, 2024
2b196d1
HDDS-11468. Enabled DB sync button (#7216)
devabhishekpal Sep 20, 2024
45f9138
HDDS-11394. Fix pipeline close --all command (#7138)
juncevich Sep 20, 2024
40c4001
HDDS-10479. Add ozone admin ratis local raftMetaConf (#7170)
sarvekshayr Sep 20, 2024
719bdf9
HDDS-11396. NPE due to empty Handler#clusterId (#7145)
jianghuazhu Sep 20, 2024
8c0b54e
HDDS-11408. Snapshot rename table entries are propagated incorrectly …
swamirishi Sep 20, 2024
3598ee3
HDDS-11464. Removed unused constants from OzoneConsts. (#7207)
weimingdiit Sep 21, 2024
6c4b39f
Add new messages to datanode protocol.
ivanzlenko Aug 13, 2024
852baf9
Refactor code base
ivanzlenko Aug 16, 2024
c5c2c1e
Basic CLI command
ivanzlenko Sep 6, 2024
62410e9
The new Datanode API
ivanzlenko Sep 3, 2024
2909d40
CLI command implementation
ivanzlenko Sep 9, 2024
91f3ff2
Datanode API implementation
ivanzlenko Sep 25, 2024
b171fc1
Basic implementation of proto protocol
ivanzlenko Sep 25, 2024
1f9aef2
CLI command implementation
ivanzlenko Sep 9, 2024
89ae571
Implementation
ivanzlenko Sep 3, 2024
cd2386a
CLI command implementation
ivanzlenko Sep 9, 2024
2a37075
Tmp
ivanzlenko Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.22</version>
<version>1.22.1</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,22 @@ private XceiverClientReply sendCommandWithRetry(
List<DatanodeDetails> datanodeList = null;

DatanodeBlockID blockID = null;
if (request.getCmdType() == ContainerProtos.Type.GetBlock) {
switch (request.getCmdType()) {
case GetBlock:
blockID = request.getGetBlock().getBlockID();
} else if (request.getCmdType() == ContainerProtos.Type.ReadChunk) {
break;

case ReadChunk:
blockID = request.getReadChunk().getBlockID();
} else if (request.getCmdType() == ContainerProtos.Type.GetSmallFile) {
break;

case GetSmallFile:
blockID = request.getGetSmallFile().getBlock().getBlockID();
break;

case VerifyBlock:
blockID = request.getVerifyBlock().getBlockID();
break;
}

if (blockID != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -142,8 +146,34 @@ ContainerCommandResponseProto> executePutBlock(boolean close,
}

if (checksumBlockData != null) {
List<ChunkInfo> currentChunks = getContainerBlockData().getChunksList();

// For the same BlockGroupLength, we need to find the larger value of Block DataSize.
// This is because we do not send empty chunks to the DataNode, so the larger value is more accurate.
Map<Long, Optional<BlockData>> maxDataSizeByGroup = Arrays.stream(blockData)
.filter(Objects::nonNull)
.collect(Collectors.groupingBy(BlockData::getBlockGroupLength,
Collectors.maxBy(Comparator.comparingLong(BlockData::getSize))));
BlockData maxBlockData = maxDataSizeByGroup.get(blockGroupLength).get();

// When calculating the checksum size,
// We need to consider both blockGroupLength and the actual size of blockData.
//
// We use the smaller value to determine the size of the ChunkList.
//
// 1. In most cases, blockGroupLength is equal to the size of blockData.
// 2. Occasionally, blockData is not fully filled; if a chunk is empty,
// it is not sent to the DN, resulting in blockData size being smaller than blockGroupLength.
// 3. In cases with 'dirty data',
// if an error occurs when writing to the EC-Stripe (e.g., DN reports Container Closed),
// and the length confirmed with OM is smaller, blockGroupLength may be smaller than blockData size.
long blockDataSize = Math.min(maxBlockData.getSize(), blockGroupLength);
int chunkSize = (int) Math.ceil(((double) blockDataSize / repConfig.getEcChunkSize()));
List<ChunkInfo> checksumBlockDataChunks = checksumBlockData.getChunks();
if (chunkSize > 0) {
checksumBlockDataChunks = checksumBlockData.getChunks().subList(0, chunkSize);
}

List<ChunkInfo> currentChunks = getContainerBlockData().getChunksList();

Preconditions.checkArgument(
currentChunks.size() == checksumBlockDataChunks.size(),
Expand Down Expand Up @@ -269,7 +299,7 @@ public CompletableFuture<PutBlockResult> executePutBlock(boolean close,
throw ce;
});
} catch (IOException | ExecutionException e) {
throw new IOException(EXCEPTION_MSG + e.toString(), e);
throw new IOException(EXCEPTION_MSG + e, e);
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
handleInterruptedException(ex, false);
Expand Down
Loading
Loading