This commit is contained in:
parent
a8aa508639
commit
0edeb16e22
1 changed files with 17 additions and 14 deletions
|
|
@ -131,20 +131,23 @@ public class ExportFromHazelcast {
|
|||
((ArrayList<SDf02>) tableRows).sort(Comparator.comparing(SDf02::getInSDfId));
|
||||
}
|
||||
if (tableRows.isEmpty()) {
|
||||
log.info("uuid {}. Map {} is empty, generationId {}", resultContainer.getUuid(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
||||
log.debug("uuid {}, send to SFTP path \"{}\"", resultContainer.getUuid(), path);
|
||||
|
||||
documentTag.setObjects(List.of());
|
||||
resultContainer.setDocumentTag(documentTag);
|
||||
try {
|
||||
xmlMapper.writeValue(xmlFile, documentTag);
|
||||
} catch (IOException e) {
|
||||
log.error(String.format("uuid %s. Can't export table %s (map %s) to file %s. Table was skipped.",
|
||||
resultContainer.getUuid(), table, table.getHazelcastMapName(), xmlFile), e);
|
||||
return StageResult.ERROR;
|
||||
}
|
||||
gateway.sendToSftp(xmlFile, path);
|
||||
return StageResult.OK;
|
||||
log.info("uuid {}. Map {} is empty, generationId {}, skip file creation", resultContainer.getUuid(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
||||
//временное решение по таску http://jira.mfd.msk:8088/browse/CLS-897
|
||||
//в dev версии изменена логика на стороне clearing-service и такой проблемы быть не должно
|
||||
return StageResult.ERROR;
|
||||
// log.debug("uuid {}, send to SFTP path \"{}\"", resultContainer.getUuid(), path);
|
||||
//
|
||||
// documentTag.setObjects(List.of());
|
||||
// resultContainer.setDocumentTag(documentTag);
|
||||
// try {
|
||||
// xmlMapper.writeValue(xmlFile, documentTag);
|
||||
// } catch (IOException e) {
|
||||
// log.error(String.format("uuid %s. Can't export table %s (map %s) to file %s. Table was skipped.",
|
||||
// resultContainer.getUuid(), table, table.getHazelcastMapName(), xmlFile), e);
|
||||
// return StageResult.ERROR;
|
||||
// }
|
||||
// gateway.sendToSftp(xmlFile, path);
|
||||
// return StageResult.OK;
|
||||
} else {
|
||||
log.debug("uuid {}. Selected {} records from map {}, generationId {}", resultContainer.getUuid(),
|
||||
tableRows.size(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue