public class StormTuple<IN> extends Object implements backtype.storm.tuple.Tuple
StormTuple
converts a Flink tuple of type IN
into a Storm tuple.Constructor and Description |
---|
StormTuple(IN flinkTuple,
backtype.storm.tuple.Fields schema,
int producerTaskId,
String producerStreamId,
String producerComponentId,
backtype.storm.tuple.MessageId messageId)
Create a new Storm tuple from the given Flink tuple.
|
public StormTuple(IN flinkTuple, backtype.storm.tuple.Fields schema, int producerTaskId, String producerStreamId, String producerComponentId, backtype.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 backtype.storm.tuple.ITuple
public boolean contains(String field)
contains
in interface backtype.storm.tuple.ITuple
public backtype.storm.tuple.Fields getFields()
getFields
in interface backtype.storm.tuple.ITuple
public int fieldIndex(String field)
fieldIndex
in interface backtype.storm.tuple.ITuple
public List<Object> select(backtype.storm.tuple.Fields selector)
select
in interface backtype.storm.tuple.ITuple
public Object getValue(int i)
getValue
in interface backtype.storm.tuple.ITuple
public String getString(int i)
getString
in interface backtype.storm.tuple.ITuple
public Integer getInteger(int i)
getInteger
in interface backtype.storm.tuple.ITuple
public Long getLong(int i)
getLong
in interface backtype.storm.tuple.ITuple
public Boolean getBoolean(int i)
getBoolean
in interface backtype.storm.tuple.ITuple
public Short getShort(int i)
getShort
in interface backtype.storm.tuple.ITuple
public Byte getByte(int i)
getByte
in interface backtype.storm.tuple.ITuple
public Double getDouble(int i)
getDouble
in interface backtype.storm.tuple.ITuple
public Float getFloat(int i)
getFloat
in interface backtype.storm.tuple.ITuple
public byte[] getBinary(int i)
getBinary
in interface backtype.storm.tuple.ITuple
public <T> T getValueByName(String field)
public Object getValueByField(String field)
getValueByField
in interface backtype.storm.tuple.ITuple
public String getStringByField(String field)
getStringByField
in interface backtype.storm.tuple.ITuple
public Integer getIntegerByField(String field)
getIntegerByField
in interface backtype.storm.tuple.ITuple
public Long getLongByField(String field)
getLongByField
in interface backtype.storm.tuple.ITuple
public Boolean getBooleanByField(String field)
getBooleanByField
in interface backtype.storm.tuple.ITuple
public Short getShortByField(String field)
getShortByField
in interface backtype.storm.tuple.ITuple
public Byte getByteByField(String field)
getByteByField
in interface backtype.storm.tuple.ITuple
public Double getDoubleByField(String field)
getDoubleByField
in interface backtype.storm.tuple.ITuple
public Float getFloatByField(String field)
getFloatByField
in interface backtype.storm.tuple.ITuple
public byte[] getBinaryByField(String field)
getBinaryByField
in interface backtype.storm.tuple.ITuple
public List<Object> getValues()
getValues
in interface backtype.storm.tuple.ITuple
public backtype.storm.generated.GlobalStreamId getSourceGlobalStreamid()
getSourceGlobalStreamid
in interface backtype.storm.tuple.Tuple
public String getSourceComponent()
getSourceComponent
in interface backtype.storm.tuple.Tuple
public int getSourceTask()
getSourceTask
in interface backtype.storm.tuple.Tuple
public String getSourceStreamId()
getSourceStreamId
in interface backtype.storm.tuple.Tuple
public backtype.storm.tuple.MessageId getMessageId()
getMessageId
in interface backtype.storm.tuple.Tuple
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.