Actually dfs.data.dir and dfs.name.dir have to point to two different directories.
Also make sure you have formatted the namenode FS after changing the directories in the configuration.
In your case while copying to HDFS you're incorrectly specifying the target.
The correct syntax for copying a local file to HDFS is:
bin/hadoop dfs -copyFromLocal <local_FS_filename> <target_on_HDFS>
Correct syntax in your case
bin/hadoop dfs -copyFromLocal /home/user1/ml-100k/sample.data <hdfs directory>