Transferring relational database into HDFS

Hello all, please tell me how can I transfer relational database into HDFS?

This can be done by using “Sqoop” which is a command-line interface application for transferring data between relational database and HDFS.
To setup scoop:

$ sqoop import -connect jdbc:mysql://localhost:3306/db1 -username root -password password --table tableName --target-dir /path/to/directoryName_in_HDFS

Sqoop can also be used to transfer data from HDFS to any other relational database system using the sqoop export tool.