未验证 提交 abfa6954 编写于 作者: R Ring-k 提交者: GitHub

[IoTDB-1449] path already exist error in IoTDBSink (#3569)

上级 5e020b58
......@@ -97,8 +97,15 @@ public class IoTDBSink<IN> extends RichSinkFunction<IN> {
for (IoTDBSinkOptions.TimeseriesOption option : options.getTimeseriesOptionList()) {
if (!pool.checkTimeseriesExists(option.getPath())) {
pool.createTimeseries(
option.getPath(), option.getDataType(), option.getEncoding(), option.getCompressor());
try {
pool.createTimeseries(
option.getPath(), option.getDataType(), option.getEncoding(), option.getCompressor());
} catch (StatementExecutionException e) {
// path could have been created by the other process here
if (e.getStatusCode() != TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode()) {
throw e;
}
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册