diff --git a/dynamometer-blockgen/src/main/java/com/linkedin/dynamometer/blockgenerator/XMLParserMapper.java b/dynamometer-blockgen/src/main/java/com/linkedin/dynamometer/blockgenerator/XMLParserMapper.java index c6b694e1e7..6f68e88f47 100644 --- a/dynamometer-blockgen/src/main/java/com/linkedin/dynamometer/blockgenerator/XMLParserMapper.java +++ b/dynamometer-blockgen/src/main/java/com/linkedin/dynamometer/blockgenerator/XMLParserMapper.java @@ -49,7 +49,13 @@ public void setup(Mapper.Context context) { public void map(LongWritable lineNum, Text line, Mapper.Context context) throws IOException, InterruptedException { - List blockInfos = parser.parseLine(line.toString()); + List blockInfos; + try { + blockInfos = parser.parseLine(line.toString()); + } catch (IOException e) { + throw new IOException(String.format("IOException %s happened for line %s", e.getMessage(), line)); + } + for (BlockInfo blockInfo : blockInfos) { for (short i = 0; i < blockInfo.getReplication(); i++) { context.write(new IntWritable((blockIndex + i) % numDataNodes), blockInfo);