backup-core/src/main/java/org/apache/iotdb/backup/core/pipeline/out/sink/OutCompressFileSink.java [106:133]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                          finishedRowNum.addAndGet(groupList.size());
                                        }
                                        return Flux.fromIterable(allList);
                                      });
                                }))
            .flatMap(
                timeSeriesRowModel -> {
                  return Flux.deferContextual(
                      contextView -> {
                        String deviceName = timeSeriesRowModel.getDeviceModel().getDeviceName();
                        if (deviceName.startsWith("finish")) {
                          ConcurrentHashMap<String, OutputStream> outputStreamMap =
                              contextView.get("outputStreamMap");
                          deviceName =
                              deviceName.substring(
                                  deviceName.indexOf(",") + 1, deviceName.length());
                          OutputStream outputStream = outputStreamMap.get(deviceName);
                          outputStreamMap.remove(deviceName);
                          try {
                            outputStream.flush();
                            outputStream.close();
                          } catch (IOException e) {
                            log.error("outputStream 关闭异常：", e);
                          }
                        }
                        return Flux.just(timeSeriesRowModel);
                      });
                });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



backup-core/src/main/java/org/apache/iotdb/backup/core/pipeline/out/sink/OutSqlFileSink.java [112:139]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                          finishedRowNum.addAndGet(groupList.size());
                                        }
                                        return Flux.fromIterable(allList);
                                      });
                                }))
            .flatMap(
                timeSeriesRowModel -> {
                  return Flux.deferContextual(
                      contextView -> {
                        String deviceName = timeSeriesRowModel.getDeviceModel().getDeviceName();
                        if (deviceName.startsWith("finish")) {
                          ConcurrentHashMap<String, OutputStream> outputStreamMap =
                              contextView.get("outputStreamMap");
                          deviceName =
                              deviceName.substring(
                                  deviceName.indexOf(",") + 1, deviceName.length());
                          OutputStream outputStream = outputStreamMap.get(deviceName);
                          outputStreamMap.remove(deviceName);
                          try {
                            outputStream.flush();
                            outputStream.close();
                          } catch (IOException e) {
                            log.error("outputStream 关闭异常：", e);
                          }
                        }
                        return Flux.just(timeSeriesRowModel);
                      });
                });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



