-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Debmalya Jash edited this page Oct 25, 2018
·
6 revisions
Welcome to the SFM wiki!
Used MapDB to store ( HTreeMap<String,long[]> ) words with their timestamp. Key is the word from log file. Value is an array of long values. Here word count is 5, so last six occurence time is stored. While checking the string is valid or not, these 6 values are checked. If any of them is within last 24 hours false is returned, true otherwise.
- Suppose "NullPointerException" occurs in log files.
- NullPointerException is key and value stored as [0, 0, 0, 0, 0, 1540449668000] - at this state, validity of string "NullPointerException" is true. "NullPointerException" occurs only once at this stage.
- is [0, 0, 0, 0, 1540449668000,1540450982000] - at this state, validity of string "is" is true as it occurs twice only.
- is [0, 0, 0, 1540449668000,1540450982000,1540451727000] - at this state, validity of string "is" is true
- is [0, 0, 1540449668000, 1540449668000, 1540450982000, 1540451727000] - at this state, validity of string "is" is true
- is [0, 1540449668000, 1540450982000, 1540451727000, 1540451921000, 1540451944000] - at this state, validity of string "is" is true
- is [1540449668000, 1540450982000, 1540451727000, 1540451921000, 1540451944000, 1540452229000] - at this state, validity of string "is" is false
- is [1540449668000, 1540449668000, 1540450982000, 1540451727000, 1540451921000, 1540451944000] - at this state, validity of string "is" is false
- is [1540450982000, 1540451727000, 1540451921000, 1540451944000, 1540452229000, 1540452265000] - at this state, validity of string "is" is false In last three cases string "is" was appeared more than 5 times in log file within last 24 hours.
- org.deb.SFM.api.SFMRestController.java
- org.deb.SFM.config.ConfigurationComponent.java
- org.deb.SFM.repository.WordRegister24Hours.java
- org.deb.SFM.service.SFMService.java
- org.deb.SFM.service.SFMServiceImpl.java
- org.deb.SFM.watcher.directory.FolderWatcher.java
- org.deb.SFM.SfmApplicationTests.java
- Spring Boot
- Quartz Scheduler
- MapDB
- REST API