Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ public enum ChecksumCombineMode {
private String checksumType = ChecksumType.CRC32.name();

@Config(key = "bytes.per.checksum",
defaultValue = "1MB",
defaultValue = "16KB",
type = ConfigType.SIZE,
description = "Checksum will be computed for every bytes per checksum "
+ "number of bytes and stored sequentially. The minimum value for "
+ "this config is 16KB.",
+ "this config is 8KB.",
tags = { ConfigTag.CLIENT, ConfigTag.CRYPTO_COMPLIANCE })
private int bytesPerChecksum = 1024 * 1024;
private int bytesPerChecksum = 16 * 1024;

@Config(key = "verify.checksum",
defaultValue = "true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public final class OzoneConfigKeys {
"hdds.datanode.replication.work.dir";


public static final int OZONE_CLIENT_BYTES_PER_CHECKSUM_MIN_SIZE = 16 * 1024;
public static final int OZONE_CLIENT_BYTES_PER_CHECKSUM_MIN_SIZE = 8 * 1024;

public static final String OZONE_CLIENT_READ_TIMEOUT
= "ozone.client.read.timeout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static int getBufferCapacityForChunkRead(ChunkInfo chunkInfo,
} else {
// Set buffer capacity to checksum boundary size so that each buffer
// corresponds to one checksum. If checksum is NONE, then set buffer
// capacity to default (OZONE_CHUNK_READ_BUFFER_DEFAULT_SIZE_KEY = 64KB).
// capacity to default (OZONE_CHUNK_READ_BUFFER_DEFAULT_SIZE_KEY = 1MB).
ChecksumData checksumData = chunkInfo.getChecksumData();

if (checksumData != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ private void computeCompositeCrc() throws IOException {

// Bytes required to create a CRC
long bytesPerCrc = firstChunkInfo.getChecksumData().getBytesPerChecksum();
ECReplicationConfig replicationConfig =
(ECReplicationConfig) keyInfo.getReplicationConfig();
long chunkSize = replicationConfig.getEcChunkSize();
long chunkSize = firstChunkInfo.getLen();

//When EC chunk size is not a multiple of ozone.client.bytes.per.checksum
// (default = 1MB) the last checksum in an EC chunk is only generated for
// (default = 16KB) the last checksum in an EC chunk is only generated for
// offset.
long bytesPerCrcOffset = chunkSize % bytesPerCrc;

Expand Down