本文整理了Java中kafka.message.Message.payloadSize()
方法的一些代码示例,展示了Message.payloadSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.payloadSize()
方法的具体详情如下:
包路径:kafka.message.Message
类名称:Message
方法名:payloadSize
暂无
代码示例来源:origin: apache/incubator-pinot
public int getMessageLengthAtIndex(int index) {
return messageList.get(index).message().payloadSize();
}
代码示例来源:origin: prestodb/presto
private boolean nextRow(MessageAndOffset messageAndOffset)
totalBytes += messageAndOffset.message().payloadSize();
totalMessages++;
代码示例来源:origin: apache/apex-malhar
protected final void putMessage(KafkaPartition partition, Message msg, long offset) throws InterruptedException
{
// block from receiving more message
holdingBuffer.put(new KafkaMessage(partition, msg, offset));
statsSnapShot.mark(partition, msg.payloadSize());
}
代码示例来源:origin: org.apache.apex/malhar-contrib
final protected void putMessage(KafkaPartition partition, Message msg, long offset) throws InterruptedException{
// block from receiving more message
holdingBuffer.put(new KafkaMessage(partition, msg, offset));
statsSnapShot.mark(partition, msg.payloadSize());
}
代码示例来源:origin: prestosql/presto
private boolean nextRow(MessageAndOffset messageAndOffset)
totalBytes += messageAndOffset.message().payloadSize();
totalMessages++;
代码示例来源:origin: caskdata/cdap
metricsContext.increment("kafka.bytes.read", message.message().payloadSize());
ILoggingEvent loggingEvent = serializer.fromBytes(message.message().payload());
eventQueue.add(loggingEvent, loggingEvent.getTimeStamp(), message.message().payloadSize(), partition,
new OffsetTime(message.nextOffset(), loggingEvent.getTimeStamp()));
} catch (IOException e) {
代码示例来源:origin: co.cask.cdap/cdap-watchdog
metricsContext.increment("kafka.bytes.read", message.message().payloadSize());
ILoggingEvent loggingEvent = serializer.fromBytes(message.message().payload());
eventQueue.add(loggingEvent, loggingEvent.getTimeStamp(), message.message().payloadSize(), partition,
new OffsetTime(message.nextOffset(), loggingEvent.getTimeStamp()));
} catch (IOException e) {
代码示例来源:origin: michal-harish/kafka-hadoop-loader
value.setSize(0);
} else {
value.set(message.payload().array(), message.payload().arrayOffset(), message.payloadSize());
内容来源于网络,如有侵权,请联系作者删除!