超级表init event_info
This commit is contained in:
parent
229805f40b
commit
5bfc108da0
@ -253,6 +253,15 @@ public class TDEngineService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//初始化event_info
|
||||||
|
String eventInfo = "create stable IF NOT EXISTS event_info (event_time timestamp,event_id bigint primary key,event_type tinyint,event_level tinyint,event_text varchar(256),confirmed tinyint,confirm_account varchar(32),confirm_time timestamp) tags (device_id bigint,device_code varchar(64),device_name varchar(192))";
|
||||||
|
try {
|
||||||
|
pstmt.executeUpdate(eventInfo);
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
log.error("init event_info error", ex);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
log.error(ex.getMessage());
|
log.error(ex.getMessage());
|
||||||
}
|
}
|
||||||
@ -406,6 +415,7 @@ public class TDEngineService {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
pstmt.executeUpdate(sb.toString());
|
pstmt.executeUpdate(sb.toString());
|
||||||
|
log.info("告警信息入库:{}",sb.toString());
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
log.error("save yc error", ex);
|
log.error("save yc error", ex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user