Tag:offset

  • Operating system learning notes-12: memory allocation (2): discontinuous allocation

    Time:2020-5-15

    In the previous note, continuous allocation is introduced, including fixed partition allocation and dynamic partition allocation. But the former is easy to generate internal fragments, while the latter is easy to generate external fragments (although it can be solved with compact technology, but there is a certain cost), which are not ideal solutions. This note […]

  • Redis slow query, pipeline, publish and subscribe, bitmap, hyperloglog, geo quick learn

    Time:2020-5-14

    Redis slow query 1. Used to view redis slow logs. Redis pipeline 1. For batch operation Publish and subscribe 1. Role: publisher, subscriber and channel.2. Model: similar to producers and consumers.3.API publish: publish channel message subscribe: subscribe channel unsubscribe: unsubscribe channel Psubscribe: mode subscription. Punsubscribe: unsubscribe from the specified mode. PubSub channels: lists channels with […]

  • Universal shadow layout with customizable shadow shadowlayout 2.0 shocks the line and surpasses cardview in effect

    Time:2020-5-10

    Support customized shadow, support flirting UI sister!! Support changing shadow color values at will Support shadow offset of X, Y axis Shadow spread area can be changed at will Shadow fillet attribute supported Single side or multi side shadow not supported 2.0 update (recently found that some people directly take it as their own project, […]

  • Introduction to Kafka minimalism (1)

    Time:2020-5-6

    Preface Kafka is an open source stream processing platform under the Apache organization. It is written and implemented by Scala development language.The flow platform has three key functions: Publish and subscribe record flows, similar to message queuing or enterprise messaging systems. Stores the record stream in a fault-tolerant, persistent manner. Process the record stream. Main […]

  • Master-slave copy of redis source code analysis (2)

    Time:2020-4-29

    Repl backlog is a fixed length ring buffer maintained by the master. The default size is1MIn the configuration filerepl-backlog-sizeItem to configure. It can be regarded as a FIFO queue. When there are too many elements in the queue, the first element to enter the queue is ejected (the data is overwritten). It exists to solve […]

  • Introduction to Kafka minimalism (4) — common configurations

    Time:2020-4-27

    Review: introduction to Kafka minimalism (3) — creating topic Preface Kafka has many configurations for broker, topic, producer and consumer. Here are some common configurations 1. Broker related configuration broker.idThe unique identifier of broker in Kafka cluster must be an integer greater than or equal to 0. If it is not written, the default value […]

  • Some common tools of Kafka

    Time:2020-4-22

    Environmental Science The following operations are based on kafka_2.11-2.2.0 tool New topic bin/kafka-topics.sh –create –zookeeper 127.0.0.1:2181 –replication-factor 1 –partitions 2 –topic spring-kafka-demo2 Replication factor: specify the number of replicas Partitions: specify partition View topic list /bin/kafka-topics.sh –zookeeper localhost:2181 –list Delete a topic /bin/kafka-topics.sh –zookeeper localhost:2181 –delete -topic spring-kafka-demo See which consumption groups there are ./bin/kafka-consumer-groups.sh […]

  • Kafka log segmentation and message searching

    Time:2020-3-26

    Kafka is a message middleware (later Kafka gradually turns to kafkastream, a loss processing platform). The final storage of messages is in the log. Kafka’s message is finally sent with the partition under the topic as the final goal, so Kafka’s log storage is also based on the partition. Log.dir parameter in configuration fileThis parameter […]

  • Kafka log cleanup

    Time:2020-3-25

    At present, there are two main strategies for Kafka log cleaning: Log deletion Log compression: log compression is to keep the last message according to the key. Kafka provideslog.cleanup.policyThe default value is delete. You can also select compact. Log deletion To configure Default value Explain log.retention.check.interval.ms 300000 (5 minutes) Detection frequency log.retention.hours 168 (7 days) […]

  • Understanding PHP array index from a ring Perspective

    Time:2020-3-2

    ( array $array , int $offset [, int $length = NULL [, bool $preserve_keys = false ]] ) : array Array_slice() is a function that takes a segment from an array. It needs to pass some integer numbers to indicate which segment in the target array the user needs. When the second parameter$offset, and the […]

  • Kafka log storage

    Time:2020-2-19

    Before going into details, I want to make a statement. This time we will explain the information file content of Kafka message storage, not the log file generated by the operation of Kafka server, which I hope you will know. Kafka messages are classified by subject, and each subject is independent from each other. Each […]

  • 2D pictures in the middle of the screen (spriterenderer)

    Time:2020-1-28

    As shown in the figure: C# Code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpriteRendererTest : MonoBehaviour { List list = new list(); // stores the child object of the parent object List renderwidthlist = new list(); // stores the width of child objects Private vector3 centerpos = vector3.zero; // center position Private float […]