backtype.storm.tuple.Tuple.getBinary()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中backtype.storm.tuple.Tuple.getBinary()方法的一些代码示例,展示了Tuple.getBinary()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tuple.getBinary()方法的具体详情如下:
包路径:backtype.storm.tuple.Tuple
类名称:Tuple
方法名:getBinary

Tuple.getBinary介绍

[英]Returns the byte array at position i in the tuple. If that field is not a byte array, you will get a runtime error.
[中]返回元组中位置i处的字节数组。如果该字段不是字节数组,则会出现运行时错误。

代码示例

代码示例来源:origin: OpenSOC/opensoc-streaming

original_message = tuple.getBinary(0);

代码示例来源:origin: OpenSOC/opensoc-streaming

/** {@inheritDoc} */

public void execute(Tuple input) {
 try {
  this.connector.getTable().put(conf.getPutFromTuple(input));
 } catch (IOException ex) {
    JSONObject error = ErrorGenerator.generateErrorMessage(
        "Alerts problem: " + input.getBinary(0), ex);
    collector.emit("error", new Values(error));
    
  throw new RuntimeException(ex);
 }
 if (this.autoAck) {
  this.collector.ack(input);
 }
}

代码示例来源:origin: OpenSOC/opensoc-streaming

packetInfoList = PcapParser.parse(input.getBinary(0));
  collector.emit("pcap_data_stream", new Values(packetInfo.getKey(),
    packetInfo.getPacketTimeInNanos() / timePrecisionDivisor,
    input.getBinary(0)));
     "Alerts problem: " + input.getBinary(0), e);
 collector.emit("error", new Values(error));

相关文章