UserCacheUpdaterFlinkJob
Last updated
Last updated
The three exhaust reports depend on the user metadata information which is generated from the user-cache-updater flink job by fetching information from different core Cassandra tables and are stored in the Redis cache. From Release-3.7.0 the design for the flink job has been changed and now the information will be fetched from the User Read API.
JIRA Link: https://project-sunbird.atlassian.net/browse/SB-21691
Reference Wiki Links:
User Table Changes: https://project-sunbird.atlassian.net/wiki/spaces/UM/pages/2110881881
Org Table Changes: https://project-sunbird.atlassian.net/wiki/spaces/UM/pages/2260074547
Implementation Design:
Design for the fields to be fetched:
User-ID
String
userId
It indicates user unique Identifier
Mobile Number
String
encPhone
User phone number in an encrypted format
Email ID
String
encEmail
User mail id in an encrypted format
First Name
String
firstName
User first name
Last Name
String
lastName
User Last Name
Rootorgid
String
rootOrgId
User root org id (can be used to differentiate between custodian and state user)
Board
String
framework.board
User’s board Assumption: It is single valued
Medium
List[String]
framework.medium
User medium
Subject
List[String]
framework.subject
User subjects
Language
List[String]
language
User Language
Grade
List[String]
framework.gradeLevel
User grades
framework
String
framework.id
User’s framework id Assumption: It is single valued
UserType
String
profileUserType.type
User Type
UserSubType
String
profileUserType.subType
User’s Sub Type
Orgname
String
rootOrg.orgName
User’s Org Name It is fetched from rootOrg Map.
School Name
String
Fetch {name} where userLocation[*].type = 'school'
User’s School Name. It is fetched from the userLocation Map
School UDISE Code
String
Fetch {code} where userLocation[*].type = 'school'
User’s School UDISE Code. It is fetched from the userLocation Map
State Name
String
Fetch {name} where userLocation[*].type = 'state'
User’s State Name. It is fetched from the userLocation Map
District Name
String
Fetch {name} where userLocation[*].type = 'district'
User’s District Name. It is fetched from the userLocation Map
Block Name
String
Fetch {name} where userLocation[*].type = 'block'
User’s Block Name. It is fetched from the userLocation Map
Cluster Name
String
Fetch {name} where userLocation[*].type = 'cluster'
User’s Cluster Name. It is fetched from the userLocation Map
User Read API Request curl --location --request GET 'http://{Private LB}/learner/private/user/v1/read/:uuid?fields=locations' User Read API Response
Queries:
Should we fetch extra information eg webpage, createdBy, createdFor, etc? Fetch only if required for denorm job
Should we fetch externalid from now or not? Fetch only if required for denorm job
Should we directly fetch username or have a logic of firstname+lastname? firstname+lastname should be the username for reports