The most complete java interview questions analysis in 2020 (980), the interview questions you have not seen are here

Which big factory do you want to jump this year? This is a problem. To be honest, I was also abused in the interview last year. In order to find a pleasant job, I specially asked an interview Bible (Ali Daniel) from friends. There are 980 interview questions and analysis, a total of 485 pages of PDF . Including Java, MyBatis, ZooKeeper, Dubbo, Elasticsearch, Memcached, Redis, MySQL, Spring, Spring Boot, Spring Cloud, RabbitMQ, Kafka, Linux and other technology stacks .

Since the interview real questions involve comprehensive and detailed analysis , all the analysis will not be listed in the article. The entire 980 interview real questions are organized in a pdf document. Friends who need this pdf can receive at the end:

Each topic summarizes nearly 50 real questions (including analysis), including a total of more than 20 topics such as java, MyBatis, ZooKeeper, and Dubbo. 485 page PDF.

More than 20 topics:

text:

MyBatis interview questions (27):

What is Mybatis?

1. Mybatis is a semi-ORM (Object Relational Mapping) framework, which encapsulates JDBC internally. It only needs to pay attention to the SQL statement itself during development, and does not need to spend energy to deal with the complicated processes of loading drivers, creating connections, and creating statements. The programmer directly writes the original ecological SQL, which can strictly control the SQL execution performance and has high flexibility.

2. MyBatis can use XML or annotations to configure and map native information, map POJOs to records in the database, avoiding almost all JDBC code and manually setting parameters and obtaining result sets.

3. Configure the various statements to be executed through xml files or annotations, and map the java objects and the dynamic parameters of sql in the statement to generate the final executed sql statement. Finally, the mybatis framework executes the sql and maps the result to java Object and return. (The process from executing sql to returning result).

  • Mybaits advantages:
  • Disadvantages of MyBatis framework:
  • Applicable occasions of MyBatis framework:
  • How is MyBatis different from Hibernate?
  • What is the difference between # {} and $ {}?
  • What if the attribute name in the entity class is different from the field name in the table?
  • How to write fuzzy query like statement?
  • Usually an Xml mapping file will write a Dao interface corresponding to it. Excuse me, what is the working principle of this Dao interface? Can the methods in the Dao interface be overloaded when the parameters are different?
  • How is Mybatis paginated? What is the principle of paging plugin?
  • How does Mybatis encapsulate the SQL execution result as the target object and return it? What are the mapping forms?

ZooKeeper interview questions (28):

ZooKeeper interview questions?

ZooKeeper is an open source distributed coordination service. It is the administrator of the cluster, monitoring the status of each node in the cluster and performing the next reasonable operation based on the feedback submitted by the nodes. In the end, the user will be provided with an easy-to-use interface and a system with high performance and stable functions. Distributed applications can implement functions such as data publishing / subscription, load balancing, naming services, distributed coordination / notification, cluster management, master election, distributed locks, and distributed queues based on Zookeeper.

  • What does ZooKeeper offer?
  • Zookeeper file system
  • ZAB agreement?
  • Four types of data nodes Znode
  • Zookeeper Watcher mechanism-data change notification
  • Client registration Watcher implementation
  • The server handles Watcher implementation
  • Client callback callback

Dubbo interview questions (30):

Why use Dubbo?

With the further development of service, there are more and more services, and the calls and dependencies between services are becoming more and more complex. A service-oriented architecture (SOA) was born, and a series of corresponding technologies were derived. Such as a service framework that encapsulates behaviors such as service provision, service invocation, connection processing, communication protocol, serialization method, service discovery, service routing, and log output. In this way, the service governance framework for distributed systems appeared, and Dubbo was born.

  • What are the layers of Dubbo's overall architecture design?
  • What communication framework is used by default, and are there other options?
  • Are service calls blocked?
  • Are service calls blocked?
  • What registration center is generally used? Are there other options?
  • What serialization framework is used by default, and what else do you know?
  • What is the principle that service providers can achieve failure kick-out?
  • Why doesn't the service go online affect the old version?

The analysis of each topic is very comprehensive, including more than 400 pages of PDF, it is not easy to organize. If you feel ok, remember to like to give support, thank you

Elasticsearch interview questions (24):

Describe in detail the process of Elasticsearch indexing documents?

Interviewer: If you want to understand the underlying principles of ES, you no longer only focus on the business level.

Answer: The index document here should be understood as the process of writing the document into the ES and creating the index. Document writing includes: single document writing and bulk bulk writing, here only explain: single document writing process. Remember this picture in the official documentation.

The first step: the client writes data to a node of the cluster and sends a request. (If no routing / coordinating node is specified, the requested node acts as a routing node.)

Step 2: After node 1 receives the request, it uses document_id to determine that the document belongs to shard 0. The request will be transferred to another node, assuming node 3. Therefore, the main shard of shard 0 is allocated to node 3.

Step 3: Node 3 performs a write operation on the main shard. If successful, it forwards the request to the replica shards of node 1 and node 2 in parallel, waiting for the result to return. All replica shards report success, node 3 will report success to the coordinating node (node ​​1), and node 1 will report the write success to the requesting client.

If the interviewer asks again: the process of obtaining the sharding of the document in the second step?

Answer: With the help of the routing algorithm, the routing algorithm is the process of calculating the target fragment id based on the route and document id.

shard = hash(_routing) % (num_of_primary_shards)

  • Elasticsearch knows how to talk about your company's es cluster architecture, index data size, how many shards there are, and some tuning methods.
  • What is the inverted index of elasticsearch
  • Elasticsearch how to do more index data, how to tune and deploy
  • How does elasticsearch achieve master election
  • Describe in detail the process of Elasticsearch search?
  • What are the optimization methods for Linux settings when Elasticsearch is deployed
  • What is the internal structure of lucence?

Memcached interview questions (23):

What is Memcached and what does it do?

Memcached is an open source, high-performance memory storage software. From the name, Mem means memory, and Cache means cache. The role of Memcached: by temporarily storing all kinds of data in the database in the pre-planned memory space, to reduce the direct high concurrent access of the business to the database, so as to improve the access performance of the database and accelerate the dynamic application services of the website cluster ability.

  • How to implement Memcached service distributed cluster?
  • What are the characteristics and working principle of Memcached service?
  • Briefly describe the principle of Memcached memory management mechanism?
  • How does memcached work?
  • What is the biggest advantage of memcached?
  • memcached and MySQL query
  • What are the advantages and disadvantages of memcached compared to the server's local cache (such as PHP's APC, mmap files, etc.)?

Redis interview questions (40):

What is Redis?

Redis is completely open source and free. It complies with the BSD protocol and is a high-performance key-value database.

Redis and other key-value cache products have the following three characteristics:

  • Redis supports the persistence of data. The data in memory can be saved on the disk, and it can be used again when it is restarted.
  • Redis not only supports simple key-value data, but also provides storage of data structures such as list, set, zset, and hash.
  • Redis supports data backup, that is, data backup in master-slave mode.

Redis advantage

  • Extremely high performance-Redis can read at 110,000 times / s and write at 81,000 times / s.
  • Rich data types – Redis supports the operation of Strings, Lists, Hashes, Sets and Ordered Sets data types in binary cases.
  • Atomic – All operations in Redis are atomic, meaning that either successful execution or failure is not performed at all. A single operation is atomic. Multiple operations also support transactions, that is, atomicity, packaged through MULTI and EXEC instructions.
  • Rich features – Redis also supports publish / subscribe, notification, key expiration, etc.

How is Redis different from other key-value stores?

Redis has more complex data structures and provides atomic operations on them, which is an evolutionary path different from other databases. Redis data types are based on basic data structures and are transparent to programmers without additional abstraction.

Redis runs in memory but can be persisted to disk, so it is necessary to weigh the memory when reading and writing different data sets at high speed, because the amount of data cannot be greater than the hardware memory. Another advantage of in-memory databases is that compared to the same complex data structures on disk, it is very simple to operate in memory, so Redis can do many things with strong internal complexity. At the same time, in terms of disk format, they are compact and generated in an additional manner, because they do not require random access.

  • Redis data type?
  • What are the benefits of using Redis?
  • What are the advantages of Redis over Memcached?
  • What are the differences between Memcache and Redis?
  • Is Redis single-process single-threaded?
  • What is the maximum capacity of a string type value?
  • What is Redis's persistence mechanism? Their respective advantages and disadvantages?
  • Common performance problems and solutions of Redis:

MySQL interview questions (50 questions):

What kinds of locks are there in MySQL?

1. Table-level locks: low overhead and fast locks; no deadlocks; large lock granularity, the highest probability of lock conflicts and the lowest concurrency.

2. Row-level locking: high overhead and slow locking; deadlock will occur; the lock granularity is the smallest, the probability of lock conflict is the lowest, and the concurrency is also the highest.

3. Page lock: The overhead and the lock time are between the table lock and the row lock; deadlock will occur; the lock granularity is between the table lock and the row lock, and the concurrency is average.

  • What are the different tables in MySQL?
  • Briefly describe the difference between MyISAM and InnoDB in the MySQL database
  • The names of the four transaction isolation levels supported by InnoDB in MySQL, and the difference between each level?
  • What is the difference between CHAR and VARCHAR?
  • What is the difference between primary key and candidate key?
  • What is myisamchk used for?
  • What happens if a table has a column defined as TIMESTAMP?

to sum up:

The above shows you a part of the real questions and a part of the analysis of the eight topics, as well as 123 concurrent Java programming, 228 Java interview questions, 116 spring interview questions, 50 microservice interview questions, 45 Linux interview questions, Spring There are 22 Boot interview questions, 8 Spring Cloud interview questions, 12 RabbitMQ interview questions, and 18 Kafka interview questions.


Answer, follow the QR code below the public account,

Guess you like

Origin www.cnblogs.com/look-look/p/12707657.html