What is your ideal team? What are the requirements for analysts?
Java
Tell about a complex bug or a difficult enhancement in your last project.
How did you optimize slow SQL queries? How did you solve the N+1 problem in Hibernate?
What ORMs have you used? When Hibernate, when JDBC? Were Liquibase/Flyway used?
Why did you choose Cassandra? What alternatives did you consider? How did you test?
Tell us about your experience and your last project.
What monitoring, logging, and metrics tools did you use? What approach in microservices?
How have you worked with Kafka? Have you tuned partitions or configurations? What happens if consumers are fewer than partitions?
Which project do you consider the most significant for yourself and why?
Tell about the hotspot problem in Cassandra and how you solved it.
What were you able to influence in the architectural decisions on your last project?
Was there access to monitoring on different circuits? How was the release process conducted?
Description of the task: It is required to implement a REST endpoint to retrieve a list of insurance policies that belong to a specified client and are paid. Since there are a very large number of policies in the system, a parameter for limiting the result should be provided. @RestController public class ClientController { @Value("policy.limit") private int policyLimit; @Autowired private PolicyService policyService; @RequestMapping(path = "client/{clientId}/policies", method = RequestMethod.POST) public Response getClientPolicies(@PathVariable("clientId") String clientId) { List<PolicyDTO> policies = getPolicies().stream() .limit(policyLimit) .filter(p -> p.getClientIds().contains(clientId)) .filter(p -> p.isPaid()) .toList(); return new Response(policies); } @Transactional private List<PolicyDTO> getPolicies() { return policyService.getPolicies(); } @Data @AllArgsConstructor public class Response { private List<PolicyDTO> policies; } @Data public class PolicyDTO { private String id; private String name; private List<String> clientId; private Boolean isPaid; } @RequiredArgsConstructor @Component public class PolicyService { private PolicyDbRepository repository; List<PolicyDTO> getPolicies() { return repository.getPolicies(); } } public interface PolicyDbRepository { List<PolicyDTO> getPolicies(); }