Listing Five:临界值检测代码段
- public void execute(Tuple tuple, BasicOutputCollector collector)
- {
- if(tuple!=null)
- {
- List<Object> inputTupleList = (List<Object>) tuple.getValues();
- int thresholdColNum = thresholdInfo.getThresholdColNumber();
- Object thresholdValue = thresholdInfo.getThresholdValue();
- String thresholdDataType = tupleInfo.getFieldList().get(thresholdColNum-1).getColumnType();