这是我的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]));
}
}
这是一个条件断点:
Eciplse / SDK的版本是v4.7.0。有什么问题?
最佳答案
像这样比较您的字符串:
"1".equals(tokens[2])
问题在于您正在比较变量引用,而不是对象本身。
关于java - Eclipse会忽略条件断点(java for hadoop),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53798844/