Using NFS

This section describes how to copy data from an HDFS cluster to a MapR cluster using NFS.

If NFS is installed on the MapR cluster, you can mount the MapR cluster to the HDFS cluster and then copy files from one cluster to the other using hadoop distcp. If you do not have NFS installed and a mount point configured, see Accessing Data with NFS and Setting Up MapR NFS.

To perform a copy using distcp via NFS, you need the following information:

To copy data from HDFS to filesystem using NFS, complete the following steps:

  1. Issue the following command to mount the MapR cluster to the HDFS NFS mount point:
    mount <MapR NFS Server>:/<maprfs_nfs_mount> /<hdfs_nfs_mount>
    For example:
    mount 10.10.100.175:/mapr /hdfsmount
  2. Issue the following command to copy data from the HDFS cluster to the MapR cluster:
    hadoop distcp hdfs://<NameNode>:<NameNode Port>/<HDFS path> file:///<hdfs_nfs_mount>/<MapR-FS path>
    For example:
    hadoop distcp hdfs://nn1:8020/user/sara/file.txt file:///hdfsmount/user/sara
  3. Issue the following command from the MapR cluster to verify that the file was copied to the MapR cluster:
    hadoop fs -ls /<MapR-FS path>
    For example:
    hadoop fs -ls /user/sara