Eclipse忽略条件断点(java for hadoop)

时间:2018-12-16 02:02:13

标签: java eclipse hadoop conditional breakpoints

这是我的Java代码:

public class MoviesReviewsMapper extends Mapper <LongWritable, Text, Text, Text>
{
    public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException
    {

        String [] tokens = value.toString().split("::");        
        context.write(new Text(tokens[2]), new Text(tokens[0]));
    }
}

这是一个有条件的断点:

Conditional breakpoint

Eciplse / SDK的版本为v4.7.0。有什么问题吗?

1 个答案:

答案 0 :(得分:0)

像这样比较您的字符串:

"1".equals(tokens[2])

问题在于您正在比较变量引用,而不是对象本身。