metric不存在的场景,非fatal错误,日志记录即可,不影响其他job。

This commit is contained in:
rubybj 2020-04-28 09:40:08 +08:00
parent 74ef652fdf
commit 7b87720d7d

View File

@ -189,7 +189,12 @@ public class OpenTSDBReader extends Reader {
public void startRead(RecordSender recordSender) { public void startRead(RecordSender recordSender) {
try { try {
for (String column : columns) { for (String column : columns) {
conn.sendDPs(column, this.startTime, this.endTime, recordSender); //If some metric does not exist, it is not a fatal error. Just log it and do not affect other jobs.
try {
conn.sendDPs(column, this.startTime, this.endTime, recordSender);
}catch(net.opentsdb.uid.NoSuchUniqueName e){
LOG.warn("在时间段{}-{}无{}指标", this.startTime,this.endTime,column);
}
} }
} catch (Exception e) { } catch (Exception e) {
throw DataXException.asDataXException( throw DataXException.asDataXException(