|
@@ -176,7 +176,8 @@ public class ParserComponentImpl implements ParserComponent {
|
|
|
pluginFactory.convert(group.getPlugin(), context);
|
|
|
|
|
|
// 5、写入目标源
|
|
|
- BatchWriter batchWriter = new BatchWriter(tConnectorInstance, command, tTableName, event, picker.getTargetFields(), target, batchSize);
|
|
|
+ boolean enableOnlyUpdate = profileComponent.getSystemConfig().isEnableOnlyUpdate();
|
|
|
+ BatchWriter batchWriter = new BatchWriter(tConnectorInstance, command, tTableName, event, picker.getTargetFields(), target, batchSize,enableOnlyUpdate);
|
|
|
Result result = writeBatch(context, batchWriter, executor);
|
|
|
|
|
|
// 6、更新结果
|
|
@@ -216,7 +217,7 @@ public class ParserComponentImpl implements ParserComponent {
|
|
|
int total = dataList.size();
|
|
|
// 单次任务
|
|
|
if (total <= batchSize) {
|
|
|
- return connectorFactory.writer(batchWriter.getConnectorInstance(), new WriterBatchConfig(tableName, event, command, fields, dataList));
|
|
|
+ return connectorFactory.writer(batchWriter.getConnectorInstance(), new WriterBatchConfig(tableName, event, command, fields, dataList,batchWriter.isEnableOnlyUpdate()));
|
|
|
}
|
|
|
|
|
|
// 批量任务, 拆分
|
|
@@ -238,7 +239,7 @@ public class ParserComponentImpl implements ParserComponent {
|
|
|
|
|
|
executor.execute(() -> {
|
|
|
try {
|
|
|
- Result w = connectorFactory.writer(batchWriter.getConnectorInstance(), new WriterBatchConfig(tableName, event, command, fields, data));
|
|
|
+ Result w = connectorFactory.writer(batchWriter.getConnectorInstance(), new WriterBatchConfig(tableName, event, command, fields, data,batchWriter.isEnableOnlyUpdate()));
|
|
|
result.addSuccessData(w.getSuccessData());
|
|
|
result.addFailData(w.getFailData());
|
|
|
result.getError().append(w.getError());
|