Fix, skip FTP retry in certain cases 45/87945/2
authorPatrikBuhr <patrik.buhr@est.tech>
Fri, 17 May 2019 06:38:19 +0000 (06:38 +0000)
committerPatrikBuhr <patrik.buhr@est.tech>
Fri, 17 May 2019 06:38:19 +0000 (06:38 +0000)
commit511eaecfebcc89346756fe43ef43e6c106602cf6
treeaf377c4d9cf9db9ad4fb21d9eecaae837e21c6cf
parent75d51a299e7d36cb988ef074fce00eb4b29a3394
Fix, skip FTP retry in certain cases

In certain conditions there is no reason to retry fetching files.
For instance when the file is removed in the PNF or when
the password/certificate is wrong.

When the DFC is started there are always
queued VES events that referes to removed files which in turn results
in that the DFC will retry fetching these files in vain.
The DFC house keeps its number of concurrents tasks to not exeed quotas
for memory,open file descriptors etc.
As more threads are occupied with retrying, the fewer threads can do
their intended work, which decreases the throughput.

Testing has showed that already when the number of PNFs are 10, the throughput
is radically decreased (and the problem is then escalating).

Change-Id: I4833724a3ef3509025f4a0a438c6c8025932b0f4
Issue-ID: DCAEGEN2-1508
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/exceptions/DatafileTaskException.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/FtpsClient.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/ftp/SftpClient.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java
datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasks.java
datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollectorTest.java