• Clickhouse primary key collation (from the network)


    Clickhouse’s primary key index adopts a sparse index, which divides each column of data according to index granularity (8192 rows by default). The advantage of sparse index is that the entries are relatively dense, the index is less, it can be loaded into memory, and the cost of indexing during insertion is relatively small.Clickhouse data […]

  • The principle of radial compression dictionary tree and the code of go language implementation


    Radius tree Radius tree, namely cardinality tree, also known as compression dictionary tree, is a data structure that provides key value storage and lookup. Radix trees are often used in fast search scenarios, such as: key information corresponding to slots is stored in redis, Radix trees are used in the kernel to manage data structures, […]

  • Scrollview control in coocs


    cocos creater 3.5 Various scrolling APIs let comp_ scroll = this. node. getComponent(cc.ScrollView);// Get scroll view component // comp_ scroll. content = contentNode;// Bind scroll layer comp_ scroll. scrollToBottom(0.5);// Scroll to the bottom of the view in 0.5 seconds comp_ scroll. scrollToTop(0.5);// Scroll to the top of the view in 0.5 seconds comp_ scroll. scrollToLeft(0.5);// […]

  • [platform construction] log data synchronization data warehouse design


    background It mainly synchronizes the user traffic data, risk control data, portrait and other data to the data warehouse, formulates the data transmission format as JSON, parses and writes the user data into hive, and delivers it to the user in the form of t+1 for subsequent statistical analysis architecture design Implementation details Create a […]

  • Drawable usage under Android


    Drawable represents a kind of paintable content, which can be composed of pictures or colors The drawable under Android includes bitmapdrawable, gradientdrawable, layerdrawable, etc 1.BitmapDrawable It represents a picture. We can directly put the picture in the drawable directory, and the picture can be directly referenced as drawable. Of course, we can also describe a […]

  • File IO operation under Linux


    system call System call: a group of “special” interfaces provided by the operating system for user program calls. The user program can obtain the services provided by the operating system kernel through this group of “special” interfaces Why can’t the user program directly access the services provided by the system kernel? In order to better […]

  • The difference between Kafka index and MySQL index


    At the first sight of this question, Pipi was also very confused. Who would ask such a question if he had nothing to do. However, in fact, this is actually a real interview question. Originally, Pipi thought that “pipyou” was just a joke. Since it was a pavement test question, it was necessary to analyze […]

  • Abandon Java 8, Apache Kafka releases the official version of 3.0


    Yesterday, Apache Kafka 3.0 was officially released, which is a large version involving many aspects. In this version, Apache Kafka 3.0 introduces various new functions, breakthrough API changes and improvements to kraft: Apache Kafka’s built-in consensus mechanism will replace Apache zookeeper ™。 Although Kraft has not been recommended for production (list of known gaps), we […]

  • Proper memory alignment in go language


    problem type Part1 struct { a bool b int32 c int8 d int64 e byte } Before we start, I want you to calculatePart1What is the total occupancy size? func main() { fmt.Printf(“bool size: %d\n”, unsafe.Sizeof(bool(true))) fmt.Printf(“int32 size: %d\n”, unsafe.Sizeof(int32(0))) fmt.Printf(“int8 size: %d\n”, unsafe.Sizeof(int8(0))) fmt.Printf(“int64 size: %d\n”, unsafe.Sizeof(int64(0))) fmt.Printf(“byte size: %d\n”, unsafe.Sizeof(byte(0))) fmt.Printf(“string size: %d\n”, […]

  • Practical application of data structure and algorithm in process canvas


    Niklaus Wirth, the winner of the Turing prize and the father of Pascal, has a classic saying: “algorithm + Data Structures = programs”. We take this statement as the idea to see how to apply data structures and algorithms to solve the actual business needs in the scenario of process canvas. Tree and graph In […]

  • Principle analysis of Flink CDC 2.0 batch stream fusion technology


    In August, flinkcdc released version 2.0.0. Compared with version 1.0, it supports distributed reading and checkpoint in the full reading stage, and ensures data consistency without locking the table in the process of full + incremental reading. Detailed introduction referenceFlink CDC 2.0 was officially released to explain the core improvements in detail。 Flink CDC2. 0 […]

  • 3. How to design the check-in system of ten million days?


    Suppose there is a million check-in system, which records the user‘s check-in record, signed record 1 and not signed record 0. If we use redis string storage, 1000000 * 365 keys will be saved a year, which will occupy a lot of memory. In order to solve this problem, redis provides a bitmap data structure, […]