The interview’s analyse

Ding Dong Single and non-single bean loop dependencies. – an error

The Himalayan

Map immutable Collections. How to recycle the temporary unmodifiableMap thread pool threads ThreadPoolExecutor recycling thread, a thread getTask () returns null, can be recycled. There are two scenarios. When shutdown() is not called, the number of threads in the RUNNING state is larger than corePoolSize, and the threads are blocked due to timeout. After the timeout, CAS reduces the number of working threads. If CAS succeeds, null is returned and the thread is recycled. Otherwise enter the next loop. When the number of worker threads is less than or equal to corePoolSize, it can always block. When shutdown() is called, and all tasks are completed, shutdown() signals an interrupt to all threads, there are two possibilities. 2.1) All threads wake up in a blocking interrupt, enter the loop, all meet the first if judgment condition, all return null, all threads reclaim. 2.2) At least one thread will be reclaimed if the task is not completely executed. The processWorkerExit(Worker W, Boolean completedAbruptly) method calls tryTerminate(), signaling an interrupt to any idle thread. All blocked threads will eventually be woken up one by one and recycled. Sequential maplinkedHashMap string table consistency Hash failure section statistics method level time-consuming algorithm: A/B /.. /c/d/./e -> Minimum path. Stack array 1,0, 1 put left,0 put right left pointer

Cargo lala

Redolog effect, Structure rocketmq rollback the routing policy 100% CPU toptop – Hp [pid] printf “% x \ n” (dar) jstack [pid] | grep [hexadecimal dar] – A one-to-one 10 supremo, cool home owners: An algorithm: string product ES deep paging problem; Conventional eight-part essay; Kole: an algorithm to take the largest array of non-repetitive hot key; Design pattern principles; Handwritten MQ UML class diagram conventional octuple; How to solve the problem of high concurrency redis, MQ, sub-database sub-table, read/write separation, add machine 2. Sub-table rules? Uniform? 3. Difference between JDBC and Proxy? The advantages and disadvantages? 4. How does Rocketmq ensure data is not lost? Consumers don’t lose? Repeat spending? Idempotent? Pseudo code? 5. Is Redis get atomic? Concurrency problem? 6. How to implement redis lock? Redission life? How to implement it without lua script? 7. Production redis mode? The Sentry principle? How many masters does the sentry have? Single node? Red lock? Rediscluster: How to add a node to an existing node? 8. Kafka, rocketmqKafka topic support is low. Kafka 18W RocketMQ 11W Rabbit 5wBroker storage structure. kafka -> topic/partition/xxxx segement (index.log.timeindex); Rocket -> commitlog. consumerQueuekafka read data? : : Binary seates, sparse indexes, binary indexes Kafka messages don’t lose? Ack =1 fully synchronous kafka leader? How to implement the partiton (selected by the broker leader) circuit breaker, downgrade, and flow limiting? Sorted – set structure. Implement the skip table yourself. Soul side: @Transaction Principle What mechanism takes different database connections? Annotations, transactional long links, only one from request to end? In addition to locking, how can multithreading achieve common? How does Theadlocal implement data sharing? How does Redis implement message queuing? Queue BLPOP, publish subscribe mode. What are the downsides of the subscription model? I don’t know, but it’s not officially recommended. Will RBD aof sub, pub persist messages? Why does Redis String encapsulate itself, and C language big difference key solution? Honor of Kings leaderboard. shard

Baimi, Pingan One wallet Baimi

Half an hour after the interview, I introduced my project experience without asking any questions. At the end of the 15-minute interview, the interviewer asks about salary. Next time, don’t discuss salary with the interviewer. Learnta side: hashMap: Overrides equals, hashCode. How are maps saved? Why? Override equals=true, save separately. Overwrite hashCode =true to save separately. Spring: Spring transaction propagation @transcation catch exceptions mysql: handwritten SQL MYSQL hash index or B tree index which is better? Select B-tree if ordering, hash is not supported. Leftmost matching principle algorithm: array n elements, are integers. Plus minus 0 for each log, the sum is 10. Find out what the index is. Simple list replication with MAP, random list replication tree sequence traversal, recursion, stack. Stack to push left in, left pop up to look for right. Intelligence problem: 3 door question, 1,2,3 door only have a door to have a prize, the host opened a door that have no prize, change a door? Kafka: How to optimize GC? Double TPS for downstream services and 50% increase in upstream requests. Aio to elaborate, just say callback will not work. Algorithm array only 1,2,3, sort, can’t use extra space, time complexity O(n). Liunx system to obtain the CPU usage principle algorithm question two ordered array sorting time complexity is the least. How to optimize the thread pool future.get()?