[ https://issues.apache.org/jira/browse/HDFS-8924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14703916#comment-14703916 ]
Colin Patrick McCabe commented on HDFS-8924: -------------------------------------------- This patch adds a pluggable {{ReplicaAccessorBuilder}} class which can be used to create {{ReplicaAccessor}} objects. Unlike {{BlockReader}}, {{ReplicaAccessor}} is a stable API which is decoupled from internal implementation details and non-public classes. {{BlockReaderFactory}} will ask all of the configured {{ReplicaAccessorBuilder}} objects to create a new {{ReplicaAccessor}}. If none are configured, or none can create one, we use the existing block reader code. Otherwise, we create an {{ExternalBlockReader}} wrapping the {{ReplicaAccessor}}. I also added a reserved {{DataTransferProtocol}} opcode (127) in {{Op.java}}. This will ensure that anyone adding a custom opcode will not conflict with other new opcodes added upstream. > Add pluggable interface for reading replicas in DFSClient > --------------------------------------------------------- > > Key: HDFS-8924 > URL: https://issues.apache.org/jira/browse/HDFS-8924 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs-client > Affects Versions: 2.8.0 > Reporter: Colin Patrick McCabe > Assignee: Colin Patrick McCabe > Attachments: HDFS-8924.001.patch > > > We should add a pluggable interface for reading replicas in the DFSClient. > This could be used to implement short-circuit reads on systems without file > descriptors, or for other optimizations. -- This message was sent by Atlassian JIRA (v6.3.4#6332)