Listing Five:臨界值檢測(cè)代碼段
- 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();