+ ". Expected " + key.getChecksum(),
key.getOffset());
}
long tempTime = System.currentTimeMillis();
CamusWrapper wrapper;
try {
wrapper = getWrappedRecord(key.getTopic(), bytes);
} catch (Exception e) {
if (exceptionCount < getMaximumDecoderExceptionsToPrint(context)) {
mapperContext.write(key, new ExceptionWritable(e));
exceptionCount++;
} else if (exceptionCount == getMaximumDecoderExceptionsToPrint(context)) {
exceptionCount = Integer.MAX_VALUE; //Any random value
log.info("The same exception has occured for more than " + getMaximumDecoderExceptionsToPrint(context) + " records. All further exceptions will not be printed");
}
continue;
}
if (wrapper == null) {
mapperContext.write(key, new ExceptionWritable(new RuntimeException(
"null record")));
continue;
}
long timeStamp = wrapper.getTimestamp();
try {
key.setTime(timeStamp);
key.addAllPartitionMap(wrapper.getPartitionMap());
setServerService();
} catch (Exception e) {
mapperContext.write(key, new ExceptionWritable(e));
continue;
}