/Coding-Assignment-for-Java

Coding Assignment Java 8 for Reading & Parsing Data from File, then save in-Memory Database

Primary LanguageJava

Coding-Assignment-for-Java

Coding Assignment Java 8 for Reading & Parsing Data from File, then save in-Memory Database

To use the application is written in Maven application in STS just update Maven & it will works fine

& using database inMemory Database called hsqldb make sure database installed from this link https://stackoverflow.com/questions/7053721/concept-of-in-memory-database-and-how-to-see-if-my-data-is-being-populated-in-hsq/7122466#7122466

I have created sample of the log file there & saved it in path c://logs/logfile.txt

{"id":"scsmbstgra", "state":"STARTED", "type":"APPLICATION_LOG", "host":"12345", "timestamp":1491377495212} {"id":"scsmbstgrb", "state":"STARTED", "timestamp":1491377495213} {"id":"scsmbstgrc", "state":"FINISHED", "timestamp":1491377495218} {"id":"scsmbstgra", "state":"FINISHED", "type":"APPLICATION_LOG", "host":"12345", "timestamp":1491377495217} {"id":"scsmbstgrc", "state":"STARTED", "timestamp":1491377495210} {"id":"scsmbstgrb", "state":"FINISHED", "timestamp":1491377495216}

for threading of reading the file will do it, but threading in Database with reading the file not correct.

for reading large file effeciently, I have followed this link

https://www.baeldung.com/java-read-lines-large-file