ChenSammi commented on code in PR #7236:
URL: https://github.com/apache/ozone/pull/7236#discussion_r1822021767
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/OzoneClientConfig.java:
##########
@@ -39,6 +39,51 @@ public class OzoneClientConfig {
private static final Logger LOG =
LoggerFactory.getLogger(OzoneClientConfig.class);
+ public static final String OZONE_READ_SHORT_CIRCUIT =
"ozone.client.read.short-circuit";
+ public static final boolean OZONE_READ_SHORT_CIRCUIT_DEFAULT = false;
+ public static final String OZONE_DOMAIN_SOCKET_PATH =
"ozone.domain.socket.path";
+ public static final String OZONE_DOMAIN_SOCKET_PATH_DEFAULT =
"/var/lib/ozone/dn_socket";
+ public static final String SHORT_CIRCUIT_PREFIX = "read.short-circuit.";
+ public static final int DATA_TRANSFER_VERSION = 28;
+
+ @Config(key = "read.short-circuit",
+ defaultValue = "false",
+ type = ConfigType.BOOLEAN,
+ description = "Whether read short-circuit is enabled or not",
+ tags = { ConfigTag.CLIENT, ConfigTag.DATANODE })
+ private boolean shortCircuitEnabled = OZONE_READ_SHORT_CIRCUIT_DEFAULT;
+
+ @Config(key = SHORT_CIRCUIT_PREFIX + "buffer.size",
+ defaultValue = "128KB",
+ type = ConfigType.SIZE,
+ description = "Buffer size of reader/writer.",
+ tags = { ConfigTag.CLIENT, ConfigTag.DATANODE })
+ private int shortCircuitBufferSize = 128 * 1024;
Review Comment:
The short-circuit channel only exchange getBlock request and response. The
value is determined by how big will a request and a response of a 256MB block
size, 4MB chunk size, 16KB checksum size block. The request is round 500
bytes, and the response is around
30 + 53 * 64 + 6 * 16384 ~ 100k
block size (exclude chunks) - 30 bytes
chunk size (one checksums) - 53 bytes
one checksum size - 6 bytes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]