Yes what you want is very much possible, what you need is a map only job. i.e a job which only a mapper but no reducer.
The way you can achieve it is by setting the number of reducers to 0 in your driver class.
job.setNumReduceTasks(0);
A more detailed blog on this topic can be found here
To generate a file per input line Consider using the hdfs api directly from your mapper namely FileSystem and FileStatus