mirror of https://github.com/apache/druid.git
Merge pull request #332 from liquidm/improve-kafka
improve kafka intake stability
This commit is contained in:
commit
4a07f02cb5
|
@ -107,8 +107,16 @@ public class KafkaEightFirehoseFactory implements FirehoseFactory
|
|||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return parser.parse(ByteBuffer.wrap(message));
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new FormattedException.Builder()
|
||||
.withErrorCode(FormattedException.ErrorCode.UNPARSABLE_ROW)
|
||||
.withMessage(String.format("Error parsing[%s], got [%s]", ByteBuffer.wrap(message), e.toString()))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable commit()
|
||||
|
|
|
@ -120,8 +120,16 @@ public class KafkaSevenFirehoseFactory implements FirehoseFactory
|
|||
|
||||
public InputRow parseMessage(Message message) throws FormattedException
|
||||
{
|
||||
try {
|
||||
return parser.parse(message.payload());
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new FormattedException.Builder()
|
||||
.withErrorCode(FormattedException.ErrorCode.UNPARSABLE_ROW)
|
||||
.withMessage(String.format("Error parsing[%s], got [%s]", message.payload(), e.toString()))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable commit()
|
||||
|
|
Loading…
Reference in New Issue