public class StormTuple<IN> extends Object implements org.apache.storm.tuple.Tuple
StormTuple
converts a Flink tuple of type IN
into a Storm tuple.Constructor and Description |
---|
StormTuple(IN flinkTuple,
org.apache.storm.tuple.Fields schema,
int producerTaskId,
String producerStreamId,
String producerComponentId,
org.apache.storm.tuple.MessageId messageId)
Create a new Storm tuple from the given Flink tuple.
|
public StormTuple(IN flinkTuple, org.apache.storm.tuple.Fields schema, int producerTaskId, String producerStreamId, String producerComponentId, org.apache.storm.tuple.MessageId messageId)
flinkTuple
- The Flink tuple to be converted.schema
- The schema (ie, ordered field names) of the tuple.producerTaskId
- The task ID of the producer (a valid, ie, non-negative ID, implicates the truncation of the last
attribute of flinkTuple
).producerStreamId
- The input stream ID from which this tuple was received.producerComponentId
- The component ID of the producer.messageId
- The message ID of this tuple.public int size()
size
in interface org.apache.storm.tuple.ITuple
public boolean contains(String field)
contains
in interface org.apache.storm.tuple.ITuple
public org.apache.storm.tuple.Fields getFields()
getFields
in interface org.apache.storm.tuple.ITuple
public int fieldIndex(String field)
fieldIndex
in interface org.apache.storm.tuple.ITuple
public List<Object> select(org.apache.storm.tuple.Fields selector)
select
in interface org.apache.storm.tuple.ITuple
public Object getValue(int i)
getValue
in interface org.apache.storm.tuple.ITuple
public String getString(int i)
getString
in interface org.apache.storm.tuple.ITuple
public Integer getInteger(int i)
getInteger
in interface org.apache.storm.tuple.ITuple
public Long getLong(int i)
getLong
in interface org.apache.storm.tuple.ITuple
public Boolean getBoolean(int i)
getBoolean
in interface org.apache.storm.tuple.ITuple
public Short getShort(int i)
getShort
in interface org.apache.storm.tuple.ITuple
public Byte getByte(int i)
getByte
in interface org.apache.storm.tuple.ITuple
public Double getDouble(int i)
getDouble
in interface org.apache.storm.tuple.ITuple
public Float getFloat(int i)
getFloat
in interface org.apache.storm.tuple.ITuple
public byte[] getBinary(int i)
getBinary
in interface org.apache.storm.tuple.ITuple
public <T> T getValueByName(String field)
public Object getValueByField(String field)
getValueByField
in interface org.apache.storm.tuple.ITuple
public String getStringByField(String field)
getStringByField
in interface org.apache.storm.tuple.ITuple
public Integer getIntegerByField(String field)
getIntegerByField
in interface org.apache.storm.tuple.ITuple
public Long getLongByField(String field)
getLongByField
in interface org.apache.storm.tuple.ITuple
public Boolean getBooleanByField(String field)
getBooleanByField
in interface org.apache.storm.tuple.ITuple
public Short getShortByField(String field)
getShortByField
in interface org.apache.storm.tuple.ITuple
public Byte getByteByField(String field)
getByteByField
in interface org.apache.storm.tuple.ITuple
public Double getDoubleByField(String field)
getDoubleByField
in interface org.apache.storm.tuple.ITuple
public Float getFloatByField(String field)
getFloatByField
in interface org.apache.storm.tuple.ITuple
public byte[] getBinaryByField(String field)
getBinaryByField
in interface org.apache.storm.tuple.ITuple
public List<Object> getValues()
getValues
in interface org.apache.storm.tuple.ITuple
public org.apache.storm.generated.GlobalStreamId getSourceGlobalStreamid()
getSourceGlobalStreamid
in interface org.apache.storm.tuple.Tuple
public String getSourceComponent()
getSourceComponent
in interface org.apache.storm.tuple.Tuple
public int getSourceTask()
getSourceTask
in interface org.apache.storm.tuple.Tuple
public String getSourceStreamId()
getSourceStreamId
in interface org.apache.storm.tuple.Tuple
public org.apache.storm.tuple.MessageId getMessageId()
getMessageId
in interface org.apache.storm.tuple.Tuple
public org.apache.storm.generated.GlobalStreamId getSourceGlobalStreamId()
getSourceGlobalStreamId
in interface org.apache.storm.tuple.Tuple
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.