A tip to help you save a file with spaces in its name into HDFS: putting file from STDIN. One example is as follows:
date | hdfs dfs -put - "/path/file with space.txt"
For your example above, the command can be:
cat "/home/u1/testa/test a" | hdfs dfs -put -f - "/u1/testa/test\ a"
Then your file will be save into HDFS successfully with the space kept.
Note that if you would like to keep the mode of the file, you will need to set it explicitly using
hdfs dsf -chmod ....