Expedia Interview Question
SDE-2sCountry: United States
Interview Type: In-Person
Its Based on scenario to find top 10 user.
1. It could be based on number of visit to site in certain period of time.
2. Number of transactions
3. Amount of transaction.
If interview want to know algorithm approach or just brain storming than Solution is different. But ELKr(ElasticSearch, Logstash, redis)/Hadoop Based Mining is industry standard and production deployed solution of such problems.
1. logger with certain format
2. collect logs from each server (AWS/Cloud) at one place
3. Apply some mining/parsing/ GROK tool
4. Assigned them into ElasticSearch
5. Write API or ES query to fetch results.
Its Based on scenario to find top 10 user.
1. It could be based on number of visit to site in certain period of time.
2. Number of transactions
3. Amount of transaction.
If interview want to know algorithm approach or just brain storming than Solution is different. But ELKr(ElasticSearch, Logstash, redis)/Hadoop Based Mining is industry standard and production deployed solution of such problems.
1. logger with certain format
2. collect logs from each server (AWS/Cloud) at one place
3. Apply some mining/parsing/ GROK tool
4. Assigned them into ElasticSearch
5. Write API or ES query to fetch results.
Assumptions:
- Dilbert Einstein May 23, 2015- All log files have a common root directory
- The UserID is logged exclusively in a line (without any other data in same line)
cd /var/log; find . -type f -name "*.log" | xargs cat | sort | uniq -c | sort -k1,1 -r | head -10
Of course replace log directory path and log file name format appropriately if given. It is also good to ask the interviewer if the assumptions are correct. If not, depending on the specifications, slight modifications need to be made to the command.