Folder Structure

Ml User Delete Service folder structure is designed to organize the different modules and files that constitute the ml user delete flink job. It follows a modular approach, facilitating easy management and development of the service.

The structure is as follows

.  
β”‚
└── ml-jobs
    β”œβ”€β”€ pom.xml
    └── ml-user-delete
        β”œβ”€β”€ pom.xml
        └── src
         Β Β  β”œβ”€β”€ main
         Β Β  β”‚Β Β  β”œβ”€β”€ resources
         Β Β  β”‚Β Β  β”‚Β Β  └── user-delete.conf
         Β Β  β”‚Β Β  └── scala
         Β Β  β”‚Β Β      └── org
         Β Β  β”‚Β Β          └── sunbird
         Β Β  β”‚Β Β              └── job
         Β Β  β”‚Β Β                  └── userdelete
         Β Β  β”‚Β Β                      β”œβ”€β”€ domain
         Β Β  β”‚Β Β                      β”‚Β Β  └── Event.scala
         Β Β  β”‚Β Β                      β”œβ”€β”€ functions
         Β Β  β”‚Β Β                      β”‚Β Β  └── UserDeleteFunction.scala
         Β Β  β”‚Β Β                      └── task
         Β Β  β”‚Β Β                      Β Β   β”œβ”€β”€ UserDeleteConfig.scala
         Β Β  β”‚Β Β                        Β  └── UserDeleteStreamTask.scalaΒ Β                          
         Β Β  └── test
         Β Β      β”œβ”€β”€ resources
          Β      β”‚Β Β  └── test.conf
         Β Β      └── scala
         Β Β          └── org
         Β Β              └── sunbird
         Β Β                  └── job
         Β Β                      β”œβ”€β”€ fixture
                                β”‚   β”œβ”€β”€ EventFixture.scala
         Β Β                      β”‚Β Β  └── LoadMongoData.scala
         Β Β                      └── spec
         Β Β                          └── UserDeleteFunctionTestSpec.scala
       

ml-jobs

This is the main directory that contains manage learn related Flink jobs.

ml-user-delete

This folder contains all the required directory for actual implementation of logics.

resources [main]

This folder contains application related configurations in a file called user-delete.conf

domain

This directory contains a file called Even.scala which is used to declare methods to get specific keys out of JSON.

functions

This folder contains the file UserDeleteFunction.scala which helps in processing and deleting user information from the MongoDB.

task

This folder contains a file called UserDeleteStreamTask.scala which is an entry point for this service. and another file called UserDeleteConfig.scala which holds the variable constants.

resources [test]

This folder contains test related configurations values in a file called test.conf.

fixture

This directory contains a file called EventFixture which is a hard coded kafka events for the testing purpose. Also contains LoadMongoData file which holds the Mongo Data for the testing purpose.

spec

In the spec folder we have the main test case file called UserDeleteFunctionTestSpec.scala that is used to test our stream processing task.

Source code

Last updated