StormTuple implements backtype.storm.tuple.Tuple { @Override public List<Object> select(final Fields selector) { return this.schema.select(selector, this.stormTuple); } StormTuple(final IN flinkTuple, final Fields schema, final int producerTaskId, final String producerStreamId, final String producerComponentId, final MessageId messageId); @Override int size(); @Override boolean contains(final String field); @Override Fields getFields(); @Override int fieldIndex(final String field); @Override List<Object> select(final Fields selector); @Override Object getValue(final int i); @Override String getString(final int i); @Override Integer getInteger(final int i); @Override Long getLong(final int i); @Override Boolean getBoolean(final int i); @Override Short getShort(final int i); @Override Byte getByte(final int i); @Override Double getDouble(final int i); @Override Float getFloat(final int i); @Override byte[] getBinary(final int i); @SuppressWarnings("unchecked") T getValueByName(final String field); @Override Object getValueByField(final String field); @Override String getStringByField(final String field); @Override Integer getIntegerByField(final String field); @Override Long getLongByField(final String field); @Override Boolean getBooleanByField(final String field); @Override Short getShortByField(final String field); @Override Byte getByteByField(final String field); @Override Double getDoubleByField(final String field); @Override Float getFloatByField(final String field); @Override byte[] getBinaryByField(final String field); @Override List<Object> getValues(); @Override GlobalStreamId getSourceGlobalStreamid(); @Override String getSourceComponent(); @Override int getSourceTask(); @Override String getSourceStreamId(); @Override MessageId getMessageId(); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testSelect() throws Exception { Tuple tuple = Tuple.getTupleClass(arity).newInstance(); Values values = new Values(); ArrayList<String> attributeNames = new ArrayList<String>(arity); ArrayList<String> filterNames = new ArrayList<String>(arity); for (int i = 0; i < arity; ++i) { tuple.setField(i, i); attributeNames.add("a" + i); if (r.nextBoolean()) { filterNames.add("a" + i); values.add(i); } } Fields schema = new Fields(attributeNames); Fields selector = new Fields(filterNames); Assert.assertEquals(values, new StormTuple<>(tuple, schema, -1, null, null, null).select(selector)); }