summaryrefslogtreecommitdiffstats
path: root/hv-collector-core
AgeCommit message (Collapse)AuthorFilesLines
2018-10-01HV-VES Domain updatePiotr Jaszczyk1-3/+3
Change domain name. In this project this yields following changes: * Comment change in VesEvent proto * Updated measurements proto (kept as documentation only, ie. not used in the collector) * Update name in test scenarios for unit and component scope Change-Id: I719077b5fcb642c067d25b7aa174a2e629404689 Issue-ID: DCAEGEN2-847 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-09-24Use JDK security providerPiotr Jaszczyk9-227/+11
Replace netty-tcnative bindings for OpenSSL with JDK provided implementation by default. Change-Id: I59a4797ce43d15a791eab00bfd25cb730a271207 Issue-ID: DCAEGEN2-816 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-09-24Remove end-of-transmission message from protocolFilip Krzywka3-135/+31
Also update protobuf files definitions to latest version. Change-Id: I0cd5d2d8deec5c787e2d3948d3d905fa672f9fea Issue-ID: DCAEGEN2-775 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-09-20Enhance releasing memoryFilip Krzywka2-17/+18
- Some buffers may be emitted as cancelled and thus they would not be handled by doOnTerminate method - Moved data stream creation for Netty inbound to time when collector is fully functional Change-Id: If2f2195fadeca957679f6be696802f48a616f48d Issue-ID: DCAEGEN2-815 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-09-17Align with latest HV-VES proto definitionFilip Krzywka11-54/+41
- excluded measurements proto files from build to keep them reference-only Change-Id: I8c6de20eeeb1b9f8cd2ae4e865de368afe55cc91 Issue-ID: DCAEGEN2-775 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-09-13Align with configuration present in consulJakub Dudycz2-4/+4
Rename few configuration json keys inside collector code to match those on consul. Change-Id: I400aebce98049118a30d7959dc6655a4da6016bf Issue-ID: DCAEGEN2-774 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
2018-09-11Fix common event header parsingFilip Krzywka1-14/+2
During JSON parsing we were using 3 times 'version' field. Replaced parsing with protobuf parser to avoid mistakes like this in future Change-Id: I6224dc6533ab553e7e2315a95567a1fa48c1c5ad Issue-ID: DCAEGEN2-710 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-09-06Handle non-existing Collector instanceFilip Krzywka3-10/+23
Change-Id: I0b6cd5023b2bca0f0bee6958c107fc560fc95b52 Issue-ID: DCAEGEN2-751 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-08-21Rename artifacts to match LF requirementsPiotr Jaszczyk1-1/+1
Group ID has been changed from org.onap.dcaegen2.collectors.veshv to org.onap.dcaegen2.collectors.hv-ves. Change-Id: I077e244ed56df22dd45bfe8dd1eee238f811a552 Issue-ID: DCAEGEN2-719 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-08-16Remove Ratpack dependency for HV-VES health checksPiotr Jaszczyk5-30/+16
In order to minimize complexity and possibly improve performance (thread count) reactor-netty should be used instead of Ratpack. Also reorganize code to be more consistent and differentiated readiness and liveness endpoints (for future use in K8s Pod definition). As an example I've defined health check probe in docker-compose YAML. Change-Id: I1b5ce3d685e7ae5b0515b2146ae4fa88b3b41186 Issue-ID: DCAEGEN2-705 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-08-09Implement simple health check mechanismJakub Dudycz5-56/+98
Change-Id: Ic4b8b59ced9dc19c9ebf26131036a9e1a752164f Issue-ID: DCAEGEN2-659 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
2018-08-08Create health check moduleJakub Dudycz1-0/+1
Create ves-hv-collector-health-check module with dummy api server and connect it with ves-hv-collector-main This is a preparation for health check mechanism implementation Change-Id: I2f668ab7337b1ed7e2afea6c56f34880de3ef1b5 Issue-ID: DCAEGEN2-659 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
2018-08-03Remove default consul configurationJakub Dudycz2-18/+1
Default consul configuration is not needed in real life use case and it doesnt even bring anything useful in our test environment, since it's immediately overriden. Tasks: - remove default consul configuration - make "config-url" argument required Closes ONAP-727 Change-Id: I4a01cebfc6b2918fa3aa6020504def60572b09da Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Extract test-utils modulefkrzywka5-78/+34
- removed duplicate code that was creating VesMessages and similiar objects - removed duplicate code in command line parsing tests - made minor refactorings to avoid passing unnecessary params and to be as verbose as possible in tests Closes ONAP-699 Change-Id: I2607f1f775054ae1c5f275c231895f838b415371 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Fix NPE when getting Consul configurationPiotr Jaszczyk4-77/+92
No initial value for AtomicReference was provided hence we had a little race condition. Retry when consul returns error. Change-Id: Ie38ca7fbf445123e98ee94703eba501bb5233fab Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Enable UNDEFINED option in commonHeader GPB schemakjaniak3-20/+61
Closes ONAP-655 Change-Id: I6fc830d2b8c7bdd726f306a6fbf7e979f39e03f0 Signed-off-by: kjaniak <kornel.janiak@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Rework argument configurationJakub Dudycz2-2/+2
- Unify names of argument configuration classes in DCAE APP simulator, XNF simualtor and VES HV Collector - Make some of the arguments required - Adjust docker-compose and Dockerfiles - Adjust test cases and error handling Closes ONAP-683 Change-Id: I4a9d43791cced9dcb52eb83e2f7956462e8712d9 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Fix consul request timeout issueJakub Dudycz5-25/+56
Fix timeout issue when using consul blocking query calls by switching to standard requests peformed in given interval Closes ONAP-628 Change-Id: Ifaf7ddfa27045015a7a90c178e0d6d38955c0c58 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Add command line option to disable SSL/TLSkjaniak4-36/+75
Closes ONAP-508 Change-Id: If6c3935ede7b00dea9b36747c6cd1422c1c8d330 Signed-off-by: kjaniak <kornel.janiak@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Use Try/Option monad when decoding protobuffkrzywka3-19/+44
Closes ONAP-143 Change-Id: I33cb2d24cd5962318a6f405096db298bbdbab963 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Merge "Include msg generator module in coverage report"Przemyslaw Wasala5-11/+1
2018-08-03Include msg generator module in coverage reportfkrzywka5-11/+1
* Reordered alphabetically modules in main pom file * Removed unused imports * Corrected visibility for fields/methods * Fix typos in tests Change-Id: I35c515b3844bc8517cc6ffb0c6557596505536c9 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-03Remove unused methodfkrzywka1-7/+0
Change-Id: I462e78f0bad9aba2e82d2766d748608b6231c839 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Use MessageValidator in VesMessage classJakub Dudycz5-8/+8
Closes ONAP-493 Change-Id: I15b5f0f1052865aa29ffa103bef2368bd94021e8 Signed-off-by: Jakub Dudycz <jdudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Use Flux.transform in VesHvCollectorJakub Dudycz2-16/+26
Goal: split the stream into logical parts Closes ONAP-493 Change-Id: I87aa817a18674fad265df81b6a0b4a8f0c46b866 Signed-off-by: Jakub Dudycz <jdudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Enhance wire protocolfkrzywka5-47/+140
Handle new wire frame message type which should allow clients to indicate that all data has been sent to collector Change xNF Simulator to send end-of-transmission message after sending all messages Close ves-hv-collector stream after encountering EOT message Remove duplicated file in project Closes ONAP-391 Change-Id: Idb6afc41d4bb0220a29df10c2aecfd76acd3ad16 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Fix consul configuration delayJakub Dudycz1-1/+2
Delay configuration received from consul instead of default one Change-Id: I09ec1a1e0d4a8334f83c054e0891b55ff8d049db Issue-Id: ONAP-519 Signed-off-by: jdudycz@nokia.com Issue-ID: DCAEGEN2-601
2018-08-02Implement blocking consul callsJakub Dudycz6-62/+138
Replaced interval based requesting for consul configuration with blocking query calls Closes ONAP-80 Change-Id: If70365bae9fde513d99b047209d085122a5df0dd Signed-off-by: Jakub Dudycz <jdudycz@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Enhancement of routing testkjaniak2-12/+9
Change-Id: I432c09a219928d1a89a0c619db0e8cc3104af0ec Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Use Either instead of exceptions in frame decoderPiotr Jaszczyk3-25/+57
Goals: * Make code cleaner (in a FP way) * Avoid costly exception throw each time we wait for the rest of the frame (collecting stack traces is costly and we do not need them anyway) Closes ONAP-437 Change-Id: I40341d3c2cb85f3ff581d89167245cb009dbb070 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Use generator to simplify the WireFrame decodingPiotr Jaszczyk3-210/+41
Performance tests have proven that manual creation of the Flux doesn't give us any performance benefits. On the other side it is complicated and error prone. Closes ONAP-438 Change-Id: I45912f91a52cbc84322775f7bae6d73afda079b8 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Write performance testsPiotr Jaszczyk3-20/+63
Closes ONAP-434 Change-Id: I1139848f32ac19a4d0a0fd595f4b07c10cd83db0 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Change Consul configuration update policyJakub Dudycz8-66/+142
- At startup default config is applied - Configuration is updated in intervals given at VES-HV service startup to allow dynamic changes - Included consul service startup in docker-compose file - VES-HV now exits when fails to acquire confguration from consul Closes ONAP-229 Change-Id: I896cfd177fa45381f9822278c2dffc113dd3df72 Signed-off-by: jakub.dudycz@nokia.com Issue-ID: DCAEGEN2-601
2018-08-02Various improvementsPiotr Jaszczyk13-159/+228
* Kotlin upgrade * Monad usage on APIs * Idle timeout * Simulator enhancements Closes ONAP-390 Change-Id: I3c00fcfe38c722caf661ddaad428cf089eeefcaa Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Add monitoring support by means of micrometer.ioPiotr Jaszczyk6-14/+27
Closes ONAP-345 Change-Id: I58c145b1d37a6b32fbe5b157723c152eb571a2dd Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Refactor ArgBasedConfigurationfkrzywka5-34/+4
Extracted duplicate code from Client/Server ArgBasedConfiguration, as it probably would be used third time in future work Change-Id: I581abbcd5f1dd4a1a049e1d28e68a7e4d82a84f8 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Check license notes during buildPiotr Jaszczyk5-0/+95
I wanted to use oparent as parent pom but unfortunately jacoco plugin is configured differently there. Currently oparent provides support for jacoco (static code analysis), checkstyle (licenses + code style) and swagger api documentation. In ves-hv: * jacoco is preconfigured for kotlin (but currently not very usable as it's not ready for kotlin-generated code ie. displayed coverage is well under the actual coverage; there is an ongoing effort in jacoco and kotlin communities to fix that). * checkstyle - this task adds support for checking licenses using oparent:checkstyle artifact. Static code analysis is already done using Detekt. * swagger - ves-hv is not exposing REST API so there is no need for this. Closes ONAP-364 Change-Id: If2727a97d826dcab473b2e1e80171d8124ae52d4 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-02Implement Kafka SinkPiotr Jaszczyk18-100/+188
Closes ONAP-146 Change-Id: I119a8abe70a9042f65a43909e5aa2fbed439e26f Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Fix TCP stream framing issuePiotr Jaszczyk16-212/+578
Because of the nature of TCP protocol we receive consecutive IO buffer snapshots - not separate messages. That means that we need to join incomming buffers and then split it into separate WireFrames. Closes ONAP-312 Change-Id: I84ba0ec58a41ff9026f2fca24d2b15f3adcf0a19 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Add SSL/TLS to client simulatorPiotr Jaszczyk3-5/+40
Change-Id: Iedebd222be08931b95e52a84c8c4d9c0df9e1da1 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Duplicate code removalfkrzywka1-9/+2
Change-Id: Iee19bce0ba18746d0570337c5317ccdd63552d56 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Extract domain modulefkrzywka27-187/+36
WireFrame extracted to domain module Domain package name in collector-core changed to avoid collision Merged Protobuf module with new domain module Closes ONAP-253. Change-Id: Ie7ac0bb877eae018a7520b4f3ceebe9fd51dbf65 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Copyright notice correctionfkrzywka23-23/+23
Change-Id: I8a8ca4cb4c1cc0d437edfe4f43f3063f135161c3 Signed-off-by: fkrzywka <filip.krzywka@nokia.com> Issue-ID: DCAEGEN2-601
2018-08-01Use SSL for encrypting the connectionPiotr Jaszczyk11-8/+245
Netty's OpenSSL bindings are used Closes ONAP-179 Change-Id: I8249fbaaed1dd869b733db04a27cebf53962c80c Issue-ID: DCAEGEN2-601 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-08-01Implemented simple tcp clientJakub Dudycz1-1/+1
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Change-Id: Iaf913186b93eb7eebfb6f44c19d489a64ed60c2b Issue-ID: DCAEGEN2-601
2018-08-01Fix wire protocol decoder refCnt issuePiotr Jaszczyk3-7/+67
We should use retain + slice because every reactor-netty operator automatically releases the buffer. Change-Id: Ie0282e70fadb56d56fc410a08e036fb0ca10584c Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Issue-ID: DCAEGEN2-601
2018-07-26HV VES Collector seed codePiotr Jaszczyk28-0/+1657
Contains squashed commits up to 11fe6b63 (2018-05-30). The whole contains a basic project structure. We are trying to put rest of the commits one by one so we do not loose the history. Bellow there are messages of the single commits in this squashed bulk: Basic project setup Create base maven project with Gitlab CI configuration. Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Merging guildeline Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Add remote branch delete command Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Sample runtime in Kotlin - PoC Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Setup project internal architecture Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Message routing Determine target topic and partition by VES Common Header. Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Parse GPB message header fkrzywka <filip.krzywka@nokia.com> Set listen port based on command line args Use Apache Commons CLI to parse cmd line args. Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Drop invalid GPB messages Instead of propagating error and closing stream just drop the message and proceed. Final handling logic may include closing the connection or sending some message depending on the specification. Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Add Apache license file Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Convert to maven multi-module project fkrzywka <filip.krzywka@nokia.com> Component tests with current GPB schema * Using v5 draft protobuf definition * Code reorganized to so component boundaries are more visible Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Thin logging facade over slf4j Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Introduce code analysis tools Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Implemented reading configuration from consul Ves Common Header validation added (required parameters existance check) Micro benchmark for direct vs on-heap NIO buffers Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Decode wire protocol and fix (most?) memory leaks Proposed wire protocol is just a suggestion and will (should) change in the future. Netty's ByteBuf is a reference-counted wrapper over a memory chunk. It is crucial to free unused buffers by means of release() method. The general rule regarding memory management was suggested. Let's put all memory-cleanup logic in main VesHvCollector class so other classes could focus on their job. Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Minor cleanup Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Add license info in files Piotr Jaszczyk <piotr.jaszczyk@nokia.com> Change-Id: Ic484aa107eba48ad48f8ab222799e1795dffa865 Issue-ID: DCAEGEN2-601 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>