提交线上使用版本

This commit is contained in:
qidaijie
2021-02-01 11:38:18 +08:00
parent 265611e571
commit e6e2e41333
13 changed files with 822 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package cn.ac.iie.utils;
import org.apache.storm.Constants;
import org.apache.storm.tuple.Tuple;
/**
* @author Administrator
*/
public final class TupleUtils {
/**
* 判断是否系统自动发送的Tuple
*
* @param tuple
* @return
*/
public static boolean isTick(Tuple tuple) {
return tuple != null
&& Constants.SYSTEM_COMPONENT_ID.equals(tuple.getSourceComponent())
&& Constants.SYSTEM_TICK_STREAM_ID.equals(tuple.getSourceStreamId());
}
}