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