For HDFS Transparency version 2.7.0-x
Short-circuit local read can only be enabled on Hadoop 2.7.0. HDFS Transparency versions 2.7.0-x does not support this feature in Hadoop 2.7.1/2.7.2. IBM® BigInsights® IOP 4.1 uses Hadoop version 2.7.1. Therefore, short circuit cannot be enabled over IBM BigInsights IOP 4.1 if HDFS Transparency 2.7.0-x is used. For more information on how to enable short-circuit read on other Hadoop versions, contact scale@us.ibm.com.
Configuring short-circuit local read
Before you begin
libhadoop.so and use the DFS
Client shipped by the IBM Storage® Scale HDFS transparency. The package name is gpfs.hdfs-protocol. You
cannot use standard HDFS DFS client to enable the short-circuit mode over the HDFS
transparency.About this task
To enable libhadoop.so, compile the native library on the target machine or use
the library shipped by IBM Storage Scale HDFS transparency. To compile the native library on the specific machine, do the
following steps:
Procedure
Enabling DFS client
About this task
To enable DFS client, perform the following procedure:
Procedure
Results
Short-circuit reads make use of a UNIX® domain socket. This is a special path in the file system that allows the client and the DataNodes to communicate. You need to set a path to this socket. The DataNode needs to be able to create this path. However, users other than the HDFS user or root must not be able to create this path. Therefore, paths under /var/run or /var/lib folders are often used.
<configuration>
<property>
<name>dfs.client.read.shortcircuit</name>
<value>true</value>
</property>
<property>
<name>dfs.domain.socket.path</name>
<value>/var/lib/hadoop-hdfs/dn_socket</value>
</property>
</configuration>#mkdir -p /var/lib/hadoop-hdfs
#chown root:root /var/lib/hadoop-hdfs
#touch /var/lib/hadoop-hdfs/${dfs.dome.socket.path}
#chmod 666 /var/lib/hadoop-hdfs/${dfs.dome.socket.path}The permission control in short-circuit reads is similar to the common user access in HDFS. If you have the permission to read the file, then you can access it through short-circuit read.