2020 Alibaba, Byte, Huawei, Tencent, etc. The most complete Java interview questions of more than 20 technology stacks, the interview questions you have never seen are here

Preface

There are two months left in 2020, and time passed in the blink of an eye. Have you been abused by the interviewer in the interview this year? Which big factory do you want to jump to next year? This is a question. To be honest, I was also abused in the interview this year. In order to find a good job next year, I specially asked for an interview bible from a friend (a big cow in Ali), 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 actual interview questions are comprehensive and detailed , all the analysis will not be listed in the article. The entire 980 interview questions are organized in one pdf file. Friends who need this pdf

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

More than 20 topics:

text:

MyBatis interview questions (27 questions):

What is Mybatis?

1. Mybatis is a semi-ORM (Object Relational Mapping) framework. It encapsulates JDBC internally. You only need to pay attention to the SQL statement itself during development, and you don't need to spend energy on 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 with high flexibility.

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

3. Configure the various statements to be executed through xml files or annotations, and generate the final executed SQL statements through the java object and the dynamic parameters of sql in the 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).

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

ZooKeeper interview questions (28 questions):

ZooKeeper interview questions?

ZooKeeper is an open source distributed coordination service. It is the manager of the cluster and monitors the status of each node in the cluster for the next reasonable operation based on the feedback submitted by the node. In the end, a simple and easy-to-use interface and a system with high performance and stable functions will be provided to users. 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 provide?
  • Zookeeper file system
  • ZAB agreement?
  • Four types of data nodes Znode
  • Zookeeper Watcher mechanism-data change notification
  • Client registration Watcher implementation
  • Server-side processing Watcher implementation
  • Client callback Watcher

Dubbo interview questions (30 questions):

Why use Dubbo?

With the further development of servitization, there are more and more services, and the calls and dependencies between services are becoming more and more complex. The service-oriented architecture (SOA) was born, and a series of corresponding technologies were derived from this. Such as a service framework that encapsulates behaviors such as service provision, service invocation, connection processing, communication protocol, serialization method, service discovery, service routing, log output, etc. In this way, a 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, are there other options?
  • Is the service call blocking?
  • Is the service call blocking?
  • What registry 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 the service provider can achieve the failure kick-out?
  • Why doesn't the service launch affect the old version?

The analysis of each topic is very comprehensive, including more than 400 pages of PDF, which is not easy to organize. If you need it, remember to get it by private message [interview question].

Elasticsearch interview questions (24 questions):

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 ES and creating the index. Document writing includes: single document writing and bulk bulk writing, here is just an explanation: single document writing process. Remember this picture in the official document.

The first step: The client writes a node in the cluster to write data and sends a request. (If no routing/coordinating node is specified, the requested node plays the role of 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 forwarded to another node, assume node 3. Therefore, the primary shard of shard 0 is allocated to node 3.

Step 3: Node 3 executes the write operation on the primary shard. If it succeeds, it forwards the request to the replica shards of node 1 and node 2 in parallel, and waits 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 writing success to the requesting client.

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

Answer: Obtained by the routing algorithm, which is the process of calculating the target's shard id based on the route and document id.

shard = hash(_routing) % (num_of_primary_shards)

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

Memcached interview questions (23 questions):

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: Temporarily store all kinds of data in the database in the pre-planned memory space to reduce direct and high concurrent access to the database by the business, thereby improving the access performance of the database and accelerating the dynamic application service of the website cluster ability.

  • How to realize Memcached service distributed cluster?
  • What are the features 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 with the server's local cache (such as PHP APC, mmap files, etc.)?

 

Redis interview questions (40 questions):

What is Redis?

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

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

  • Redis supports data persistence. The data in the memory can be saved on the disk and can be loaded again for use when restarting.
  • Redis not only supports simple key-value type data, but also provides storage for list, set, zset, hash and other data structures.
  • Redis supports data backup, that is, data backup in master-slave mode.

Redis advantage

  • Very high performance-Redis can read 110,000 times/s, and write 81,000 times/s.
  • Rich data types-Redis supports Strings, Lists, Hashes, Sets and Ordered Sets data type operations in binary cases.
  • Atomic-All Redis operations are atomic, meaning that they either execute successfully or fail at all. A single operation is atomic. Multiple operations also support transactions, that is, atomicity, which is wrapped by MULTI and EXEC instructions.
  • Rich features-Redis also supports publish/subscribe, notification, key expiration and other features.

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 memory needs to be weighed when reading and writing different data sets at high speed, because the amount of data cannot be greater than hardware memory. Another advantage of the in-memory database is that compared to the same complex data structure on disk, it is very simple to operate in memory, so that Redis can do a lot of internally complex things. At the same time, in terms of disk format, they are generated in a compact 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 that a string value can store?
  • What is the persistence mechanism of Redis? Their advantages and disadvantages?
  • Redis common performance problems and solutions:

MySQL interview questions (50 questions):

What kind of locks are there in MySQL?

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

2. Row-level locks: expensive and slow to lock; deadlocks will occur; the lock granularity is the smallest, the probability of lock conflicts is the lowest, and the concurrency is the highest.

3. Page locks: The overhead and lock time are between table locks and row locks; deadlocks will occur; locking granularity is between table locks and row locks, 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?
  • If a table has a column defined as TIMESTAMP, what will happen?

to sum up:

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

980 real interview questions (485 pages PDF), how to obtain:

Guess you like

Origin blog.csdn.net/AI_mashimanong/article/details/109401658