I am new to Hadoop and writing mapreduce code and in mapper class i am using one if condition in following way:-
public class FilmDataMapperClass extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable>
{
    private Text word = new Text();
    public void map(LongWritable key, Text values,
            OutputCollector<Text, IntWritable> output, Reporter reporter)
            throws IOException
            {
                String line = values.toString();
                String [] data = line.split(",");
                word.set(data[3]);
                float rating = Float.valueOf(data[3]);
                if(rating > 3.0)
                {
                    output.collect(word, new IntWritable(1));
                }
            }
}
When i am using above code without any if condition then i am getting output but with if condition i am not getting any output.
Please tell me how to implement above to get desired output.