Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
in IoTDBSink, the codes are:
void initSession() throws Exception { pool = new SessionPool(options.getHost(), options.getPort(), options.getUser(), options.getPassword(), sessionPoolSize); pool.setStorageGroup(options.getStorageGroup()); for (IoTDBOptions.TimeseriesOption option : options.getTimeseriesOptionList()) { if (!pool.checkTimeseriesExists(option.getPath())) { pool.createTimeseries(option.getPath(), option.getDataType(), option.getEncoding(), option.getCompressor()); } } }
When we re-run the Flink task , IoTDBSink will try to create the storage group again and fails and then stop the program.... It is incorrect.
solution:
1. use try-catch to wrap the setStorageGroup()
or,
2. check whether the sg exist, and only create it if not exist.
Attachments
Issue Links
- links to